Skip to content

Commit 83a33cb

Browse files
committed
First changes for the third part of the tutorial.
1 parent 6f4dad4 commit 83a33cb

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

docs/2025-LUST/3_Advanced/3_02_hooks.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,17 @@ community:
4242
Some site have really large hook files to implement policies and modify standard EasyBuild build recipes, e.g.,
4343

4444
- [The hooks file from Jülich Supercomputing Centre](https://github.com/easybuilders/JSC/blob/2022/Custom_Hooks/eb_hooks.py)
45-
- ComputeCanada [cc_hooks_common.py](https://github.com/ComputeCanada/easybuild-computecanada-config/blob/main/cc_hooks_common.py)
46-
and [cc_hooks_gento.py](https://github.com/ComputeCanada/easybuild-computecanada-config/blob/main/cc_hooks_gentoo.py)
45+
- Digital Research Alliance of Canada (formerly ComputeCanada)
46+
[cc_hooks_common.py](https://github.com/ComputeCanada/easybuild-computecanada-config/blob/main/cc_hooks_common.py)
47+
and [2023/cc_hooks.py](https://github.com/ComputeCanada/easybuild-computecanada-config/blob/main/2023/cc_hooks.py)
48+
files
4749
- [The hooks file from the EESSI software stack](https://github.com/EESSI/software-layer/blob/main/eb_hooks.py).
48-
[EESSI](https://www.eessi-hpc.org/) is an effort to build a software stack distributed via
49-
[CernVM-FS](https://cernvm.cern.ch/fs/) using EasyBuild to build all software.
50+
[EESSI](https://www.eessi.io/) is an effort to build a software stack distributed via
51+
[CernVM-FS](https://cernvm.cern.ch/fs/) using EasyBuild to build all software.
52+
53+
On LUMI we also use hooks, but the definition file is rather small. e/g/.
54+
[the LUMI hooks file in use since LUMI/22.08](https://github.com/Lumi-supercomputer/LUMI-SoftwareStack/blob/main/easybuild/hooks/LUMI_site_hooks-22.08.py).
55+
5056

5157
## Implementing and using hooks
5258

@@ -90,6 +96,10 @@ These hooks can be implementing by defining a function named ``start_hook`` and
9096
in the Python module file that is provided via the ``hooks`` configuration option.
9197
No arguments are provided when calling these hooks.
9298

99+
*On LUMI, an end hook is used to clear the Lmod cache after installing software as otherwise
100+
a newly installed module may not be found immediately.*
101+
102+
93103
### Parse hook
94104

95105
The ``parse`` hook is triggered right after an easyconfig file is being parsed,
@@ -107,6 +117,7 @@ This hook can be implemented via a function named ``parse_hook``, and exactly on
107117
argument is provided when it is called: the [``EasyConfig``](https://docs.easybuild.io/en/latest/api/easybuild.framework.easyconfig.easyconfig.html#easybuild.framework.easyconfig.easyconfig.EasyConfig)
108118
instance that represents the parsed easyconfig file.
109119

120+
110121
### Pre/post-step hooks
111122

112123
The third type of hooks are *pre/post-step* hooks, which are triggered right before or

docs/2025-LUST/3_Advanced/3_03_slurm_jobs.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ export EASYBUILD_JOB_BACKEND='Slurm'
6262

6363
On LUMI this is taken care of in the EasyBuild configuration modules such as ``EasyBuild-user``.
6464

65+
In EasyBuild v5.x the default is already Slurm, and GC3Pie is deprecated.
66+
6567

6668
### Job resources
6769

@@ -156,8 +158,9 @@ login01 $ eb --job --buildpath /dev/shm/$USER/easybuild example.eb --robot
156158
The problems for the temporary log files are twofold. First, they may end up in a place
157159
that is not available on the compute nodes. E.g., for the same reasons as for the build
158160
path, the LUMI EasyBuild configuration will place the temporary files in a subdirectory of
159-
``$XDG_RUNTIME_DIR`` on the loginnodes but a subdirectory of ``/dev/shm/$USER`` on the
160-
compute nodes. The second problem however is that if an installation fails, those log files are
161+
``$XDG_RUNTIME_DIR`` on the loginnodes but a subdirectory of ``/tmp/$sLURM_JOBID`` on the
162+
compute nodes (as that one should be cleaned up at the end of the job).
163+
The second problem however is that if an installation fails, those log files are
161164
not even accessible anymore which may leave you wondering about the actual cause of the failing
162165
installation...
163166

0 commit comments

Comments
 (0)