forked from hpcg-benchmark/hpcg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
210 lines (140 loc) · 6.4 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
####################################################
High Performance Conjugate Gradient Benchmark (HPCG)
####################################################
:Author: Jack Dongarra and Michael Heroux and Piotr Luszczek
:Revision: 3.0
:Date: November 11, 2015
=================
Clone from GitHub
=================
The official HPCG repository is on GitHub.com. You may fork the repository from here:
https://github.com/hpcg-benchmark/hpcg
===================
Download and Unpack (only if you did not clone from GitHub.com)
===================
Retrieve the tar-gzip file, from http://hpcg-benchmark.org
then uncompress it with:
gunzip hpcg.tar.gz; tar -xvf hpcg.tar
this will create an ``hpcg`` directory, that we call the top-level directory
in the text below.
=============
Configuration
=============
HPCG uses a make-compatible file for configuring the compilers, linkers, and
their command line flags.
Create a file ``Make.<arch>`` in the ``setup`` directory right under the
top-level directory. Suffix ``<arch>`` should be a name that you choose for
your system. To make the process easier, you may want to re-use one of the
example files contained already in the ``setup`` directory. The
``Make.<arch>`` file contains the command names of the compilers and linkers
together with their options for using special directories and linking with
libraries as well as their paths that are to be used for building the binary.
The most important variables that need to be set in ``Make.<arch>`` are:
* ``MPdir`` specifies the path to where the MPI installation resides. For some
MPI implementations, using the MPI-enabled compiler (such as ``mpicxx``) is
sufficient and it is not required specified any MPI installation paths. This
variable can be used to setup the ``MPinc`` and ``MPlib`` variables.
* ``MPinc`` specifies the path to include directories with MPI header files. A
common setting here would be ``MPinc = $(MPdir)/include``, provided that the
``MPdir`` variable was set properly.
* ``MPlib`` specifies the path to directories with MPI library files. A common
setting here would be ``MPlib = $(MPdir)/lib``, provided that the ``MPdir``
variable was set properly.
* ``HPCG_OPTS`` specifies additional compiler options for compiling the HPCG
source files. These options might include optimization, debugging, or tuning
flags.
* ``CXX`` specifies the name of the C++ compiler for compiling the code. It
should be a C++ that supports a subset of STL that is used in HPCG as well as
the subset of constructs used in the MPI standard.
* ``CXXFLAGS`` specifies the flags to be used when invoking the C++ compiler.
These might include optimization and profiling options.
* ``LINKER`` specifies the linker capable of linking C++ programs that include
MPI calls.
* ``LINKERFLAGS`` specifies the flags passed to the linker that might indicate
directories where to look for standard C++ and MPI libraries.
HPCG supports in-source and out-of-source builds. In the case of the former,
the object files and the binary reside in the same directory structure as the
source files. There is no need for a seperate configuration step and the reader
may skip the the Build section.
In the latter case, a seperate directory is created to hold the object and
binary executable files. For example, create a custom directory, ``build`` in
this example, for the results of compilation and linking::
mkdir build
Next, go this new directory and use the ``configure`` script to create the
build infrastructure:
cd build
/path/to/hpcg/configure <arch>
Notice that you have to give a absolute or relative path to the ``configure``
shell script so that the location of the source files can be discovered
automatically.
<arch> is the suffix of the setup file you created in the directory hpcg/setup.
Sample setup files are found in the hpcg/setup directory.
=====
Build
=====
For in-source builds, while in the top-level directory, simply type::
make path/to/setup/file
For the out-of-source builds, go to the ``build`` directory and type ``make``.
In both cases, the executable called ``xhpcg`` should be created in the ``bin``
directory.
=============
Example Build
=============
As an example, let's use a Linux cluster and create a file called
``Make.Linux`` in the ``setup`` directory right under the top-level directory.
For in-source build, we type ``make setup/Make.Linux`` which creates the executable
file called ``bin/xhpcg``.
For out-of-source build, we create the build directory called ``build_Linux``
and go to that direcotry::
mkdir build_Linux
cd build_Linux
Then, while in the ``build_Linux`` directory we type::
/path/to/hpcg/configure Linux
make
This creates the executable file ``bin/xhpcg``.
====
Test
====
For a quick check, go to the ``bin`` directory and run the HPCG executable as
follows::
mpirun -np 8 xhpcg
Note that this will use the default ``hpcg.dat`` file. If you'd like to change
the size of local dimensions of the problem to NX=32, NY=24, NZ=16 then run the
following::
mpirun -np 8 xhpcg 32 24 16
You can also specific size and runtime parameters using --nx, --ny, --nz, --rt.
For example, for specifying the local grid dimensions to be NX=NY=NZ=16, and
the timed phase execution limit of 30 minutes (1800 seconds) you can use
mpirun -np 4 xhpcg --nx=16 --rt=1800
======
Tuning
======
Most of the performance parameters can be tuned by modifying the input file
``hpcg.dat``. See the file ``TUNING`` in the top-level directory.
====================
Compile Time Options
====================
At the end of the "model" ``Make.<arch>``, the user is given the opportunity to
compile the software with some specific compile options. The list of this
options and their meaning are:
* Compile with modest debugging turned on::
-DHPCG_DEBUG
* Compile with sparse matrix arrays allocated contiguously. This option
* may be helpful on systems with pre-fetch::
-DHPCG_CONTIGUOUS_ARRAYS
* Compile with voluminous debugging information turned on::
-DHPCG_DETAILED_DEBUG
* Compile with MPI disabled::
-DHPCG_NO_MPI
* Compile without OpenMP enabled::
-DHPCG_NO_OPENMP
* Enable detail timers::
-DHPCG_DETAILED_TIMING
By default HPCG will:
* Turn on MPI support.
* Turn on OpenMP support.
* not display detailed timing information.
===================
Further information
===================
Check out the website http://hpcg-benchmark.org/ for the latest information.