Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
fimex:install [2012-08-21 07:29:28] heikok [Build] |
fimex:install [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Installation ====== | ====== Installation ====== | ||
- | ===== Pre-build Packages ===== | + | ===== Pre-built Packages ===== |
- | + | ||
- | If you are lucky to run one of the following operating systems, you can install fimex from a package repository: | + | |
- | + | ||
- | ==== Ubuntu 10.04 Lucid ==== | + | |
- | + | ||
- | Ubuntu Lucid packages are available since 0.28 at: https:// | + | |
- | + | ||
- | ==== Ubuntu 8.04 Hardy ==== | + | |
- | + | ||
- | Ubuntu Lucid packages are available up to 0.25 at: https:// | + | |
+ | If you are lucky to run one of the following operating systems, you can install fimex from a package repository, please check the [[fimex: | ||
===== Dependencies ===== | ===== Dependencies ===== | ||
Fimex requires at least the following libraries to be installed for compilation: | Fimex requires at least the following libraries to be installed for compilation: | ||
- | * c99/c++ compiler | + | * c99/c++11 compiler |
* [[http:// | * [[http:// | ||
- | * [[http:// | ||
* [[http:// | * [[http:// | ||
- | * [[http:// | + | * [[http:// |
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
- | To configure the different file formats it requires: | + | To configure the different file formats |
* [[http:// | * [[http:// | ||
- | * Felt (libmi or libfelt (bundled)) | + | * [[https:// |
- | * [[http://www.ecmwf.int/products/data/software/grib_api.html|grib_api]] (> 1.4) | + | * [[http://log4cpp.sourceforge.net/|Log4cpp]]: advanced logging library |
+ | * [[http://www.openmp.org/|OpenMP-3.0]] enable compiler: Parallelization | ||
+ | * [[http:// | ||
===== Build ===== | ===== Build ===== | ||
- | The installation follows the usual autoconf rules, see ' | + | See [[https://github.com/metno/fimex/blob/ |
- | extensive information. Since Fimex makes some floating-point calculations | + | |
- | in large loops, it is advisable to switch on SIMD/SSE operations in your | + | |
- | compiler. On a Xeon machine with a x386 machine and gcc, I use the | + | |
- | following flags (those are default for x86-64) (see [[http://heikok.blogspot.com/2008/08/microbenchmark-of-sse-in-c-revisited.html|microbenchmark of sse]] for more information) | + | |
- | Since fimex 0.21 | + | ==== Optimizations |
- | < | + | |
- | CFLAGS='-O2 -mfpmath=sse -msse2 -ftree-vectorize -fno-math-errno' | + | |
- | make | + | |
- | make check | + | |
- | make install | + | |
- | </ | + | |
- | ==== Static netcdf4 ==== | + | The following optimizations have been tried with gcc 4.4 and kd-tree interpolation. |
- | Use nc-config or package-config scripts to detect library dependencies, e.g. | + | * **-O2** general optimizations like loop-unrolling/ |
- | < | + | * **-mfpmath=sse -msse2** on i386 computers, use math from sse-unit. The build-in FPU is not IEEE conform and performs very slowly (> factor 2) when calculating sqrt(nan). This is already the default on i386-64. |
- | ./configure | + | * // |
- | </code> | + | * //-fno-trapping-math -fno-signaling-nans// |
+ | | ||
+ | * // | ||
+ | ==== Parallelization (OpenMP) ==== | ||
- | ==== Additional Libraries ==== | + | Fimex can be build with OpenMP parallelization support with the // |
- | Some libraries need to be added before running '' | + | * interpolation: |
- | '' | + | * interpolation |
- | < | + | |
- | export LDFLAGS=' | + | |
- | ./ | + | |
- | </ | + | |
- | If you need to add several libraries, append them with space to the LDFLAGS line, e.g. for an additional library '' | + | |
- | < | + | |
- | export LDFLAGS=' | + | |
- | ./ | + | |
- | </ | + | |
- | === grib_api | + | ===== Test ===== |
- | Most grib_api versions do not come with an automatic library detection program like package-config. When linking against grib_api, you need to know the required library flags, e.g. '' | + | * Download the file with testdata: {{: |
- | < | + | * Put this file into the test-catalogue |
- | export LDFLAGS=' | + | * gunzip the file |
- | ./configure --with-grib_api=/ | + | * run '' |
- | </ | + | |
- | === udunits2 | + | ===== Known Problems ===== |
- | udunits2 requires the expat library. Depending on the library version, this is compiled into the library, or put into the same path as udunits2, or it uses the systems expat library. So, if you run into problems with '' | + | ==== udunits1 and FMRC ==== |
+ | udunits1 does not differ between a date and a timespan, e.g. | ||
< | < | ||
- | export LDFLAGS='-lexpat' | + | $ ./udunits |
- | ./ | + | You have: hours |
+ | You want: hours since 2010-01-01 00:00:00 | ||
+ | <hours since 2010-01-01 00: | ||
+ | < | ||
</ | </ | ||
+ | Therefore, data with two time-axis, e.g. in [[http:// | ||
+ | test-failure: | ||
+ | < | ||
+ | unknown location:0: fatal error in " | ||
+ | testCoordinateSystemSliceBuilder.cc: | ||
- | ==== Optimizations with gcc ==== | + | *** 1 failure detected in test suite " |
+ | FAIL: testCoordinateSystemSliceBuilder | ||
+ | </ | ||
- | The following optimizations have been tried with gcc 4.4 and kd-tree interpolation. | + | If you don't intend to use FMRC, you can ignore this error, otherwise, you should upgrade to udunits2. |
- | * **-O2** general optimizations like loop-unrolling/ | ||
- | * **-mfpmath=sse -msse2** on i386 computers, use math from sse-unit. The build-in FPU is not IEEE conform and performs very slowly (> factor 2) when calculating sqrt(nan). This is already the default on i386-64. | ||
- | * // | ||
- | * // | ||
- | * //-O3// gives no visible performance gain. This should be tested again with newer compiler-versions. | ||
- | * // | ||
- | ==== Parallelization (OpenMP) | + | ==== udunits1 and udunits2 |
- | Fimex can be build with OpenMP parallelization support with the //configure// option //--enable-openmp//. The following operations are parallelized: | + | If both udunits1 and udunits2 are available on the machine, fimex might prefer udunits1 unless explicitly disabled. To explicitly disable udunits1, use: |
+ | < | ||
+ | ./configure --without-udunits --with-udunits2 | ||
+ | </ | ||
- | * interpolation: | + | ==== MacOS X and gcc ==== |
- | * interpolation with coord_nearestneighbor (good parallelization in startup) | + | |
- | === CAVEAT === | + | Under MacOS X strings may come in different flavour for gcc, either static or fully dynamic. Libraries compiled with one type of strings don't work well with programs/ |
+ | < | ||
+ | | ||
+ | </ | ||
- | Due to a bug in libtool, the options required for linking again a parallelized libfimex are not set automatically | + | boost:: |
+ | * download boost | ||
+ | * add '' | ||
+ | * run < | ||
+ | ./ | ||
+ | ./b2 install | ||
+ | </ | ||
+ | For more information, | ||
- | ===== Test ===== | + | ==== AIX ==== |
+ | |||
+ | The boost libraries (1.44) are not compatible with the AIX XL/C++ compiler V10 and we had to compile boost and fimex with gcc to get it working under AIX. This might have been improved with newer versions of the AIX compiler, but hasn't been tested: http:// | ||
- | * Download the file with testdata: {{: | ||
- | * Put this file into the test-catalogue | ||
- | * gunzip the file | ||
- | * run 'make check' (make check will work even without the testdata and skip a lot of tests) |