Building » History » Version 14
Redmine Admin, 12/14/2018 03:52 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 | 13 | Anonymous | * Additional libraries (see also [[3rd-party packages]] %{color:red}alter Link nach sxlib =:% "3rd-party packages":http://sxlib.mpie.de/wiki/Download#third-party) |
| 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 | 7 | Anonymous | |
| 92 | 6 | Anonymous | Read more about [[being a S/PHI/nX alpha tester]]. |
| 93 | 1 | Anonymous | |
| 94 | h2. S/PHI/nX developers |
||
| 95 | 7 | Anonymous | |
| 96 | h2. Easy build instructions |
||
| 97 | |||
| 98 | 6 | Anonymous | * As a simple alternative, you may use the build instruction for test users. |
| 99 | * Properly configured build directories for debug and release mode will be found as subdirectories in sphinx/sxaccelerate/ and sphinx/, respectively. |
||
| 100 | * While developing, there is no need to install (make all install -> make all). |
||
| 101 | * You can compile all build directories by a top-level make, ... |
||
| 102 | * ... but also each build directory separately (but beware: when changes are made in sxaccelerate, you typically need to rebuild sxaccelerate first, and then sphinx!). |
||
| 103 | * 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. |
||
| 104 | 1 | Anonymous | * use parallel make (make -j ...) |
| 105 | *use top-level sxmake wrapper instead of make |
||
| 106 | 7 | Anonymous | |
| 107 | |||
| 108 | h2. Advanced build instructions |
||
| 109 | |||
| 110 | 8 | Anonymous | p(. 1. cd sphinx |
| 111 | 2. ./setup |
||
| 112 | 3. Possibly switch to a separate build directory (on a local file system) |
||
| 113 | 7 | Anonymous | |
| 114 | <pre> |
||
| 115 | mkdir -p /build/path/sphinx |
||
| 116 | mkdir -p /build/path/sphinx/sxaccelerate/3rd-party |
||
| 117 | cd /build/path/sphinx |
||
| 118 | </pre> |
||
| 119 | |||
| 120 | 8 | Anonymous | p(. If a build path is used, replace ./configure by the corresponding absolute filenames to the configure scripts in the source tree. |
| 121 | 7 | Anonymous | |
| 122 | 8 | Anonymous | p(. 4. Building 3rd-party numeric libraries |
| 123 | 1 | Anonymous | |
| 124 | 8 | Anonymous | # cd sxaccelerate/3rd-party |
| 125 | # ./configure --prefix=/instpath/to/numlibs |
||
| 126 | 7 | Anonymous | where /instpath/to/numlibs refers to the folder where the compiled libraries will be installed in. |
| 127 | 8 | Anonymous | # make all install |
| 128 | # cd ../.. |
||
| 129 | # optionally clean up: |
||
| 130 | 7 | Anonymous | rm -rf sxaccelerate/3rd-party |
| 131 | |||
| 132 | 8 | Anonymous | p(. If --prefix=/instpath/to/numlibs is omitted, numlibs will be installed in sxaccelerate/3rd-party (NO CLEANUP!) |
| 133 | 7 | Anonymous | |
| 134 | 8 | Anonymous | p(. 5. Compile S/PHI/nX |
| 135 | |||
| 136 | # ./setup |
||
| 137 | # ./configure --prefix=/instpath/to/sphinx --with-debug --with-release --with-numlibs=/instpath/to/numlibs |
||
| 138 | # where /instpath/to/sxaccelerate is where the libraries and headers will be installed to. |
||
| 139 | # make |
||
| 140 | 9 | Anonymous | |
| 141 | h2. S/PHI/nX core developers |
||
| 142 | |||
| 143 | (Suitable only for freaks) |
||
| 144 | |||
| 145 | h2. More configure options |
||
| 146 | |||
| 147 | | --enable-debug | compile in debug mode (default) | |
||
| 148 | | --disable-debug | compile in release mode | |
||
| 149 | | --enable-shared/--disable-shared | enable/disable shared objects/linkage (default: enable) | |
||
| 150 | | --enable-static/--disable-static | enable/disable static objects/linkage (default: disable) | |
||
| 151 | | --enable-numlibschecks | check the numlibs install | |
||
| 152 | |||
| 153 | |||
| 154 | h2. Advanced build instructions |
||
| 155 | |||
| 156 | p(. 1. Call ./setup in /src/path/to/sphinx |
||
| 157 | 2. Build 3rd-party numeric libraries (see instructions for developers) |
||
| 158 | 3. Building sxaccelerate |
||
| 159 | |||
| 160 | <pre> |
||
| 161 | mkdir -p /build/path/sxaccelerate |
||
| 162 | cd /build/path/sxaccelerate |
||
| 163 | /src/path/to/sphinx/sxaccelerate/src/configure [options] --with-numlibs=/instpath/to/numlibs |
||
| 164 | </pre> |
||
| 165 | |||
| 166 | 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! |
||
| 167 | |||
| 168 | p(. 4. Building sphinx on top of an existing sxaccelerate build (or install) |
||
| 169 | |||
| 170 | <pre> |
||
| 171 | mkdir -p /build/path/sphinx |
||
| 172 | cd /build/path/sphinx |
||
| 173 | /src/path/to/sphinx/src/configure --with-sxaccelerate=/build/path/sxaccelerate |
||
| 174 | </pre> |
||
| 175 | |||
| 176 | Note that ==*you cannot override any configure options set in the sxaccelerate*== that affect compiler/linker flags or numlibs selection. |
