eccodes/INSTALL

62 lines
2.5 KiB
Plaintext
Raw Permalink Normal View History

How to build and install ecCodes library/tools
================================================
2013-03-25 12:04:10 +00:00
Building and installation has been tested on several platforms and with several compilers.
However for some platforms modifications to the installation engine may be required.
2023-06-14 10:05:57 +00:00
If you encounter any problems during the installation procedure, please visit our Support Portal:
2013-03-25 12:04:10 +00:00
2023-06-14 10:05:57 +00:00
https://support.ecmwf.int
2013-03-25 12:04:10 +00:00
Installation using CMake
------------------------
This is the recommended method of installation.
However it requires that cmake be installed on your system.
2013-03-25 12:04:10 +00:00
2019-01-28 12:47:22 +00:00
1. Download ecCodes from https://confluence.ecmwf.int/display/ECC/Releases
2013-03-25 12:04:10 +00:00
2. Unpack distribution:
> tar -xzf eccodes-x.y.z-Source.tar.gz
2013-03-25 12:04:10 +00:00
2020-08-09 12:20:05 +00:00
3. Create a separate directory to build ecCodes:
> mkdir build
> cd build
2013-03-25 12:04:10 +00:00
2015-10-08 09:56:25 +00:00
4. Run cmake pointing to the source and specify the installation location:
> cmake ../eccodes-x.y.z-Source -DCMAKE_INSTALL_PREFIX=/path/to/where/you/install/eccodes
2013-03-25 12:04:10 +00:00
2018-12-11 12:16:34 +00:00
It is recommended that you always build in a clean directory and also install into a clean directory.
2015-10-08 09:56:25 +00:00
5. Compile, test and install:
> make
2015-10-08 09:56:25 +00:00
> ctest
> make install
2013-03-25 12:04:10 +00:00
To add the Python3 bindings, use pip3 install from PyPI as follows:
> pip3 install eccodes
2019-06-12 17:38:12 +00:00
or
> pip3 install --install-option="--prefix=/path/to/where/you/install/eccodes" eccodes
2019-06-11 16:15:06 +00:00
2015-12-09 18:15:38 +00:00
You can also pass options to the cmake command above. Some typical examples are:
2018-12-11 12:16:34 +00:00
-DENABLE_EXTRA_TESTS=ON Enable extended regression testing
2016-11-11 11:07:07 +00:00
-DENABLE_NETCDF=ON Enable GRIB to netCDF conversion
2016-08-25 12:11:05 +00:00
-DENABLE_ECCODES_THREADS=ON Enable POSIX threads
2015-12-09 18:15:38 +00:00
-DENABLE_JPG=ON Enable JPEG encoding/decoding (for GRIB packing)
-DCMAKE_Fortran_COMPILER=pgf90 Set Fortran compiler to Portland Group F90 compiler
2023-01-29 14:24:19 +00:00
-DCMAKE_CXX_FLAGS="-O2 -Wall" Prepend the specified flags at the front
of the compilation command for C++ source files
2013-03-25 12:04:10 +00:00
2018-12-11 12:16:34 +00:00
By default the ctest step above does NOT require any data to be downloaded and only runs basic sanity tests.
However if you wish to exercise more of the functionality of ecCodes, you are advised to configure the build with:
> cmake ... -DENABLE_EXTRA_TESTS=ON
In this mode the tests will take longer and you need to be connected to the internet so data files can be downloaded
for the tests.
2020-08-09 12:20:05 +00:00
Also note that if you have several CPUs, you can invoke the "make" and "ctest" commands above in parallel
(e.g. "make -j4", "ctest -j4"). This will speed up the whole build/test process significantly.
For more details, please see:
2019-01-28 12:47:22 +00:00
https://confluence.ecmwf.int/display/ECC/ecCodes+installation