README.dev 5.1 KB

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