Skip to content

Commit bf15d53

Browse files
committed
docs: add some developer notes about the test suite
1 parent 61569d4 commit bf15d53

File tree

3 files changed

+87
-1
lines changed

3 files changed

+87
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
============================
2+
GitHub Actions CI Test Suite
3+
============================
4+
5+
We run a series of automatic tests to ensure the model compiles and runs with various features enabled.
6+
7+
If you want to add a new test, you can add a new test configuration under ``.github/workflows``, using the main configuration as an example. Each test will:
8+
9+
* Compile FESOM in an Ubuntu container
10+
* Prepare a minimal test run folder with appropriate namelists
11+
* Run one day, with one restart
12+
* Run a checksum comparison of produced output vs. precomputed "known truths"
13+
14+
15+
You may need to add a specific mesh or specific input files. Some important locations are:
16+
17+
* ``./test/meshes`` for grids. Please try to use a PI mesh (or something similarly small)
18+
* ``./test/input/`` for forcing files. If you need these copied into the work folder, you will need to add those steps to your GitHub Actions workflow defintion! An example is provided in the iceberg test, where we include some non-standard input files.
19+
20+
21+
For questions regarding the test suite, please get in touch with [email protected] (GitHub @pgierz).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
==============================================
2+
Running FESOM's CI Jobs without GitHub Actions
3+
==============================================
4+
5+
To run and fine-tune the FESOM CI jobs, you can use docker/singularity to launch the same
6+
container that the jobs run in.
7+
8+
Example on Albedo
9+
-----------------
10+
11+
.. code-block::
12+
13+
$ module load apptainer
14+
Module for apptainer version 1.1.7 loaded
15+
$ git clone https://github.com/FESOM/fesom2.git
16+
Cloning into 'fesom2'...
17+
remote: Enumerating objects: 26648, done.
18+
remote: Counting objects: 100% (400/400), done.
19+
remote: Compressing objects: 100% (179/179), done.
20+
remote: Total 26648 (delta 260), reused 247 (delta 204), pack-reused 26248 (from 3)
21+
Receiving objects: 100% (26648/26648), 135.92 MiB | 41.51 MiB/s, done.
22+
Resolving deltas: 100% (19037/19037), done.
23+
Updating files: 100% (688/688), done.
24+
# In the next line, replace computing.computing with your SLURM account
25+
$ srun -A computing.computing singularity pull fesom2-ci.sif docker://ghcr.io/fesom/fesom2_docker:fesom2_test_refactoring-master
26+
INFO: Converting OCI blobs to SIF format
27+
INFO: Starting build...
28+
2025/02/14 13:59:23 info unpack layer: sha256:31e907dcc94a592a57796786399eb004dcbba714389fa615f5efa05a91316356
29+
2025/02/14 13:59:24 info unpack layer: sha256:d63063514200d35fd93aabad3af880cadda8716a3c35f86c66d6e93e0fcda303
30+
2025/02/14 13:59:34 warn rootless{usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-ptp-helper} ignoring (usually) harmless EPERM on setxattr "security.capability"
31+
2025/02/14 13:59:55 info unpack layer: sha256:6fe2fecbd7fe377d431f3ffec826b32068530fdb7f127e4fc1410233a0a0059c
32+
2025/02/14 13:59:55 info unpack layer: sha256:b575551b9253c2a15679059d003335d83a63bb42a182b10c2415d4f7e4dfc516
33+
2025/02/14 14:00:05 info unpack layer: sha256:45d449d7d266f873dcfe8ded709f9205ba2b7bfe723406064f746da70149126d
34+
2025/02/14 14:00:05 info unpack layer: sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
35+
2025/02/14 14:00:05 info unpack layer: sha256:f8cf99cd14bc14cbf0e4fed16961c0d5ecc48a47dccf89be8e8079a4129a59af
36+
2025/02/14 14:00:08 info unpack layer: sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1
37+
2025/02/14 14:00:08 info unpack layer: sha256:91697b90f8ddf44ede09eb97fd8cf9c8fa6f9b4ed00c5671a481683a95f3bed8
38+
INFO: Creating SIF file...
39+
$ singularity run -B $(pwd)/fesom2:/fesom/fesom2 fesom2-ci.sif /bin/bash
40+
41+
This gets you into the container! Now, you can follow the rest of the steps here: https://github.com/FESOM/FESOM2_Docker/blob/master/fesom2_test/Readme.md
42+
43+
From inside the container
44+
-------------------------
45+
46+
.. code-block::
47+
48+
$ cd /fesom/fesom2
49+
$ bash -l configure.sh ubuntu # Compile the model (ubuntu settings used since the container is ubuntu based)
50+
51+
Prepare the run with whatever test you want to run:
52+
53+
.. code-block::
54+
55+
$ mkrun pi test_pi -m docker
56+
57+
Now, run the test simulation:
58+
59+
.. code-block::
60+
61+
$ cd work_pi
62+
$ ./job_docker_new
63+

docs/index.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Authors
4343
isoneutral_diffusion_triangular_prisms
4444
zreferences
4545
code_documentation/io_mesh_info
46+
developer_documentation/github_actions_test_suite
47+
developer_documentation/running_the_test_suite_offline
4648

4749

4850
Proposed structure:
@@ -100,4 +102,4 @@ Indices and tables
100102

101103
* :ref:`genindex`
102104
* :ref:`modindex`
103-
* :ref:`search`
105+
* :ref:`search`

0 commit comments

Comments
 (0)