Project

General

Profile

Building » History » Version 15

Redmine Admin, 12/14/2018 03:58 PM

1 14 Redmine Admin
h1. Quick build
2 1 Anonymous
3 14 Redmine Admin
*For users on 100% compatible systems*
4 1 Anonymous
5 14 Redmine Admin
We assume that you have successfully  and unpacked the package.
6 1 Anonymous
7
<pre>
8
   cd sphinx
9
   ./setup
10
   ./configure --disable-debug
11
   make all
12
   make install
13
</pre>
14
15
16
If this does not work, please read the rest of this page.
17
18 2 Anonymous
You may want to run the [[testbed]] after compilation. 
19
20 14 Redmine Admin
h1. Prerequisites
21 2 Anonymous
22 3 Anonymous
    * C++ compiler
23
    * automake
24
    * libtool
25
    * flex, bison
26 15 Redmine Admin
    * Additional libraries
27 3 Anonymous
    ** BLAS+LAPACK library
28
    *** ATLAS+LAPACK or
29 1 Anonymous
    *** mkl or
30
    *** acml or
31 3 Anonymous
    *** libGOTO or
32
    *** ESSL 
33
    ** FFT library
34
    *** FFTW (recommended)
35 14 Redmine Admin
    *** ACML (we encountered many bugs...)
36
    *** mkl
37 3 Anonymous
    ** netCDF 
38 2 Anonymous
39
| CentOS 5.6 | yum install gcc44-c++ gcc44-gfortran automake libtool flex bison |
40
| Fedora 15 | yum install gcc-c++, gcc-gfortran, automake, libtool, flex, bison |
41
| Debian 6 | apt-get install g++ gfortran automake libtool flex bison |
42 11 Anonymous
| MacOS X 10.6 | X-Code (install from Apple installation DVD) |
43 2 Anonymous
44
Please make sure that CPU throttling is deactivated when compiling the third-party libraries (specifically: ATLAS!). 
45 4 Anonymous
46 14 Redmine Admin
h1. Building
47 4 Anonymous
48
Depending on the scope of your work with S/PHI/nX please choose the best fitting building approach:
49
| | Users | Testers | Developers |
50
| build S/PHI/nX release |once | once | frequently |
51
| build S/PHI/nX debug | | once | frequently|
52
| build SxAccelerate | | | once - frequently |
53
| build numlibs | | | once - rarely |
54
55
   * On machines with N CPUs: you may use parallel make via make -j 2N 
56
57
h2. configure options (selection)
58
59
| --disable-atlas  --disable-lapack  --enable-mkl  --with-mklpath=... | use MKL for BLAS/LAPACK (support for selected versions) | 	
60
| --disable-atlas  --disable-lapack  --enable-acml | use ACML for BLAS/LAPACK |
61
| --enable-mpi | compile MPI version (experimental) |
62
| --enable-openmp | compile using openmp, try to use openmp numerical libraries (experimental) |
63
| --with-numlibs=... | all external numerical libraries can be found in these paths (/path/1/:/path/2/:/path/3/) |
64
| --without-numlibs | external numerical libraries can be found in standard paths or via specified LDFLAGS and CPPFLAGS |
65
| CXX=... | set C++ compiler |
66
| CXXFLAGS=... | set additional C++ compiler flags |
67
| LDFLAGS=... | set additional linker flags (see compiler/linker docu) |
68
|CPPFLAGS=... | set additional preparser flags (see compiler docu) |
69
|CPPFLAGS='-I...' | set additional search path for external includes  |
70 5 Anonymous
71
72
h2. S/PHI/nX users
73
74
(Build S/PHI/nX only once to create an optimized executable.)
75
76
    # cd sphinx
77
    # ./setup
78
    # ./configure --disable-debug --prefix=/instpath/to/sphinx
79
    # make all install 
80
81
If --prefix=/instpath/to/sphinx is omitted, SPHInX will be installed into the current directory.
82
83
h2. S/PHI/nX test users
84
85
(Build S/PHI/nX in debug and release only once to create an optimized executable as well as a version that can generate a memory core file.)
86
87
    # cd sphinx
88
    # ./setup
89 6 Anonymous
    # ./configure --prefix=/instpath/to/sphinx --with-debug --with-release
90
    # make all install 
91 1 Anonymous
92
h2. S/PHI/nX developers
93 7 Anonymous
94 15 Redmine Admin
h3. Easy build instructions
95 7 Anonymous
96 6 Anonymous
    * As a simple alternative, you may use the build instruction for test users.
97
    * Properly configured build directories for debug and release mode will be found as subdirectories in sphinx/sxaccelerate/ and sphinx/, respectively.
98
    * While developing, there is no need to install (make all install -> make all).
99
    * You can compile all build directories by a top-level make, ...
100
    * ... but also each build directory separately (but beware: when changes are made in sxaccelerate, you typically need to rebuild sxaccelerate first, and then sphinx!).
101
    * For developers, we recommend to build the external libraries separately, as described in the following. Precompiled numlibs avoid repeated installation of the numlibs when top-level make is invoked, and can be reused for concurrent SPHInX versions.
102 1 Anonymous
    * use parallel make (make -j ...)
103
    *use top-level sxmake wrapper instead of make 
104
105
106 15 Redmine Admin
h3. Advanced build instructions
107 7 Anonymous
108 15 Redmine Admin
p(. 1. 
109
<pre>
110
cd sphinx
111
./setup
112
</pre>
113 8 Anonymous
    3. Possibly switch to a separate build directory (on a local file system)
114 7 Anonymous
115
<pre>
116
    mkdir -p /build/path/sphinx
117
    mkdir -p /build/path/sphinx/sxaccelerate/3rd-party
118
    cd /build/path/sphinx
119
</pre>
120
121 8 Anonymous
p(. If a build path is used, replace ./configure by the corresponding absolute filenames to the configure scripts in the source tree.
122 7 Anonymous
    
123 8 Anonymous
p(. 4. Building 3rd-party numeric libraries
124 1 Anonymous
125 8 Anonymous
     # cd sxaccelerate/3rd-party
126
     # ./configure --prefix=/instpath/to/numlibs
127 7 Anonymous
          where /instpath/to/numlibs refers to the folder where the compiled libraries will be installed in.
128 8 Anonymous
     # make all install
129
     # cd ../..
130
     # optionally clean up:
131 7 Anonymous
          rm -rf sxaccelerate/3rd-party 
132
133 8 Anonymous
p(. If --prefix=/instpath/to/numlibs is omitted, numlibs will be installed in sxaccelerate/3rd-party (NO CLEANUP!)
134 7 Anonymous
135 8 Anonymous
p(. 5. Compile S/PHI/nX
136
137
        # ./setup
138
        # ./configure --prefix=/instpath/to/sphinx --with-debug --with-release --with-numlibs=/instpath/to/numlibs
139
        # where /instpath/to/sxaccelerate is where the libraries and headers will be installed to.
140
        # make 
141 9 Anonymous
142
h2. S/PHI/nX core developers
143
144
(Suitable only for freaks)
145
146
h2. More configure options
147
148
| --enable-debug | compile in debug mode (default) |
149
| --disable-debug | compile in release mode |
150
| --enable-shared/--disable-shared | enable/disable shared objects/linkage (default: enable) |
151
| --enable-static/--disable-static | enable/disable static objects/linkage (default: disable) |
152
| --enable-numlibschecks | check the numlibs install |
153
154
155
h2. Advanced build instructions
156
157
p(. 1. Call ./setup in /src/path/to/sphinx
158
    2. Build 3rd-party numeric libraries (see instructions for developers)
159
    3. Building sxaccelerate
160
161
<pre>
162
   mkdir -p /build/path/sxaccelerate
163
   cd /build/path/sxaccelerate
164
   /src/path/to/sphinx/sxaccelerate/src/configure [options] --with-numlibs=/instpath/to/numlibs
165
</pre>
166
167
p(. For available configure options, see configure --help. You may build debug and release versions side by side using the sxaccelerate/configure --with-debug --with-release - note the omission of the src before the configure in this case! 
168
169
p(. 4. Building sphinx on top of an existing sxaccelerate build (or install)
170
171
<pre>
172
    mkdir -p /build/path/sphinx
173
    cd /build/path/sphinx
174
    /src/path/to/sphinx/src/configure --with-sxaccelerate=/build/path/sxaccelerate
175
</pre>
176
177
Note that ==*you cannot override any configure options set in the sxaccelerate*== that affect compiler/linker flags or numlibs selection.