Building » History » Version 7
Anonymous, 01/25/2016 12:33 PM
1 | 1 | Anonymous | h1. Building |
---|---|---|---|
2 | |||
3 | Quick guide for users on 100% compatible systems |
||
4 | |||
5 | We assume that you have successfully downloaded and unpacked the package, possibly including 3rd-party packages in sphinx/sxaccelerate/3rd-party/packages/ . |
||
6 | |||
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 | * Additional libraries (see also 3rd-party packages) |
||
29 | ** 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 | See here |
||
52 | |||
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 | # cd sphinx |
||
123 | # ./setup |
||
124 | # Possibly switch to a separate build directory (on a local file system) |
||
125 | |||
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 | If a build path is used, replace ./configure by the corresponding absolute filenames to the configure scripts in the source tree. |
||
133 | |||
134 | 4. Building 3rd-party numeric libraries |
||
135 | |||
136 | * cd sxaccelerate/3rd-party. |
||
137 | * ./configure --prefix=/instpath/to/numlibs |
||
138 | where /instpath/to/numlibs refers to the folder where the compiled libraries will be installed in. |
||
139 | * make all install. |
||
140 | * cd ../.. |
||
141 | * optionally clean up: |
||
142 | rm -rf sxaccelerate/3rd-party |
||
143 | |||
144 | If --prefix=/instpath/to/numlibs is omitted, numlibs will be installed in sxaccelerate/3rd-party (NO CLEANUP!) |
||
145 | |||
146 | Compile S/PHI/nX |
||
147 | ./setup |
||
148 | ./configure --prefix=/instpath/to/sphinx --with-debug --with-release --with-numlibs=/instpath/to/numlibs |
||
149 | where /instpath/to/sxaccelerate is where the libraries and headers will be installed to. |
||
150 | make |