-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.txt
157 lines (112 loc) · 6.57 KB
/
INSTALL.txt
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
============================================================================
Scalable HeterOgeneous Computing (SHOC) Benchmark Suite: Installation
============================================================================
Note: The SHOC user manual in the doc directory contains more complete
information about configuring, building, and using the SHOC Benchmark Suite.
============================= Linux and OS X =============================
0. Ensure you have either a working installation of OpenCL and/or CUDA.
See the SHOC user manual for more information about version requirements.
1. If you are building SHOC with CUDA support, adjust your PATH environment
variable so that the CUDA nvcc command is found in the PATH.
If you are building SHOC with MPI support, adjust your PATH environment
variable so that the MPI compiler driver (e.g., mpicxx) is found in the
PATH.
2. SHOC supports the building of its programs both within the SHOC source code
tree and outside the source code tree. You might want to build outside
the source tree if you are sharing one source code installation across
several different types of systems, for example. In this scenario,
you could use the same source code installation with several
platform-specific build directories.
In the following, we will call the root directory of the SHOC source
distribution $SHOC_ROOT. We will call the directory where you are
building SHOC $BUILD_ROOT.
If you want to build within the source tree, cd to the $SHOC_ROOT directory.
This is the only build approach supported by earlier versions of SHOC.
In this case, $BUILD_ROOT == $SHOC_ROOT.
If you want to build outside the source tree, create a new directory
and cd into it. For instance,
$ tar xvzf shoc-1.1.5.tar.gz
$ mkdir shoc-build
$ cd shoc-build
Note that $BUILD_ROOT can be somewhere within the SHOC source tree
hierarchy, such as at $SHOC_ROOT/linux.
3. Configure the benchmark suite using SHOC's configure script. Be sure
to pass the desired location for the SHOC installation using the
configure script's --prefix option. If you do not specify an installation
location using --prefix, the configure script will assume the
installation location is $BUILD_ROOT. In the following, we will call
the installation location $DEST_ROOT.
To approximate the build behavior of earlier versions of SHOC, use
--prefix=$SHOC_ROOT so that program executables are installed into
the $SHOC_ROOT/bin directory. (In this case, $DEST_ROOT == $SHOC_ROOT.)
In addition to possibly specifying the prefix, on some systems you may
need to specify CPPFLAGS and/or LDFLAGS to the configure script so that
OpenCL headers and libraries can be found. For example, on a Linux system
with a CUDA 4.x installation in /opt/cuda (which includes NVIDIA's OpenCL
implementation), the following should work:
$ cd $BUILD_ROOT
$ sh $SHOC_ROOT/configure CPPFLAGS="-I/opt/cuda/include"
Note again that SHOC's configure script uses the PATH to find MPI compiler
drivers (e.g., mpicxx) and CUDA drivers (nvcc). If you want MPI support or
CUDA support, be sure the appropriate 'bin' directories for MPI and/or CUDA
are in your PATH *before* you try to configure SHOC.
See 'sh $SHOC_ROOT/configure --help' and the user's guide for more
information on configuring SHOC using the autoconf-generated configure
script.
4. Build the benchmark programs with GNU make. On Linux and OS X systems this
probably will be as simple as the following:
$ cd $BUILD_ROOT
$ make
Unlike earlier versions of SHOC, SHOC executables are no longer built into
directories under $BUILD_ROOT/bin. A separate install step is needed.
5. Install the benchmark programs into $DEST_ROOT. (You did specify
a $DEST_ROOT using --prefix in step 3, didn't you?)
Program executables will be left in the $DEST_ROOT/bin directory. The
bin directory contains subdirectories for different versions of the
benchmarks. Serial, EP (Embarrassingly Parallel), and TP (Truly Parallel).
5. Run single-device tests with something like
$ $DEST_ROOT/bin/Serial/OpenCL/Sort
Run MPI-based multi-device tests with something like
$ mpirun -np 2 $DEST_ROOT/bin/EP/OpenCL/Sort
Use 1 MPI rank per accelerator device.
Alternatively, the bin folder contains a script to run the full
suite at once. The script depends on MPI programs being in your current
PATH, so be sure to set environment variables appropriately. For example,
for bash, ksh, and similar shells:
$ export PATH=$PATH:/path/to/mpi/bin/dir
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/mpi/lib/dir
Run specify the size (1-4) and whether to use the CUDA or OpenCL versions
of the benchmarks. For cuda:
$ cd $DEST_ROOT
$ ./bin/shocdriver -s 2 -cuda
or the OpenCL version with:
$ cd $DEST_ROOT
$ ./bin/shocdriver -s 2 -opencl
To run the parallel versions of the benchmarks, supply the script with the
number of nodes and the number of devices per node. For example, for a 4
node cluster with 2 devices per node, size 1 benchmark problems, CUDA
versions, use:
$ cd $DEST_ROOT
$ ./bin/shocdriver -n 4 -d 2 -s 1 -cuda
Both scripts will output benchmarks results to a file in comma separated
value format to results.csv
================================= Windows ================================
Note that Windows support is still experimental. Only the CUDA
implementation is currently supported, not yet OpenCL.
0. Ensure you have a working Visual Studio 2010 and CUDA 4.2 installation.
We expect newer CUDA installations to also work.
1. Open shoc-cuda42-vs10.sln in the root of the shoc tree.
2. Build the solution.
3. If you encounter errors during the build, this may be due to
race conditions during a parallel build. Simply continue the
build (use "Build" (F7), NOT "Rebuild") if you encounter this.
4. You can run the benchmarks within each project or from the
command-line prompt. If you are using a console, the
benchmark executables are in bin/Serial/CUDA. For example:
C:\Users\me\Desktop\shoc> cd bin\Serial\CUDA
C:\Users\me\Desktop\shoc\bin\Serial\CUDA> Sort -n 1 -d 0
... would choose the first CUDA device (also the default)
and set the number of passes to 1.
============================================================================
See the SHOC user manual and README.txt for more information.
Last update: $Id: INSTALL.txt 996 2011-12-01 17:24:37Z 6rp $