README.dev 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. Installing StarPU on windows
  2. ----------------------------
  3. 1. Install cygwin
  4. http://cygwin.com/install.html
  5. Make sure the following packages are available:
  6. - svn
  7. - libtool
  8. - gcc
  9. - make
  10. - your favorite editor (vi, emacs, ...)
  11. - gdb
  12. - zip
  13. - pkg-config
  14. 2. Install mingw
  15. http://sourceforge.net/projects/mingw/
  16. 3. Install hwloc (not mandatory)
  17. http://www.open-mpi.org/projects/hwloc
  18. 4. Install Microsoft Visual C++ 2008 Studio Express
  19. http://www.microsoft.com/express/Downloads
  20. On cygwin (and mingw), add in your path the following directories:
  21. export PATH=/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/Common7/IDE:$PATH
  22. export PATH=/cygdrive/c/Program Files/Microsoft Visual Studio 9.0/VC/bin:$PATH
  23. Try to call <lib.exe> and <link.exe> from MinGW, else no .def or .lib file
  24. will be produced.
  25. 5. Install GPU Drivers (not mandatory)
  26. 5.1 Install Cuda
  27. http://developer.nvidia.com/object/cuda_3_2_downloads.html
  28. You need to install at least the CUDA toolkit.
  29. libtool is not able to find the libraries automatically, you
  30. need to make some copies:
  31. copy c:\cuda\lib\cuda.lib c:\cuda\lib\libcuda.lib
  32. copy c:\cuda\lib\cudart.lib c:\cuda\lib\libcudart.lib
  33. copy c:\cuda\lib\cublas.lib c:\cuda\lib\libcublas.lib
  34. copy c:\cuda\lib\cufft.lib c:\cuda\lib\libcufft.lib
  35. copy c:\cuda\lib\OpenCL.lib c:\cuda\lib\libOpenCL.lib
  36. (and if the version of your CUDA driver is >= 3.2)
  37. copy c:\cuda\lib\curand.lib c:\cuda\lib\libcurand.lib
  38. Add the CUDA bin directory in your path
  39. export PATH=/cygdrive/c/CUDA/bin:$PATH
  40. 5.2 Install OpenCL
  41. http://developer.nvidia.com/object/opencl-download.html
  42. You need to download the NVIDIA Drivers for your version of
  43. Windows. Executing the file will extract all files in a given
  44. directory. The the driver installation will start, it will fail
  45. if no compatibles drivers can be found on your system.
  46. Anyway, you should copy the *.dl_ files from the directory
  47. (extraction path) in the bin directory of the CUDA installation
  48. directory (the directory should be v3.2/bin/)
  49. 5.3 Install MsCompress
  50. http://gnuwin32.sourceforge.net/packages/mscompress.htm
  51. Go in the CUDA bin directory, uncompress .dl_ files and rename
  52. them in .dll files
  53. cp /cygdrive/c/NVIDIA/DisplayDriver/190.89/International/*.dl_ .
  54. for i in *.dl_ ; do /cygdrive/c/Program\ Files/GnuWin32/bin/msexpand.exe $i ; mv ${i%_} ${i%_}l ; done
  55. 6. Start autogen.sh from cygwin
  56. cd starpu-trunk
  57. ./autogen.sh
  58. 7. Start a MinGW shell
  59. /cygdrive/c/MinGW/msys/1.0/bin/sh.exe --login -i
  60. 8. Configure, make, install from MinGW
  61. If you have a non-english version of windows, use
  62. export LANG=C
  63. else libtool has troubles parsing the translated output of the toolchain.
  64. cd starpu-trunk
  65. mkdir build
  66. cd build
  67. ../configure --prefix=$PWD/target --disable-default-drand48
  68. --with-hwloc=<HWLOC installation directory> \
  69. --with-cuda-dir=<CUDA installation directory> \
  70. --with-cuda-lib-dir=<CUDA installation directory>/lib/Win32 \
  71. --enable-opencl
  72. make
  73. make install
  74. Also convert a couple of files to CRLF:
  75. sed -e 's/$/'$'\015'/ < README > $PWD/target/README.txt
  76. sed -e 's/$/'$'\015'/ < AUTHORS > $PWD/target/AUTHORS.txt
  77. sed -e 's/$/'$'\015'/ < COPYING.LGPL > $PWD/target/COPYING.LGPL.txt
  78. 9. If you want your StarPU installation to be standalone, you need to
  79. copy the DLL files from hwloc, Cuda, and OpenCL into the StarPU
  80. installation bin directory, as well as MinGW/bin/libpthread*dll
  81. cp <CUDA directory>/bin/*dll target/bin
  82. cp <HWLOC directory>/bin/*dll target/bin
  83. cp /cygdrive/c/MinGW/bin/libpthread*dll target/bin
  84. and set the StarPU bin directory in your path.
  85. export PATH=<StarPU installation directory>/bin:$PATH
  86. Gcc-compiled CUDA
  87. -----------------
  88. If you tell nvcc to build CUDA code with gcc instead of Visual studio, a fix is
  89. needed: c:\cuda\include\host_defines.h has a bogus CUDARTAPI definition which
  90. makes
  91. linking fail completely. Replace the first occurence of
  92. #define CUDARTAPI
  93. with
  94. #ifdef _WIN32
  95. #define CUDARTAPI __stdcall
  96. #else
  97. #define CUDARTAPI
  98. #endif
  99. While at it, you can also comment the __cdecl definition to avoid spurious
  100. warnings.