Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you haven't already obtained the grib_api package, get it from the OpenIFS ftp site. The userid for ftp is 'openifs'. If you need the password, please email: openifs-support@ecmwf.int. Please note that currently we require a signed license before password access can be granted to the ftp site, though grib_api is freely available from the ECMWF website.

Code Block
% mkdir $HOME/ecmwf
% cd $HOME/ecmwf
ftp ftp.ecmwf.int
Connected to ftp-int.ecmwf.int.
Name (ftp.ecmwf.int:user): openifs
331 User openifs OK. Password required
Password:
ftp> cd src/grib_api
ftp> get grib_api-1.9.18.tar.gz
ftp> quit

...

Code Block
titlegcc/gfortran compilers
cd grib_api_1.9.18
CC=gcc FC=gfortran  \
CCFLAGS="-g -O2 -m64 -march=native" FCFLAGS="-g -O2 -m64 -march=native"  \
 ./configure --prefix=..$HOME/ecmwf/grib_api_gcc --enable-pthread --disable-jpeg

...

A quick description of what these options are for:

--prefix=../grib_api_gccThis specifies where you want the grib_api files to be installed. In our example here, the source code is in $HOME/ecmwf/grib_api_1.9.18 and we will put the compiled grib_api libraries in our example directory $HOME/ecmwf/grib_api_gcc. You are free to choose any installation directory but it's recommended to keep the installed binaries & libraries in a separate directory to the source code in case different compiler versions are needed. On a shared high performance computer facility, the install path would most likely be somewhere central. If nothing is specified for --prefix, by default grib_api will install in /usr/local.
--disable-jpegOpenIFS does not need to support JPEG and PNG for data compression. This removes the need to link OpenIFS against the Jasper library (libjasper.a).
--enable-pthreadThis option ensures that grib_api is thread-safe. Again, this is normally the default but we enforce it here as OpenIFS will call grib_api from parallel threads.
Warning
title--disable bug in 1.9.18

There is a known bug with 1.9.18 grib_api that when some of the --disable-<feature> (e.g. --disable-vector) or --enable-<feature> options are used, it has the reverse effect and actually enables the option. In most cases the default option is the preferred one. The options used above are known to be safe to use. Any issues or questions can be sent to openifs-suppport@ecmwf.int.

...

Code Block
titleIntel compiler:
CC=icc FC=ifort  \
CFLAGS="-g -O2 -m64 -fp-model precise" FCFLAGS="-g -O2 -fp-model precise"  \
./configure --prefix=..$HOME/ecmwf/grib_api_icc --enable-pthread --disable-jpeg
Code Block
titlePortland compiler:
CC=pgcc FC=pgf90  \
CFLAGS="-g -O2 -m64" FCFLAGS="-g -O2 -m64"  \
./configure --prefix=..$HOME/ecmwf/grib_api_pgcc --enable-pthread --disable-jpeg
Code Block
titleIBM compiler:
CC=xlc_r FC=xlf90_r  \
CFLAGS="-g -O2 -qstrict -qarch=auto -qtune=auto" FCFLAGS="-g -O2 -qstrict -qarch=auto -qtune=auto" \
./configure --prefix=..$HOME/ecmwf/grib_api_xlc --enable-pthread --disable-jpeg

...