Skip to content

Commit

Permalink
Load probtest env
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnikaLau committed Nov 29, 2024
1 parent 2f45edf commit 445a8c5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions docs/models/icon/large_use_cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ Then follow the instructions in [Configure and compile :material-open-in-new:](u

Before adding anything to the official ICON, we recommend you to run all tests locally first starting with CPU.

For running the check scripts in the following, you need to have loaded a probtest environment and CDO and export `BB_NAME` to your builder. E.g. for Piz Daint:
```bash
source /project/g110/icon/probtest/conda/miniconda/bin/activate probtest
module load daint-gpu CDO
export BB_NAME=daint_cpu_nvidia
```

#### Test on CPU

To ensure that there are no basic issues with the namelist, we recommend to start testing on CPU before going over to GPU testing. Create the check file and run the test locally in the folder you built CPU in (set `EXP=<exp_name>`):
Expand Down
10 changes: 8 additions & 2 deletions docs/models/icon/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ To [set up a Spack instance :material-open-in-new:](https://c2sm.github.io/spack

Refer to the official spack-c2sm documentation for [installing ICON using Spack :material-open-in-new:](https://c2sm.github.io/spack-c2sm/latest/QuickStart.html#icon){:target="_blank"}.

After the first compilation on GPU, you need to create a `setting` file:
After the first compilation, you need to create a `setting` file (the following example is for Piz Daint, please adapt the lines according to the machine you are using):

=== "daint_gpu_nvhpc"
```shell
# Get SPACK_TAG used on machine
SPACK_TAG=$(cat "config/cscs/SPACK_TAG_C2SM")
ENV_NAME=daint_gpu_nvhpc # modify if necessary
# Set the name of the environment, which should be equal to the builder
ENV_NAME=daint_gpu_nvhpc
# Load probtest environment (only needed if you want to run check files)
source /project/g110/icon/probtest/conda/miniconda/bin/activate probtest
# Ensure CDO is loaded on your machine
module load daint-gpu CDO
# Remove and create setting file with the following two commands
rm -f setting
./config/cscs/create_sh_env $SPACK_TAG $ENV_NAME
```
Expand Down

0 comments on commit 445a8c5

Please sign in to comment.