INSTALL 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. # StarPU --- Runtime system for heterogeneous multicore architectures.
  2. #
  3. # Copyright (C) 2009-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  4. #
  5. # StarPU is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2.1 of the License, or (at
  8. # your option) any later version.
  9. #
  10. # StarPU is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. #
  14. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. #
  16. Contents
  17. =========
  18. * Installing StarPU on a Unix machine
  19. * Installing StarPU on Windows
  20. Installing StarPU on a Unix machine
  21. ------------------------------------
  22. $ ./autogen.sh # If running the SVN version
  23. $ ./configure --prefix=<prefix>
  24. $ make
  25. $ make install
  26. Installing StarPU on Windows
  27. ----------------------------
  28. If you are building from a tarball downloaded from the website, you can skip the
  29. cygwin part.
  30. 1. Install cygwin
  31. http://cygwin.com/install.html
  32. Make sure the following packages are available:
  33. - (Devel)/subversion
  34. - (Devel)/libtool
  35. - (Devel)/gcc
  36. - (Devel)/make
  37. - your favorite editor (vi, emacs, ...)
  38. - (Devel)/gdb
  39. - (Archive)/zip
  40. - (Devel)/pkg-config
  41. 2. Install mingw
  42. http://www.mingw.org/
  43. 3. Install hwloc (not mandatory, but strongly recommended)
  44. http://www.open-mpi.org/projects/hwloc
  45. Be careful which version you are installing. Even if your machine
  46. runs windows 64 bits, if you are running a 32 bits mingw (check the
  47. output of the command uname -a), you will need to install the 32
  48. bits version of hwloc.
  49. 4. Install Microsoft Visual C++ Studio Express
  50. http://www.microsoft.com/express/Downloads
  51. Add in your path the following directories.
  52. (adjusting where necessary for the Installation location according to VC
  53. version and on 64 and 32bit Windows versions)
  54. On cygwin, with Visual C++ 2010 e.g.;
  55. export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE":$PATH
  56. export PATH="/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin":$PATH
  57. On MingW, with Visual C++ 2010, e.g.;
  58. export PATH="/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE":$PATH
  59. export PATH="/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin":$PATH
  60. Try to call <cl.exe>, <lib.exe> and <link.exe> without any option to make
  61. sure these dump their help output with a series of options, otherwise no
  62. .def or .lib file will be produced.
  63. 5. Install GPU Drivers (not mandatory)
  64. 5.1 Install Cuda
  65. http://developer.nvidia.com/object/cuda_3_2_downloads.html
  66. You need to install at least the CUDA toolkit.
  67. libtool is not able to find the libraries automatically, you
  68. need to make some copies:
  69. copy c:\cuda\lib\cuda.lib c:\cuda\lib\libcuda.lib
  70. copy c:\cuda\lib\cudart.lib c:\cuda\lib\libcudart.lib
  71. copy c:\cuda\lib\cublas.lib c:\cuda\lib\libcublas.lib
  72. copy c:\cuda\lib\cufft.lib c:\cuda\lib\libcufft.lib
  73. copy c:\cuda\lib\OpenCL.lib c:\cuda\lib\libOpenCL.lib
  74. (and if the version of your CUDA driver is >= 3.2)
  75. copy c:\cuda\lib\curand.lib c:\cuda\lib\libcurand.lib
  76. Add the CUDA bin directory in your path
  77. export PATH=/cygdrive/c/CUDA/bin:$PATH
  78. Since we build code using CUDA headers with gcc instead of Visual studio,
  79. a fix is needed: c:\cuda\include\host_defines.h has a bogus CUDARTAPI
  80. definition which makes linking fail completely. Replace the first
  81. occurence of
  82. #define CUDARTAPI
  83. with
  84. #ifdef _WIN32
  85. #define CUDARTAPI __stdcall
  86. #else
  87. #define CUDARTAPI
  88. #endif
  89. While at it, you can also comment the __cdecl definition to avoid spurious
  90. warnings.
  91. 5.2 Install OpenCL
  92. http://developer.nvidia.com/object/opencl-download.html
  93. You need to download the NVIDIA Drivers for your version of
  94. Windows. Executing the file will extract all files in a given
  95. directory. The the driver installation will start, it will fail
  96. if no compatibles drivers can be found on your system.
  97. Anyway, you should copy the *.dl_ files from the directory
  98. (extraction path) in the bin directory of the CUDA installation
  99. directory (the directory should be v3.2/bin/)
  100. 5.3 Install MsCompress
  101. http://gnuwin32.sourceforge.net/packages/mscompress.htm
  102. Go in the CUDA bin directory, uncompress .dl_ files and rename
  103. them in .dll files
  104. cp /cygdrive/c/NVIDIA/DisplayDriver/190.89/International/*.dl_ .
  105. for i in *.dl_ ; do /cygdrive/c/Program\ Files/GnuWin32/bin/msexpand.exe $i ; mv ${i%_} ${i%_}l ; done
  106. If you are building from a tarball downloaded from the website, you can skip the
  107. autogen.sh part.
  108. 6. Start autogen.sh from cygwin
  109. cd starpu-trunk
  110. ./autogen.sh
  111. 7. Start a MinGW shell
  112. /cygdrive/c/MinGW/msys/1.0/bin/sh.exe --login -i
  113. 8. Configure, make, install from MinGW
  114. If you have a non-english version of windows, use
  115. export LANG=C
  116. else libtool has troubles parsing the translated output of the toolchain.
  117. cd starpu-trunk
  118. mkdir build
  119. cd build
  120. ../configure --prefix=$PWD/target \
  121. --with-hwloc=<HWLOC installation directory> \
  122. --with-cuda-dir=<CUDA installation directory> \
  123. --with-cuda-lib-dir=<CUDA installation directory>/lib/Win32 \
  124. --with-opencl-dir=<CUDA installation directory>
  125. --disable-build-doc
  126. --disable-build-examples --enable-quick-check
  127. make
  128. make check # not necessary but well advised
  129. make install
  130. The option --disable-build-doc is necessary if you do not have a
  131. working TeX binary installed as it is needed by texi2dvi to build
  132. the documentation.
  133. To fasten the compilation process, the option
  134. --disable-build-examples may also be used to disable the
  135. compilation of the applications in the examples directory. Only the
  136. applications in the test directory will be build.
  137. Also convert a couple of files to CRLF:
  138. sed -e 's/$/'$'\015'/ < README > $prefix/README.txt
  139. sed -e 's/$/'$'\015'/ < AUTHORS > $prefix/AUTHORS.txt
  140. sed -e 's/$/'$'\015'/ < COPYING.LGPL > $prefix/COPYING.LGPL.txt
  141. 9. If you want your StarPU installation to be standalone, you need to
  142. copy the DLL files from hwloc, Cuda, and OpenCL into the StarPU
  143. installation bin directory, as well as MinGW/bin/libpthread*dll
  144. cp <CUDA directory>/bin/*dll target/bin
  145. cp <HWLOC directory>/bin/*dll target/bin
  146. cp /cygdrive/c/MinGW/bin/libpthread*dll target/bin
  147. and set the StarPU bin directory in your path.
  148. export PATH=<StarPU installation directory>/bin:$PATH