Versions Compared

Key

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

...

Code Block
cd grib_api
CC=gcc FC=gfortran ./configure --prefix=$(pwd)/installmyinstall --enable-static --enable-pthread --disable-shared --disable-jpeg --disable-omp-packing --disable-vector

A quick description of what these options are for:

--prefix=$(pwd)/installmyinstallThis specifies where you want the grib_api files to be installed. In our example here, we will put the compiled grib_api libraries in our example directory oifs/grib_api/installmyinstall. If you are on a shared high performance computer facility, the install path would most likely be somewhere central. If you specify nothing for --prefix, by default grib_api will install in /usr/local.
--enable-static
--disable-shared
OpenIFS needs to link with a static library for grib_api (i.e. libgrib.a), so a shared library version is not required. By default both are built but in case defaults change in future releases, better enforce them.
--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).
--disable-omp-packingOpenMP enabled packing is removed as the model needs to have control over OpenMP multithreading. This is usually disabled by default but it's best to enforce it in case the default changes for future releases.
--disable-vectorLikewise, on vector computer hardware (e.g. NEC), you can enable this option and grib_api will use a more efficient packing/unpacking method suitable for vector machines.
--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.

...

Code Block
CC=icc FC=ifort  \
CFLAGS="-O" FCFLAGS="-O2 -fp-model precise"  \
./configure --prefix=$(pwd)/installmyinstall --enable-static --enable-pthread --disable-shared --disable-jpeg --disable-omp-packing --disable-vector

...

Code Block
CC=xlc_r FC=xlf90_r  \
CFLAGS="-O" FCFLAGS="-g -O3 -qstrict -qarch=auto -qtune=auto" \
./configure --prefix=$(pwd)/installmyinstall --enable-static --enable-pthread --disable-shared --disable-jpeg --disable-omp-packing --disable-vector

...

At the end of this step, in the directory oifs/grib_api we are using in this example you should now have a directory called 'installmyinstall' which contains the following:

Code Block
% ls installmyinstall
bin  include  lib  share
% ls installmyinstall/lib
libgrib_api.a  libgrib_api.la  libgrib_api_f77.a  libgrib_api_f77.la  libgrib_api_f90.a  libgrib_api_f90.la  pkgconfig

...