Log In | Users | Register

Build, Compile and run ICON

History of this page

October 2017: Here is a summary of the introduction Will Sawyer gave on 17th of October 2017 to build, compile and run the tests of icon-release-2.3.00 on Piz Daint (CSCS).

July 2019 : Updated by C. Siegenthaler for C2SM-ICON organisation, on Piz Daint, using CPUs only. Only teh compilers gcc and cray are working.

August 2019: Adaptation of the recipe for other supercomputers, eg euler.ethz.ch.

To have access to the C2SM-ICON organisation, please contact colombe.siegenthaler@env.ethz.ch.

Running ICON

1) The following procedure was done directly in scratch:


2) Clone:

git clone git@github.com:C2SM-ICON/icon.git icon

3) Change directory:

cd icon

4) Configure

Note : For Piz Daint, [compiler_you_want] can be gcc OR cray. The other compilers does not work at the moment.

For Euler, [compiler_you_want] can be ??

 ./configure --with-fortran=[compiler_you_want]
Note: for Bernhard LAM run (NWP physics), only the compiler gcc works.

5) Set the machine specific commands (eg. account number for batch system).

In the function set_run_target_daint_cpu() (config/create_target_header), the machine specific commands are defined, especially sbatch commands. This function will be called when creating the running scripts by make_runscripts.

I like to add the account number directly in there, so it automatically comes into the runscript when using make_runscripts: -> in set_run_target_daint_cpu() (file config/create_target_header), in the sbatch commands definition, add

#SBATCH --account=[your_project_number]

6) Build (compile) the code:


7) Modify the machine-independent running script located in the run directory (for example run/exp.atm_amip, or create a new one by copiing run/exp.atm_amip into run/exp.my_exp). The latter script is not the running script, the running script "run/exp.my_exp.run" will be created by make_runscripts.

For example : You can change the output frequency of the files to 1 month : checkpoint_interval="P1M", restart_interval="P1M", file_interval="P1M". For 6h output data in the file: output_interval="PT6H" The time format is following the ISO-8601 duration string standard, for more info about the time stamp format, please consult the document Namelist_overview.pdf located in the doc folder of your icon distribution.

8) Construct the runscript for your experiment (this command takes a machine-independent setting file located in the run folder run/exp.my_exp, and write a running script for the specific machine, by calling config/create_target_header). The output is the running script run/exp.my_exp.run :

 ./make_runscripts my_exp

9) Go in run directoy

 cd run

10) Edit exp.my_exp.run and choose number of nodes you want to use :

#SBATCH --nodes=XX 

11) submit the job

sbatch --time=01:30:00 exp.my_exp.run 

GCC compiler LAM mode (Bernhard's case)

Replace the above points by the points below:

4) Configure with gcc

 ./configure --with-fortran=gcc

7) & 8) skip

10) copy the run script you want to use (the last I was using can be found here, it is pretty similar to one Bernhard gave me) and put it into run.:

cp /project/s903/colombsi/icon-LAM-perfs/icon-eniac_gcc/run/sim.13k_nonest.run .
and modify the above script according to your need. Particularly, change the paths /scratch/snx1600/colombsi/icon-eniac_gcc/ to the path to your model and choose number of nodes you want to use :
#SBATCH --nodes=XX .

Note: Take care that you cannot use a too small number of nodes (for example 1), icon have memory problems. I tried to use 1 node and got the following error message quite at the beginning (cf /project/s652/colombsi/icon-LAM-perfs/icon-eniac_gccrun/LOG.sim.13k_nonest_n1.run.9920273.o): FATAL ERROR in mo_var_list:add_var_list_element_5d: allocation of array coeff2_dwdz failed

Input files

Piz Daint

Will/Colombe downloaded a lot of data directly from mistral. More grid files can be downloaded if there is an interest. You can find the data on store :

All the data should be readable by anyone. Some of the folder are links to files located on the scratch :

Cases from the DWD tutorial (in 2017) can be found also on store:



A preliminary version of the input files can be found here:

Cases from the DWD tutorial (in 2017) can be found also on store:



* The Cray computer used by DWD is similar to Piz Daint (but without GPU)

* At the demo in october 2017, it was the fisrt time that Will did not need to cross compile. In case a cross-compilation is needed, the configuration command should be the following (please check):

./configure --with-fortran=cray --build=x86_64-cray-linux  --host=x86_64-unknown-linux-gnu

* For access to buildbot (buildbot.zmaw.de/icon/waterfall), you should ask Luis or Reinhard. spacer

This site is managed by the Center for Climate Systems Modeling (C2SM).
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems? Send feedback!