INSTALL 5.2 KB

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