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