...
Section | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Code Block |
---|
export OIFS_COMP=xlfgnu export OIFS_BUILD=noopt |
means FCM will expect to find a file:
Code Block |
---|
make/cfg/xlfgnu-noopt.cfg |
suitable for building on IBM Power6 architecture using the XLF/XLCC compilers using non-optimized settings.
If using GNU on a Mac, please see MacOS X known issues.
...
The model requires a number of libraries (see 5.2 Prerequisites) to compile. As well as the GRIB _API librarylibrary (either ECMWF's ecCodes or grib_api libraries), the LAPACK & BLAS numerical libraries are required. An MPI library is also required but this is assumed to be provided by compiler wrappers provided by the MPI implementation (e.g. the command mpif90 rather than gfortran).
To set the location of the GRIB _API & LAPACK libraries, two other environment variables need to be defined as the defaults in the FCM configuration files will most likely not be appropriate.
OIFS_GRIB_API_DIR - Defines the location of the grib_api GRIB library. If you followed the example in For more details see '5.3 Install GRIB library for OpenIFS' it will be installed in $HOME/ecmwf/grib_api_gcc
.
OIFS_LAPACK_LIB - Defines the location of the directory containing the liblapack.a and libblas.a files. This varies from system to system but typically /usr/local/lib
.
...
Code Block |
---|
export OIFS_GRIB_API_DIR=$HOME/ecmwf/grib_apieccodes_gcc export OIFS_LAPACK_LIB="-L/usr/local/lib -llapack -lblas" |
Or if you prefer you can either edit the default value in the appropriate FCM configuration file in make/cfg
directory or make a copy of the supplied configuration file (.cfg) and use that.
Info | ||||||
---|---|---|---|---|---|---|
| ||||||
If you are using the ECMWF ecCodes GRIB library and not the ECMWF grib_api library, a small change is required to the configuration file for older versions of OpenIFS (38r1 and 40r1). A single line change is required to the configuration file in make/cfg. Find the configuration you are using, for example, if OIFS_COMP=gnu and OIFS_BUILD=opt, edit make/cfg/gnu-opt.cfg and look for the line:
change this line to use the ecCodes GRIB libraries instead:
Note that the {?} means this configuration variable can be overwritten by a shell environment variable of the same name. For example, setting the environment variable:
would achieve the same change, for ALL configurations. However, it is better to edit the files directly on first installation to make this a more permanent change. Note the use of the backslash before the dollar sign to prevent the shell from expanding the OIFS_GRIB_DIR variable. |
Compiling OpenIFS
Once the environment variables are set, OpenIFS can be compiled (make sure you have edited your PATH environment variable to add the FCM installation /bin
directory). Assuming you are in the directory where the OpenIFS source code was unpacked:
...