Skip to content
Draft
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
5 changes: 3 additions & 2 deletions docs/alps/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* [Alps](index.md)
* [Santis](santis.md)
* [Eiger](eiger.md)
* [Balfrin](balfrin.md)
* [Eiger](eiger.md)
* [Santis](santis.md)
6 changes: 6 additions & 0 deletions docs/alps/balfrin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Balfrin

Balfrin is an Alps cluster used by MeteoSwiss.

C2SM does not officially support Balfrin. Nevertheless, you can find instructions on how
to set up ICON on Balfrin at the [Compile section of ICON](../models/icon/compile.md#balfrin).
2 changes: 1 addition & 1 deletion docs/events/icon_meetings/2022-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ BG says EXTPAR can process the CORINE dataset. She didn’t get any errors but h
### General
WS asks if there are any news about the ICON seamless effort.
MA cannot give any more stable information.
JB will send mail. There is information on the [COSMO website :material-open-in-new:](https://www.cosmo-model.org/content/tasks/workGroups/wg3b/default.htm){:target="_blank"}.
JB will send mail. There is information on the [COSMO website :material-open-in-new:](https://www.cosmo-model.org/content/tasks/workGroups/wgPHY/default.htm){:target="_blank"}.

DB sends a reminder about the COSMO/ICON user workshop on 2 February. Please send him your registration and indicate if you want to present a poster.
176 changes: 98 additions & 78 deletions docs/models/icon/compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,94 +34,22 @@ Clone the ICON repository:
```


### Säntis
### Balfrin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the compile instructions, can we change the order:

  1. santis
  2. euler
  3. eiger
  4. balfrin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that's really disturbing, because there seems to be no order in that. I would rather go for an alphabetic order.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't call it disturbing. I just find it confusing that our officially supported clusters appear after Eiger and Balfrin. I think most of our users would then have to scroll through until they reach what they are looking for.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But they can just click on whatever machine they are using. No need for scrolling. I think our users are smarter than you think!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also why are you reviewing a merge request I haven't even opened for review?!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some users are faster than you think ;)


Run the following after navigating into ICON root folder:
Run the following after navigating into the ICON root folder:

=== "CPU compilation"
```console
UENV_VERSION=$(cat config/cscs/SANTIS_ENV_TAG)
uenv run ${UENV_VERSION} -- ./config/cscs/santis.cpu.nvhpc
./config/cscs/alps_mch.cpu.nvidia
```

=== "GPU compilation"
```console
UENV_VERSION=$(cat config/cscs/SANTIS_ENV_TAG)
uenv run ${UENV_VERSION} -- ./config/cscs/santis.gpu.nvhpc
```

!!! info "User environments and out-of-source builds"

If you have never used a uenv on Säntis, you need to create a uenv repo first:
```
uenv repo create
```

In case you are using the uenv version for the first time, you need to pull the image first:
```
uenv image pull $UENV_VERSION
```


#### Building out-of-source

Out-of-source builds are useful if you want to have two or more compiled versions of ICON in the same repository.
To achieve that, you simply need to create separate folders in the ICON root folder
and run the configure wrapper from there.

For example, if you want to compile ICON both for `cpu` and `gpu`, create those directories:

```bash
mkdir nvhpc_cpu
mkdir nvhpc_gpu
```

Then, navigate into the corresponding folder and source the configure wrapper for compilation:

=== "`cpu`"
```bash
UENV_VERSION=$(cat config/cscs/SANTIS_ENV_TAG)
cd nvhpc_cpu
uenv run ${UENV_VERSION} -- ./../config/cscs/santis.cpu.nvhpc
```
=== "`gpu`"
```bash
UENV_VERSION=$(cat config/cscs/SANTIS_ENV_TAG)
cd nvhpc_gpu
uenv run ${UENV_VERSION} -- ./../config/cscs/santis.gpu.nvhpc
./config/cscs/alps_mch.gpu.nvidia
```

### Euler

Navigate into the ICON root folder.

Now, set up your spack instance:

```bash
# Setup spack
SPACK_TAG=$(cat "config/ethz/SPACK_TAG_EULER")
git clone --depth 1 --recurse-submodules --shallow-submodules -b ${SPACK_TAG} https://github.com/C2SM/spack-c2sm.git
. spack-c2sm/setup-env.sh
```

Euler Support recommends to compile code on compute nodes. There,
we can take advantage of multi-core compiling.
However, we need to load the module `eth_proxy`, which enables connecting from a compute node
to an external service, e.g. GitHub or GitLab.

```console
module load eth_proxy
```
You can run the above scripts out-of-source also.

Now, activate the spack environment and build ICON:

```bash
# Build ICON
# For out-of-source builds: navigate into the build folder and
# adapt the path to the Spack environment in the following
spack env activate -d config/ethz/spack/${SPACK_TAG}/euler_cpu_gcc
srun -N 1 -n 12 --mem-per-cpu=1G spack install -j 12
```

### Eiger

Expand Down Expand Up @@ -229,4 +157,96 @@ spack concretize
spack install
```

`concretize` resolves dependencies, and `install` builds the packages.
`concretize` resolves dependencies, and `install` builds the packages.


### Euler

Navigate into the ICON root folder.

Now, set up your spack instance:

```bash
# Setup spack
SPACK_TAG=$(cat "config/ethz/SPACK_TAG_EULER")
git clone --depth 1 --recurse-submodules --shallow-submodules -b ${SPACK_TAG} https://github.com/C2SM/spack-c2sm.git
. spack-c2sm/setup-env.sh
```

Euler Support recommends to compile code on compute nodes. There,
we can take advantage of multi-core compiling.
However, we need to load the module `eth_proxy`, which enables connecting from a compute node
to an external service, e.g. GitHub or GitLab.

```console
module load eth_proxy
```

Now, activate the spack environment and build ICON:

```bash
# Build ICON
# For out-of-source builds: navigate into the build folder and
# adapt the path to the Spack environment in the following
spack env activate -d config/ethz/spack/${SPACK_TAG}/euler_cpu_gcc
srun -N 1 -n 12 --mem-per-cpu=1G spack install -j 12
```

### Säntis

Run the following after navigating into the ICON root folder:

=== "CPU compilation"
```console
UENV_VERSION=$(cat config/cscs/SANTIS_ENV_TAG)
uenv run ${UENV_VERSION} -- ./config/cscs/santis.cpu.nvhpc
```

=== "GPU compilation"
```console
UENV_VERSION=$(cat config/cscs/SANTIS_ENV_TAG)
uenv run ${UENV_VERSION} -- ./config/cscs/santis.gpu.nvhpc
```

!!! info "User environments and out-of-source builds"

If you have never used a uenv on Säntis, you need to create a uenv repo first:
```
uenv repo create
```

In case you are using the uenv version for the first time, you need to pull the image first:
```
uenv image pull $UENV_VERSION
```


#### Building out-of-source

Out-of-source builds are useful if you want to have two or more compiled versions of ICON in the same repository.
To achieve that, you simply need to create separate folders in the ICON root folder
and run the configure wrapper from there.

For example, if you want to compile ICON both for `cpu` and `gpu`, create those directories:

```bash
mkdir nvhpc_cpu
mkdir nvhpc_gpu
```

Then, navigate into the corresponding folder and source the configure wrapper for compilation:

=== "`cpu`"
```bash
UENV_VERSION=$(cat config/cscs/SANTIS_ENV_TAG)
cd nvhpc_cpu
uenv run ${UENV_VERSION} -- ./../config/cscs/santis.cpu.nvhpc
```
=== "`gpu`"
```bash
UENV_VERSION=$(cat config/cscs/SANTIS_ENV_TAG)
cd nvhpc_gpu
uenv run ${UENV_VERSION} -- ./../config/cscs/santis.gpu.nvhpc
```