...
For versions of grib_api before 1.9.18 you will also need to download and install the oifs_samples.tar.gz
file in the src/grib_api
directory on the ftp server, because some of the GRIB templates that OpenIFS requires are not present in the 1.9.16 (or previous) distribution. Please see the README file in the grib_api directory for more information.
...
Code Block |
---|
tar zxf grib_api-1.9.18.tar.gz |
or if you your version of tar doesn't support the 'z' option, do:
...
A quick description of what these options are for:
--prefix=$(pwd)/ |
...
install | This 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/install. 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 |
...
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-jpeg |
...
OpenIFS 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-packing |
...
OpenMP 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-vector |
...
Likewise, 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-pthread |
...
This 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. |
The --help
option to configure can be used to what other options are possible, though see the grib_api website for more detailed documentation.
...
Compiling, checks and installing
Once configure has completed it will create Configure creates a 'Makefile' in the directory where it resides. To compile grib_api do:
...
which will send all the output from the make command to the file for 'make.out' as well as the terminal. This is recommended as the output is lengthy.
...
Info | ||
---|---|---|
| ||
Some HPC systems use a different architecture for their login or frontend node but their compilation system is targeted at the batch nodes. If this is the case you may see failures in the 'make check' stage because the checks, although compiled for the backend batch nodes, are being run on the frontend nodes and will therefore may not work correctly. If this is the case on your system, we recommend running the 'make check' step in a small batch job to verify grib_api was installed works correctly. |
Finally , to install grib_api do:
...
At the end of this step, in the directory oifs/grib_api we are using in this example , oifs/grib_api, you should now have a directory called 'install' which contains the following:
...