Building » History » Version 16
Christoph Freysoldt, 12/19/2018 10:33 PM
| 1 | 14 | Redmine Admin | h1. Quick build |
|---|---|---|---|
| 2 | 1 | Anonymous | |
| 3 | 16 | Christoph Freysoldt | *For users on 100% compatible systems (system-wide mkl, netcdf)* |
| 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 | 16 | Christoph Freysoldt | ./configure --disable-debug --enable-mkl --with-mklpath=/opt/intel/mkl --enable-fftw |
| 10 | 1 | Anonymous | make all |
| 11 | make install |
||
| 12 | </pre> |
||
| 13 | |||
| 14 | |||
| 15 | If this does not work, please read the rest of this page. |
||
| 16 | |||
| 17 | 2 | Anonymous | You may want to run the [[testbed]] after compilation. |
| 18 | |||
| 19 | 14 | Redmine Admin | h1. Prerequisites |
| 20 | 2 | Anonymous | |
| 21 | 3 | Anonymous | * C++ compiler |
| 22 | * automake |
||
| 23 | * libtool |
||
| 24 | * flex, bison |
||
| 25 | 15 | Redmine Admin | * Additional libraries |
| 26 | 3 | Anonymous | ** BLAS+LAPACK library |
| 27 | *** ATLAS+LAPACK or |
||
| 28 | 1 | Anonymous | *** mkl or |
| 29 | *** acml or |
||
| 30 | 3 | Anonymous | *** libGOTO or |
| 31 | *** ESSL |
||
| 32 | ** FFT library |
||
| 33 | *** FFTW (recommended) |
||
| 34 | 14 | Redmine Admin | *** ACML (we encountered many bugs...) |
| 35 | 1 | Anonymous | *** mkl |
| 36 | 2 | Anonymous | ** netCDF |
| 37 | |||
| 38 | 16 | Christoph Freysoldt | | Fedora | yum install gcc-c++, gcc-gfortran, automake, libtool, flex, bison,netcdf-devel | |
| 39 | | Debian | apt-get install g++ gfortran automake libtool flex bison libnetcdf-dev libnetcdf13 | |
||
| 40 | | MacOS X 10.6 | X-Code (install from Apple installation DVD) netcdf | |
||
| 41 | 4 | Anonymous | |
| 42 | 14 | Redmine Admin | h1. Building |
| 43 | 4 | Anonymous | |
| 44 | Depending on the scope of your work with S/PHI/nX please choose the best fitting building approach: |
||
| 45 | | | Users | Testers | Developers | |
||
| 46 | | build S/PHI/nX release |once | once | frequently | |
||
| 47 | | build S/PHI/nX debug | | once | frequently| |
||
| 48 | 1 | Anonymous | | build SxAccelerate | | | once - frequently | |
| 49 | | build numlibs | | | once - rarely | |
||
| 50 | 4 | Anonymous | |
| 51 | 1 | Anonymous | * On machines with N CPUs: you may use parallel make via make -j 2N |
| 52 | 4 | Anonymous | |
| 53 | h2. configure options (selection) |
||
| 54 | |||
| 55 | | --disable-atlas --disable-lapack --enable-mkl --with-mklpath=... | use MKL for BLAS/LAPACK (support for selected versions) | |
||
| 56 | | --disable-atlas --disable-lapack --enable-acml | use ACML for BLAS/LAPACK | |
||
| 57 | 16 | Christoph Freysoldt | | --enable-fftw | use FFTW for FFT| |
| 58 | | --enable-mklfft | use mkl for FFT (don't combine with openmp=> bad performance)| |
||
| 59 | 4 | Anonymous | | --enable-mpi | compile MPI version (experimental) | |
| 60 | 16 | Christoph Freysoldt | | --enable-openmp | compile using openmp, try to use openmp numerical libraries | |
| 61 | 4 | Anonymous | | --with-numlibs=... | all external numerical libraries can be found in these paths (/path/1/:/path/2/:/path/3/) | |
| 62 | | --without-numlibs | external numerical libraries can be found in standard paths or via specified LDFLAGS and CPPFLAGS | |
||
| 63 | | CXX=... | set C++ compiler | |
||
| 64 | | CXXFLAGS=... | set additional C++ compiler flags | |
||
| 65 | 1 | Anonymous | | LDFLAGS=... | set additional linker flags (see compiler/linker docu) | |
| 66 | 4 | Anonymous | |CPPFLAGS=... | set additional preparser flags (see compiler docu) | |
| 67 | 5 | Anonymous | |CPPFLAGS='-I...' | set additional search path for external includes | |
| 68 | |||
| 69 | 1 | Anonymous | |
| 70 | 5 | Anonymous | h2. S/PHI/nX users |
| 71 | |||
| 72 | (Build S/PHI/nX only once to create an optimized executable.) |
||
| 73 | 6 | Anonymous | |
| 74 | # cd sphinx |
||
| 75 | 16 | Christoph Freysoldt | # ./configure --disable-debug --prefix=/instpath/to/sphinx [options...] |
| 76 | 1 | Anonymous | # make all install |
| 77 | 15 | Redmine Admin | |
| 78 | 8 | Anonymous | If --prefix=/instpath/to/sphinx is omitted, SPHInX will be installed into the current directory. |
| 79 | |||
| 80 | |||
| 81 | 16 | Christoph Freysoldt | h2. More configure options (for developers) |
| 82 | 8 | Anonymous | |
| 83 | 16 | Christoph Freysoldt | If you get the code via git, run once in the top-level folder to initialize the automake system |
| 84 | 9 | Anonymous | <pre> |
| 85 | ./setup |
||
| 86 | </pre> |
||
| 87 | |||
| 88 | 16 | Christoph Freysoldt | Then use separate build directories for compiling a debug and release version from the same source code. |
| 89 | 9 | Anonymous | |
| 90 | | --enable-debug | compile in debug mode (default) | |
||
| 91 | | --disable-debug | compile in release mode | |
||
| 92 | | --enable-shared/--disable-shared | enable/disable shared objects/linkage (default: enable) | |
||
| 93 | | --enable-static/--disable-static | enable/disable static objects/linkage (default: disable) | |
||
| 94 | | --enable-numlibschecks | check the numlibs install | |
