Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix large use case #223

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/models/icon/large_use_cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ We recommend you to do out-of-source builds for CPU and GPU so that you can have
mkdir nvhpc_cpu
cd nvhpc_cpu
cp -r ../config ../scripts .
cd ..
mkdir nvhpc_gpu
cd nvhpc_gpu
cp -r ../config ../scripts .
cd ..
```

Then follow the instructions in [Configure and compile :material-open-in-new:](usage.md/#configure-and-compile){:target="_blank"} to compile ICON on CPU and on GPU from within those folders.
Expand All @@ -67,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 fist compilation, 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