Emoslib is now deprecated

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Overview

From the 000400 version,  Emoslib will be using CMake for its compilation and installation. This is part of our aim to achieve a set of homogenisation installation procedures for all ECMWF packages. CMake is a cross-platform free software program for managing the build process of software using a compiler-independent method.

As configure, CMake will run some tests on the user's system to find out if required third-party software libraries are available and notes their locations (paths). Based on this information it will produces the Makefiles needed to compile and install Emoslib.

Requirements

 

Compilers
Chttp://gcc.gnu.org/ 
Fortranhttp://gcc.gnu.org/fortran/ 
Utilities

make

http://www.gnu.org/software/make/ 
cmakehttp://www.cmake.org/version 2.8.11 minimum
ECMWF libraries

grib-api

or (from Emoslib 4.4.2 onwards)

ecCodes

GRIB-API Home (Requires > 1.14)

 

ecCodes Home

 

for GRIB support

Third-party libraries
FFTWhttp://www.fftw.orgIf you install from Debian/RPM binary packages,
please ensure to install development packages!

 

Compilation environment

At ECMWF, SLES11 & OpenSuSE 11.3/13.1 Linux systems (64bit) were used for testing.

Generating the Makefiles with CMake

Please note

If you plan to use Emoslib for higher level tools (Magics, Metview, ...) please consider to use the -fPIC option for linking. Also if you use the gfortran compiler please read our blog entry on the quadmath option.

 

After changing into the build Emoslib directory, the user  has to run CMake with his own options. The command gives feedback on what requirements are fulfilled and what software is still required. Table 1 gives an overview of the different options of configure.  The default (without any options) will compile a share library only and install it in /usr/local/.

 

CMAKE_INSTALL_PREFIXwhere you want to install your Emoslib library /usr/local
CMAKE_BUILD_TYPE

to select the type of compilation:

  • Debug
  • RelWithDebInfo
  • Release
  • Production
RelWithDebInfo
GRIB_API_PATHwhere to find grib-api ( if non-standard installation  ) 
ENABLE_FFTWOption to link FFTW, REQUIRED for Octahedral Gaussian gridON
ENABLE_SINGLE_PRECISIONenable single precision version of library (Caution for BUFR handling and interpolation!)OFF
ENABLE_FORTRAN90enable tools which need Fortran 90 (only required for FC=pgf77)ON
ENABLE_INSTALL_TABLESenable the installations of BUFR/GRIBex tables and LSMON
cmake options
doc
default

 

The C and Fortran compilers are chosen by CMake. (This can be overwritten by setting the variables CC and FC, on the command line before you call cmake, to the preferred compiler). Further the variables CMAKE_C_FLAGSor CMAKE_Fortran_FLAGS can be used to set compiler flags for optimisation or debugging. 

Compiling the code

After the CMake command has run successfully, the user can compile the library by typing make in the build directory.

Testing your build

After compilation you can test the build library by typing make test.

Installing the library

Once the build and tests have been successfully completed, the command make install copies the library into the correct location on the system. Administrator permission might be required, depending on the installation directory.

Quick installation guide

This is a list of commands needed to install Emoslib. It is assumed “>” is the shell prompt. The Emoslib version number may vary.

>tar -xzf libemos-4.0.0-Source.tar.gz

> cd libemos-4.0.0-Source

> mkdir build ; cd build 

> cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/where/you/install/myEmoslib

...

> make

> make test

> make install  


 

  • No labels