README.dev 4.9 KB

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