README.dev 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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. 5.2 Install OpenCL
  47. http://developer.nvidia.com/object/opencl-download.html
  48. You need to download the NVIDIA Drivers for your version of
  49. Windows. Executing the file will extract all files in a given
  50. directory. The the driver installation will start, it will fail
  51. if no compatibles drivers can be found on your system.
  52. Anyway, you should copy the *.dl_ files from the directory
  53. (extraction path) in the bin directory of the CUDA installation
  54. directory (the directory should be v3.2/bin/)
  55. 5.3 Install MsCompress
  56. http://gnuwin32.sourceforge.net/packages/mscompress.htm
  57. Go in the CUDA bin directory, uncompress .dl_ files and rename
  58. them in .dll files
  59. cp /cygdrive/c/NVIDIA/DisplayDriver/190.89/International/*.dl_ .
  60. for i in *.dl_ ; do /cygdrive/c/Program\ Files/GnuWin32/bin/msexpand.exe $i ; mv ${i%_} ${i%_}l ; done
  61. 6. Start autogen.sh from cygwin
  62. cd starpu-trunk
  63. ./autogen.sh
  64. 7. Start a MinGW shell
  65. /cygdrive/c/MinGW/msys/1.0/bin/sh.exe --login -i
  66. 8. Configure, make, install from MinGW
  67. If you have a non-english version of windows, use
  68. export LANG=C
  69. else libtool has troubles parsing the translated output of the toolchain.
  70. cd starpu-trunk
  71. mkdir build
  72. cd build
  73. ../configure --prefix=$PWD/target --disable-default-drand48 \
  74. --with-hwloc=<HWLOC installation directory> \
  75. --with-cuda-dir=<CUDA installation directory> \
  76. --with-cuda-lib-dir=<CUDA installation directory>/lib/Win32 \
  77. --with-opencl-dir=<CUDA installation directory>
  78. make
  79. make install
  80. Also convert a couple of files to CRLF:
  81. sed -e 's/$/'$'\015'/ < README > $PWD/target/README.txt
  82. sed -e 's/$/'$'\015'/ < AUTHORS > $PWD/target/AUTHORS.txt
  83. sed -e 's/$/'$'\015'/ < COPYING.LGPL > $PWD/target/COPYING.LGPL.txt
  84. 9. If you want your StarPU installation to be standalone, you need to
  85. copy the DLL files from hwloc, Cuda, and OpenCL into the StarPU
  86. installation bin directory, as well as MinGW/bin/libpthread*dll
  87. cp <CUDA directory>/bin/*dll target/bin
  88. cp <HWLOC directory>/bin/*dll target/bin
  89. cp /cygdrive/c/MinGW/bin/libpthread*dll target/bin
  90. and set the StarPU bin directory in your path.
  91. export PATH=<StarPU installation directory>/bin:$PATH
  92. Gcc-compiled CUDA
  93. -----------------
  94. If you tell nvcc to build CUDA code with gcc instead of Visual studio, a fix is
  95. needed: c:\cuda\include\host_defines.h has a bogus CUDARTAPI definition which
  96. makes
  97. linking fail completely. Replace the first occurence of
  98. #define CUDARTAPI
  99. with
  100. #ifdef _WIN32
  101. #define CUDARTAPI __stdcall
  102. #else
  103. #define CUDARTAPI
  104. #endif
  105. While at it, you can also comment the __cdecl definition to avoid spurious
  106. warnings.
  107. Developers warning
  108. ------------------
  109. They are only enabled if the STARPU_DEVEL environment is defined to a non-empty value.