File: INSTALL

package info (click to toggle)
starpu 1.1.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 21,480 kB
  • ctags: 18,507
  • sloc: ansic: 97,988; cpp: 23,323; sh: 12,824; makefile: 2,880; lisp: 818; yacc: 214; sed: 162; fortran: 13
file content (254 lines) | stat: -rw-r--r-- 8,022 bytes parent folder | download | duplicates (2)
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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# StarPU --- Runtime system for heterogeneous multicore architectures.
#
# Copyright (C) 2009-2012  Université de Bordeaux 1
# Copyright (C) 2010, 2011, 2013  Centre National de la Recherche Scientifique
#
# 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
* Running StarPU Applications on Microsoft Visual C



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
      occurence 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


Running StarPU Applications on Microsoft Visual C
-------------------------------------------------

Batch files are provided to run StarPU applications under Microsoft
Visual C. They are installed in path_to_starpu/bin/mvsc.

To execute a StarPU application, you first need to set the environment
variable STARPUPATH.

c:\....> cd c:\cygwin\home\ci\starpu\
c:\....> set STARPUPATH=c:\cygwin\home\ci\starpu\
c:\....> cd bin\mvsc
c:\....> starpu_open.bat starpu_simple.c

The batch script will run Microsoft Visual C with a basic project file
to run the given application.

The batch script starpu_clean.bat can be used to delete all
compilation generated files.

The batch script starpu_exec.bat can be used to compile and execute a
StarPU application from the command prompt.

c:\....> cd c:\cygwin\home\ci\starpu\
c:\....> set STARPUPATH=c:\cygwin\home\ci\starpu\
c:\....> cd bin\mvsc
c:\....> starpu_exec.bat ..\..\..\..\examples\basic_examples\hello_world.c

MVSC StarPU Execution
...
/out:hello_world.exe
...
Hello world (params = {1, 2.00000})
Callback function got argument 0000042
c:\....>