Supported environments#
Supported Hardware#
ICON is tested during development on different hardware platforms
CPU: AMD Epic, Intel Xeon and several others
GPU: Nvidia A100, AMD MI250x
Vector: NEC Aurora
For special tasks ICON has been successfully run on
Fujitsu A64FX arm
Docker Containers#
The easiest way to build and run ICON on your personal machine is to use Docker images from the iconmodel
repository on Docker Hub.
We recommend building and running ICON inside the container while managing and editing the source code separately in another terminal, utilizing the tools available on your machine. This scenario implies that the directory with ICON source code is located on the host machine and mounted to the container. You will also need to mount a so-called pool
directory containing ICON input files, e.g. grid files. The contents and the layout of the directory depend on the experiment you want to run and are not covered in this document.
Run the container in interactive mode as follows:
docker run -it -v /path/to/icon-src:/home/icon/icon -v /path/to/pool:/home/icon/pool iconmodel/icon-dev
where /path/to/icon-src
and /path/to/pool
are paths to ICON source and pool
directories on your machine, and /home/icon/icon
and /home/icon/pool
are respective mount points of the directories inside the container.
As a result of the previous command, you will get an interactive command prompt of the container. You can now configure, build and run ICON using the following commands as a reference:
cd ./icon
./config/generic/gcc
make -j4
./make_runscripts atm_tracer_Hadley
cd ./run
./exp.atm_tracer_Hadley.run
Further tested platforms and tools#
This section provides basic instructions on how to install most commonly required subset of ICON dependencies on different operating systems using relevant package managers.
macOS with MacPorts#
Tested on macOS Sequoia 15.3
.
Most of the required software packages are either already available on the system or installed together with the Command Line Tools for Xcode, which are a prerequisite for MacPorts. The rest of the required software can be installed by running the following commands:
# Install building tools and ICON dependencies:
sudo port -N install \
cmake \
gcc14 \
mpich-gcc14 \
hdf5 +hl+threadsafe+szip \
netcdf \
netcdf-fortran +gcc14 \
eccodes \
libxml2
# Install libfyaml, which is currently not available via MacPorts:
curl -OL https://github.com/pantoniou/libfyaml/releases/download/v0.8/libfyaml-0.8.tar.gz
tar xvf libfyaml-0.8.tar.gz
cd libfyaml-0.8
./configure --prefix=/opt/local
make -j
sudo make install
# The command above can be reverted as follows:
# curl -OL https://github.com/pantoniou/libfyaml/releases/download/v0.8/libfyaml-0.8.tar.gz
# tar xvf libfyaml-0.8.tar.gz
# cd libfyaml-0.8
# ./configure --prefix=/opt/local
# sudo make uninstall
# Select the compiler and MPI compiler wrappers:
sudo port select --set gcc mp-gcc14
sudo port select --set mpi mpich-gcc14-fortran
hash -r
# Install optional tools:
sudo port -N install cdo +netcdf
macOS with Homebrew#
Tested on macOS Sequoia 15.3
.
Most of the required software packages are either already available on the system or installed together with the Command Line Tools for Xcode, which are a prerequisite for Homebrew. The rest of the required software can be installed by running the following commands:
# Install building tools and ICON dependencies:
brew install \
cmake \
eccodes \
gcc \
hdf5 \
libfyaml \
libxml2 \
mpich \
netcdf \
netcdf-fortran
# Install optional tools:
brew install cdo
Ubuntu with Apt#
Tested on Ubuntu Noble Numbat 24.04.2 LTS
.
# Install building tools and ICON dependencies:
sudo apt install -y \
build-essential \
cmake \
python3 \
gcc \
gfortran \
libopenmpi-dev \
libhdf5-dev \
libnetcdf-dev \
libnetcdff-dev \
libeccodes-dev \
libblas-dev \
liblapack-dev \
libfyaml-dev \
libxml2-dev
# Select MPI libraries and compiler wrappers
sudo update-alternatives --set mpi /usr/bin/mpicc.openmpi
sudo update-alternatives --set mpirun /usr/bin/mpirun.openmpi
# If the previous non-interactive commands fail,
# attempt the following interactive alternatives:
# sudo update-alternatives --config mpi
# sudo update-alternatives --config mpirun
# Install optional tools:
sudo apt install -y cdo
Arch Linux with Pacman#
Tested on Arch Linux 2023.07.23
.
# Install building tools and ICON dependencies:
sudo pacman -S --noconfirm \
base-devel \
git \
cmake \
python \
gcc-fortran \
openmpi \
hdf5 \
netcdf \
netcdf-fortran \
blas \
lapack \
libxml2
# Install libfyaml from the Arch User Repository:
( git clone https://aur.archlinux.org/libfyaml.git && cd libfyaml && makepkg -csi --noconfirm )
# Install ecCodes from the Arch User Repository:
( git clone https://aur.archlinux.org/eccodes.git && cd eccodes && makepkg -csi --noconfirm )
# Install optional tools:
sudo pacman -S --noconfirm rsync
# Install CDO and its extra dependencies from the Arch User Repository:
( git clone https://aur.archlinux.org/udunits.git && cd udunits && makepkg -csi --noconfirm )
( git clone https://aur.archlinux.org/magics++.git && cd magics++ && makepkg -csi --noconfirm )
( git clone https://aur.archlinux.org/cdo.git && cd cdo && makepkg -csi --noconfirm )