Skip to content

Commit 96cebd1

Browse files
committed
add WRF build guide
1 parent f3e2f49 commit 96cebd1

File tree

7 files changed

+128
-13
lines changed

7 files changed

+128
-13
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[](){#ref-build-applications}
2+
# Application installation guides
3+
4+
This is a collection of installation guides for commonly-used software that is not [officially supported softare][ref-software-sciapps].
5+
6+
!!! note "Contributions welcome!"
7+
The guides here are best effort, and may become out of date.
8+
9+
If you see that a guide is out of date, you are welcome to [propose an update](https://github.com/eth-cscs/cscs-docs/issues) or make a [contribution][ref-contributing].
10+
11+
## Guides
12+
13+
* [WRF][ref-software-packages-wrf]
14+
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
[](){#ref-software-packages-wrf}
2+
# WRF
3+
4+
[The Weather Research & Forecasting Model](https://www.mmm.ucar.edu/models/wrf) (WRF) is a numerical weather prediction system designed for both atmospheric research and weather forecasting.
5+
6+
It is used for CPU-only simulation on [Eiger][ref-cluster-eiger], for which this guide applies.
7+
8+
## Using Spack
9+
10+
Spack provides the [wrf](https://packages.spack.io/package.html?name=wrf) package, which we can install using the [uenv-spack][ref-building-uenv-spack] tool.
11+
12+
First create a working directory where you will install the software.
13+
Here, we create it in your project's [Store][ref-storage-store] path, where the package can be accessed by all users in your project.
14+
```bash
15+
mkdir $STORE/wrf
16+
cd $STORE/wrf
17+
```
18+
19+
Then follow the steups in the [uenv-spack][ref-building-uenv-spack] guide to install `uenv-spack`
20+
21+
```bash
22+
git clone https://github.com/eth-cscs/uenv-spack.git
23+
(cd uenv-spack && ./bootstrap)
24+
```
25+
26+
The [`prgenv-gnu`][ref-uenv-prgenv-gnu] uenv is suitable for building WRF.
27+
```
28+
uenv start prgenv-gnu/24.11:v2 --view=spack
29+
```
30+
In this example we use the latest version of `prgenv-gnu` on Eiger at the time of writing -- check the `prgenv-gnu` [guide][ref-uenv-prgenv-gnu] for the latest version.
31+
32+
```bash
33+
# build the latest version provided by the version of Spack used by prgenv-gnu
34+
$ uenv-spack/uenv-spack $PWD/build --uarch=zen2 --specs=wrf
35+
36+
# build a specific version
37+
$ uenv-spack/uenv-spack $PWD/build --uarch=zen2 [email protected]
38+
39+
# build a specific version with WRF-Chem enabled
40+
$ uenv-spack/uenv-spack $PWD/build --uarch=zen2 [email protected] +chem
41+
```
42+
43+
!!! note
44+
See the wrf Spack [package documentation](https://packages.spack.io/package.html?name=wrf) for information about options that can be enabled disabled.
45+
46+
Finally, it is time to build the software:
47+
48+
```
49+
cd build
50+
./build
51+
```
52+
53+
This will take 30-60 minutes, while Spack builds some dependencies then WRF.
54+
55+
### Using the Spack installation
56+
57+
The installation creates a module file in the `wrf/build` path, that you created.
58+
Let's assume you have installed it in the `$STORE` path for your project, add the following to the top of your sbatch script:
59+
60+
```bash
61+
#SBATCH --uenv=prgenv-gnu/24.11:v2
62+
63+
module use $STORE/wrf/build/modules
64+
module load wrf
65+
```
66+
67+
!!! example "Modules installed by Spack"
68+
Spack creates a module for ever
69+
```console
70+
$ module use $STORE/wrf/build/modules
71+
$ module avail
72+
73+
------------------ /capstor/store/cscs/cscs/csstaff/wrf/build/modules ------------------
74+
boost/1.86.0 kokkos-tools/develop netlib-scalapack/2.2.0
75+
cmake/3.30.5 kokkos/4.4.01 ninja/1.12.1
76+
cray-mpich/8.1.30 libtree/3.1.1 openblas/0.3.28
77+
fftw/3.3.10 lua/5.4.6 osu-micro-benchmarks/5.9
78+
fmt/11.0.2 lz4/1.10.0 python/3.12.5
79+
gcc/13.3.0 meson/1.5.1 superlu/5.3.0
80+
gsl/2.8 netcdf-c/4.9.2 wrf/4.6.1
81+
hdf5/1.14.5 netcdf-cxx/4.2 zlib-ng/2.2.1
82+
kokkos-kernels/4.4.01 netcdf-fortran/4.6.1
83+
84+
$ module load wrf
85+
$ which wrf.exe
86+
/capstor/store/cscs/cscs/csstaff/wrf/build/store/linux-sles15-zen2/gcc-13.3.0/wrf-4.6.1-owj2dsfeslzkulaobdqbad4kh6ojh6n5/main/wrf.exe
87+
```
88+
89+
## Installing by hand
90+
91+
The process for building by hand is more difficult -- so try the Spack approach first, before contacting us.
92+

docs/build-install/index.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,29 @@
22

33
CSCS provides commonly used software and tools on Alps, however many use cases will require first installing software on a system before you can start working.
44

5-
Modern HPC applications and software stacks are often very complicated, and there is no one-size-fits-all method for building and installing them.
5+
<div class="grid cards" markdown>
6+
7+
- :fontawesome-solid-earth-americas: __[Application guides][ref-build-applications]__ – guides on how to install commonly requested or difficult to install software.
68

7-
## Programming environments
9+
</div>
10+
11+
Modern HPC applications and software stacks are often very complicated, and there is no one-size-fits-all method for building and installing them.
812

913
<div class="grid cards" markdown>
1014

1115
- :fontawesome-solid-earth-americas: __[uenv][ref-uenv]__ – uenv provide isolated software environments for applications and developers.
1216

1317
</div>
1418

15-
## Python
16-
17-
There are multiple ways to install Python software.
18-
1919
<div class="grid cards" markdown>
2020

21-
- :fontawesome-brands-python: __[pip]__create a virtual environment using python in a uenv
21+
- :fontawesome-brands-docker: __[Podman][ref-build-containers]__for building software in containers.
2222

2323
</div>
2424

25-
[pip]: pip.md
25+
<div class="grid cards" markdown>
2626

27-
## Containers
27+
- :fontawesome-brands-python: __[Python][ref-build-python]__ – create a virtual environment using python in a uenv.
28+
29+
</div>
2830

29-
CSCS provides [Podman][ref-build-containers] for building software in containers

docs/build-install/pip.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
# Installing Python software with pip
1+
[](){#ref-build-python}
2+
# Installing Python software
23

3-
todo
4+
!!! todo

docs/build-install/uenv.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[](){#ref-building-uenv}
2+
# Building with uenv
3+
14
Uenv are user environments that provide scientific applications, libraries and tools on [Alps][ref-alps].
25
This article explains how to use them to build software.
36

docs/contributing/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[](){#ref-contributing}
12
# Contributing
23

34
This documentation is developed using the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) framework, and the source code for the docs is publicly available on [GitHub](https://github.com/eth-cscs/cscs-docs).

mkdocs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,11 @@ nav:
7272
- 'Building and Installing software':
7373
- build-install/index.md
7474
- 'uenv': build-install/uenv.md
75-
- 'containers (podman)': build-install/containers.md
75+
- 'Containers (podman)': build-install/containers.md
7676
- 'Python with pip': build-install/pip.md
77+
- 'Applications':
78+
- build-install/applications/index.md
79+
- 'WRF': build-install/applications/wrf.md
7780
- 'Debugging and Performance Analysis':
7881
- software/devtools/index.md
7982
- 'Linaro uenv': software/devtools/linaro-uenv.md

0 commit comments

Comments
 (0)