fimex:install

This is an old revision of the document!


Installation

If you are lucky to run one of the following operating systems, you can install fimex from a package repository:

Ubuntu Lucid packages are available since 0.28 at: https://launchpad.net/~heiko-klein/+archive/fimex

Ubuntu Lucid packages are available up to 0.25 at: https://launchpad.net/~heiko-klein/+archive/fimex

Fimex requires at least the following libraries to be installed for compilation:

To configure the different file formats it requires:

  • NetCDF (netcdf-3 > 3.6)
  • Felt (libmi or libfelt (bundled))
  • grib_api (> 1.4)

The installation follows the usual autoconf rules, see 'INSTALL' for 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 microbenchmark of sse for more information)

Since fimex 0.21

CFLAGS='-O2 -mfpmath=sse -msse2 -ftree-vectorize -fno-math-errno' CXXFLAGS='-O2 -mfpmath=sse -msse2 -ftree-vectorize -fno-math-errno' ./configure --with-netcdf=/usr --with-udunits=/usr
make
make check
make install

In case of compilation against the netcdf4 library with hdf5 support, additional libraries needed by a static netcdf4 need to be added manually in LDFLAGS. Those can be retrieved from the nc-config program, e.g.

 $ /usr/local/netcdf/netcdf-4.1.1/bin/nc-config/nc-config --libs
-L/usr/local/netcdf/netcdf-4.1.1/lib -lnetcdf -L/usr/local/hdf/hdf5-1.8.5-patch1/lib -lhdf5_hl -lhdf5 -lz -lm -lgpfs
 $ export LDFLAGS='-L/usr/local/hdf/hdf5-1.8.5-patch1/lib -lhdf5_hl -lhdf5 -lz -lm -lgpfs'

The following optimizations have been tried with gcc 4.4 and kd-tree interpolation.

  • -O2 general optimizations like loop-unrolling/inline
  • -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.
  • -ftree-vectorize -fno-math-errno gives tiny performance gain through auto-vecotrization. -fno-math-errno is required to enable vectorization of intrinsic functions like sqrt.
  • -fno-trapping-math -fno-signaling-nans fimex does not make use of trapping-math or signaling-nans, so this option can safely be switched on. Unfortunately, this does not give any performance gain.
  • -O3 gives no visible performance gain. This should be tested again with newer compiler-versions.
  • -fprofile-generate/-fprofile-use gives a performance gain of ~4%. Since it complicates the build, it is not used by default.

Fimex can be build with OpenMP parallelization support with the configure option –enable-openmp. The following operations are parallelized:

  • interpolation: fill2d (good parallelization on z-axis)
  • interpolation with coord_nearestneighbor (good parallelization in startup)

CAVEAT

Due to a bug in libtool, the options required for linking again a parallelized libfimex are not set automatically and need be entered manually by the programmer using libfimex: https://lists.gnu.org/archive/html/bug-libtool/2011-03/msg00022.html

  • Download the file with testdata: flth00.dat.gz
  • 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)
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
  • fimex/install.1326895831.txt.gz
  • Last modified: 2022-05-31 09:23:15
  • (external edit)