...
Code Block | ||
---|---|---|
| ||
cd grib_api_1.9.18
CC=gcc FC=gfortran \
CCFLAGS="-g -O2 -m64 -march=native" FCFLAGS="-g -O2 -m64 -march=native" \
./configure --prefix=../grib_api_gcc --enable-pthread --disable-jpeg --disable-omp-packing |
Note the use of the backslash '\' to allow the command to use two lines.
...
--prefix=../grib_api_gcc | This 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-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-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. | --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. |
Warning | ||
---|---|---|
| ||
There is a known bug with 1.9.18 grib_api that when the --disable-<feature> (e.g. --disable-vector) option is used, it has the reverse effect and actually enables the option. In most cases the default option is the preferred one. Any issues or questions can be sent to openifs-suppport@ecmwf.int. |
Info | ||
---|---|---|
| ||
The The --enable-python option enables the python interface and is optional but might be useful if you intend to use/write software to access the GRIB output files. If the make fails because of a missing numpy header file you should add the --disable-numpy option. The --enable-vector option should be used on vector based computers (e.g. NEC). Grib_api will then use a more efficient packing/unpacking method suitable for vector hardware. n.b. there is a bug in the 1.9.18 release that if the --disable-vector option is used, this has the reverse effect of enabling the vector code. See grib_api issue GRIB-269 for more details. |
...