Newer
Older
Okke van Eck
committed
ecTrans
*******
Okke van Eck
committed
Introduction
============
Okke van Eck
committed
ecTrans is the global spherical Harmonics transforms library, extracted from the IFS.
It contains both CPU and GPU (Nvidia) code-paths.
The CPU version uses a hybrid of MPI and OpenMP parallelisation strategies, while the GPU version combines MPI and OpenACC.
A default installation builds both CPU libraries (trans_sp, trans_dp) and various flavours of GPU libraries in (trans_gpu_{sp/dp} shared library, trans_gpu_static_{sp/dp} static library, trans_gpu_static_CA_{sp/dp} static library requiring CUDA-aware MPI implementation), as well as a C interface to the double-precision version (transi_dp). A simple benchmark driver is also built against each of these libraries, allowing simple testing of the transforms.
Okke van Eck
committed
License
=======
Okke van Eck
committed
ecTrans is distributed under the Apache License Version 2.0.
See `LICENSE` file for details.
Okke van Eck
committed
Installing ecTrans
==================
Okke van Eck
committed
Supported Platforms
-------------------
Okke van Eck
committed
- Linux
- Apple MacOS
Okke van Eck
committed
Other UNIX-like operating systems may work too out of the box.
Okke van Eck
committed
The GPU codepath has only been tested with NVHPC compilers on recent Nvidia GPUs.
Okke van Eck
committed
Requirements
------------
- Fortran compiler with OpenMP support
- C compiler
- FIAT (see https://github.com/ecmwf-ifs/fiat )
- ecBuild (see https://github.com/ecmwf/ecbuild)
- CMake (see https://cmake.org)
- A BLAS library
Okke van Eck
committed
Further optional recommended dependencies:
- FFTW (http://www.fftw.org)
Okke van Eck
committed
For the GPU libraries :
- Fortran compiler with OpenACC support
- CUDA toolkit (compiler, and CUBLAS and CUFFT libraries)
Okke van Eck
committed
Building ecTrans
----------------
Okke van Eck
committed
Building and installing Trans happens via CMake, which provides automatic detection for
third-party libraries in standard locations and helps cross-plaform portability.
There are multiple ways to help CMake discover packages in non-standard locations.
One explicit way is to e.g. set environment variables for each dependency.
Okke van Eck
committed
Environment variables
Okke van Eck
committed
$ export ecbuild_ROOT=<path-to-ecbuild>
$ export fiat_ROOT=<path-to-fiat>
$ export CC=<path-to-C-compiler>
$ export FC=<path-to-Fortran-compiler>
Okke van Eck
committed
You must compile FIAT out-of-source, so create a build-directory (anywhere)
Okke van Eck
committed
$ mkdir build && cd build
Configuration of the build happens through standard CMake
Okke van Eck
committed
$ cmake
Okke van Eck
committed
Extra options can be added to the `cmake` command to control the build:
Okke van Eck
committed
- `-DCMAKE_BUILD_TYPE=<Debug|RelWithDebInfo|Release|Bit>` default=RelWithDebInfo (typically `-O2 -g`)
- `-DENABLE_TESTS=<ON|OFF>` default=ON
- `-DENABLE_SINGLE_PRECISION=<ON|OFF>` default=ON
- `-DENABLE_DOUBLE_PRECISION=<ON|OFF>` default=ON
- `-DENABLE_TRANSI=<ON|OFF>` default=ON
- `-DENABLE_MKL=<ON|OFF>` default=ON
- `-DENABLE_FFTW=<ON|OFF>` default=ON
- `-DENABLE_GPU=<ON|OFF>` default=OFF
- `-DCMAKE_INSTALL_PREFIX=<install-prefix>`
Okke van Eck
committed
More options to control compilation flags, only when defaults are not sufficient
Okke van Eck
committed
- `-DCMAKE_Fortran_FLAGS=<fortran-flags>`
- `-DCMAKE_C_FLAGS=<c-flags>`
Okke van Eck
committed
Additional option for the GPU code, allowing to reduce memory consumption on the GPU at the
cost of slower execution:
Okke van Eck
committed
- `-DENABLE_REDUCED_MEMORY=ON`
Okke van Eck
committed
Once this has finished successfully, run ``make`` and ``make install``.
Okke van Eck
committed
Optionally, tests can be run to check succesful compilation, when the feature TESTS is enabled (`-DENABLE_TESTS=ON`, default ON)
Okke van Eck
committed
$ ctest
Okke van Eck
committed
The benchmark drivers are found in the bin directory.
A brief description of available command-line arguments can be obtained with e.g.
ectrans-benchmark-sp --help
Okke van Eck
committed
Reporting Bugs
==============
Okke van Eck
committed
TODO
Okke van Eck
committed
Contributing
============
TODO