Home

Awesome

<a href="https://GridTools.github.io/gridtools"><img src="https://raw.githubusercontent.com/GridTools/gridtools/gh-pages/v1.0/_static/logo.svg"/></a> <br/><br/> <a target="_blank" href="https://opensource.org/licenses/BSD-3-Clause">License: BSD</a> <a target="_blank" href="https://join.slack.com/t/gridtools/shared_invite/zt-1mceuj747-59swuowC3MKAuCFyNAnc1g"><img src="https://img.shields.io/badge/slack-join-orange?logo=slack"></a> Gitpod Ready-to-Code

The GridTools framework is a set of libraries and utilities to develop performance portable applications in the area of weather and climate. To achieve the goal of performance portability, the user-code is written in a generic form which is then optimized for a given architecture at compile-time. The core of GridTools is the stencil composition module which implements a DSL embedded in C++ for stencils and stencil-like patterns. Further, GridTools provides modules for halo exchanges, boundary conditions, data management and bindings to C and Fortran.

GridTools is successfully used to accelerate the dynamical core of the COSMO model with improved performance on CUDA-GPUs compared to the current official version, demonstrating production quality and feature-completeness of the library for models on lat-lon grids. The GridTools-based dynamical core is shipped with COSMO v5.7 and later, see release notes COSMO v5.7.

Although GridTools was developed for weather and climate applications it might be applicable for other domains with a focus on stencil-like computations.

A detailed introduction can be found in the documentation.

Installation instructions

git clone https://github.com/GridTools/gridtools.git
cd gridtools
mkdir -p build && cd build
cmake ..
make -j8
make test

For choosing the compiler, use the standard CMake techniques, e.g. setting the environment variables

CXX=`which g++` # full path to the C++ compiler
CC=`which gcc` # full path to theC compiler
FC=`which gfortran` # full path to theFortran compiler
CUDACXX=`which nvcc` # full path to NVCC
CUDAHOSTCXX=`which g++` # full path to the C++ compiler to be used as CUDA host compiler
Requirements

Supported compilers

The GridTools libraries are currently nightly tested with the following compilers on CSCS supercomputers.

CompilerBackendTested onComments
Cray clang version 12.0.3all backendsPiz DaintP100 GPU
Cray clang version 10.0.2 + NVCC 11.2all backendsPiz DaintP100 GPU
Cray clang version 12.0.3all backendsPiz Daintwith -std=c++20
GNU 11.2.0 + NVCC 11.0all backendsPiz DaintP100 GPU
GNU 11.2.0 + NVCC 11.2all backendsDomP100 GPU
GNU 8.3.0 + NVCC 11.2all backendsTsaV100 GPU
Known issues
Partly supported (expected to work, but not tested regularly)
CompilerBackendDateComments
Intel 19.1.1.217all backends2021-09-30with cmake . -DCMAKE_CXX_FLAGS=-qnextgen
NVHPC 23.3all backends2023-04-20only compilation is tested regularly in CI
ROCm 6.0.3all backends2024-09-24tested on AMD MI250X (LUMI)

Contributing

Contributions to the GridTools framework are welcome. Please open an issue for any bugs that you encounter or provide a fix or enhancement as a PR. External contributions to GridTools require us a signed copy of a copyright release form to ETH Zurich. We will contact you on the PR.