fimex:install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
fimex:install [2014-06-24 12:53:10]
heikok [Known Problems]
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://launchpad.net/~heiko-klein/+archive/fimex +
- +
-==== Ubuntu 8.04 Hardy ==== +
- +
-Ubuntu Lucid packages are available up to 0.25 at: https://launchpad.net/~heiko-klein/+archive/fimex+
  
 +If you are lucky to run one of the following operating systems, you can install fimex from a package repository, please check the [[fimex:download|download]] page.
  
 ===== 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://www.xmlsoft.org|libxml2]] >= 2.5.0   * [[http://www.xmlsoft.org|libxml2]] >= 2.5.0
-  * [[http://www.boost.org/|boost library]] >= 1.32 
   * [[http://proj.maptools.org|proj-4]] >= 4.4.9   * [[http://proj.maptools.org|proj-4]] >= 4.4.9
-  * [[http://www.unidata.ucar.edu/packages/udunits/|udunits]] >= 2.1.x or 1.12.x (deprecated)+  * [[http://www.unidata.ucar.edu/packages/udunits/|udunits]] >= 2.1.x 
 +  * [[https://github.com/metno/mi-cpptest|mi-cpptest]] 
 +  * [[https://github.com/metno/mi-programoptions|mi-programoptions]] 
 +  * [[https://github.com/pybind/pybind11|pybind11]]
   
 To configure the different file formats or features it requires: To configure the different file formats or features it requires:
   * [[http://www.unidata.ucar.edu/software/netcdf/|NetCDF]] (netcdf-3 > 3.6)   * [[http://www.unidata.ucar.edu/software/netcdf/|NetCDF]] (netcdf-3 > 3.6)
-  * [[http://www.ecmwf.int/products/data/software/grib_api.html|grib_api]] (> 1.4) +  * [[https://software.ecmwf.int/wiki/display/ECC/ecCodes+Home|ecCodes]]
-  * [[http://www.postgresql.org/|postgres-client]] libraries for wdb+
   * [[http://log4cpp.sourceforge.net/|Log4cpp]]: advanced logging library   * [[http://log4cpp.sourceforge.net/|Log4cpp]]: advanced logging library
   * [[http://www.openmp.org/|OpenMP-3.0]] enable compiler: Parallelization   * [[http://www.openmp.org/|OpenMP-3.0]] enable compiler: Parallelization
   * [[http://en.wikibooks.org/wiki/Fortran_2003|Fortran-2003]] compiler (tested with gfortran-4.6 and ifortran-12)   * [[http://en.wikibooks.org/wiki/Fortran_2003|Fortran-2003]] compiler (tested with gfortran-4.6 and ifortran-12)
-  * [[http://www.r-project.org/|R (>= 2.14)]]+
 ===== Build ===== ===== Build =====
  
-The installation follows the usual autoconf rules, see 'INSTALL' for +See [[https://github.com/metno/fimex/blob/master/README.md|README.md]] for build instructions.
-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 +
-<code> +
-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 +
-</code> +
- +
-==== Static netcdf4 ==== +
- +
-Use nc-config or package-config scripts to detect library dependencies, e.g.  +
-<code> +
-./configure --with-netcdf=/paht/to/nc-config +
-</code> +
- +
- +
-==== Additional Libraries ==== +
- +
-Some libraries need to be added before running ''./configure''. These libraries should be added into the +
-''LDFLAGS'' variable, f.e. for ''libfoo'' in ''/opt/foo/lib'' put +
-<code> +
-export LDFLAGS='-L/opt/foo/lib -lfoo' +
-./configure +
-</code> +
-If you need to add several libraries, append them with space to the LDFLAGS line, e.g. for an additional library ''libbar'': +
-<code> +
-export LDFLAGS='-L/opt/foo/lib -lfoo -lbar' +
-./configure +
-</code> +
- +
-=== grib_api === +
- +
-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. ''-L/path/to/jasper -ljasper -lpng -ljpeg'' or ''-L/path/to/openjpeg -lopenjpeg -lpng -ljpeg''. Put this string into the ''LDFLAGS'' variable before running configure, e.g.  +
-<code> +
-export LDFLAGS='-L/path/to/openjpeg -lopenjpeg -lpng -ljpeg' +
-./configure --with-grib_api=/path/to/grib_api +
-</code> +
- +
-=== udunits2 === +
- +
-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 ''./configure'' udunits2 detection, try to add ''-lexpat'' to the ''LDFLAGS'' variable: +
- +
-<code> +
-export LDFLAGS='-lexpat' +
-./configure --with-udunits2 +
-</code> +
  
 ==== Optimizations with gcc ==== ==== Optimizations with gcc ====
Line 104: Line 44:
   * interpolation: fill2d (good parallelization on z-axis)   * interpolation: fill2d (good parallelization on z-axis)
   * interpolation with coord_nearestneighbor (good parallelization in startup)   * interpolation with coord_nearestneighbor (good parallelization in startup)
- 
-=== CAVEAT (fimex < 0.38.1)=== 
- 
-Due to a bug in libtool, the options required for linking against a parallelized libfimex are not set automatically and need to be entered manually by the programmer using libfimex: https://lists.gnu.org/archive/html/bug-libtool/2011-03/msg00022.html . Libtool has been upgraded to a newer version in fimex 0.38.1 and this issue is no longer relevant. 
- 
  
 ===== Test ===== ===== Test =====
Line 115: Line 50:
   * Put this file into the test-catalogue   * Put this file into the test-catalogue
   * gunzip the file   * gunzip the file
-  * run 'make check' (make check will work even without the testdata and skip a lot of tests)+  * run ''make test'' (it will work even without the testdata and skip a lot of tests)
  
 ===== Known Problems ===== ===== Known Problems =====
- 
-==== 'make -j 2 check' fails ==== 
- 
-The targets in ''make check'' need to be run in a specific order and some will write 
-to the same file if run in parallel. Avoid any parallelism (-j X) for ''make check'' 
  
 ==== udunits1 and FMRC ==== ==== udunits1 and FMRC ====
Line 175: Line 105:
  
 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://www-01.ibm.com/support/docview.wss?uid=swg27018656 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://www-01.ibm.com/support/docview.wss?uid=swg27018656
 +
  • fimex/install.1403614390.txt.gz
  • Last modified: 2022-05-31 09:23:15
  • (external edit)