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