Build for every node type¶
A module is built for the CPU target of the node that built it, so a cluster with several node types needs one build on each.
The site file lists the node types; eb-local --explain then prints an sbatch line for each, which runs the same build as a batch job on that node type.
These steps list the node types, as the site, and build a recipe on all of them, as a user.
Before you start¶
To list the node types: the site file, as Write the site file for a cluster describes, and the
sbatchoptions that place a job on each node type, on nodes with a node-local disk.To build: the recipe’s file name, as for Install software on top of EESSI with EasyBuild.
List the node types¶
Add a [build.node_types] table to the site file, with the sbatch options of each node type; only the site file may set it:
[build.node_types]
cpu = "-p cpu -n 8 -t 02:00:00"
gpu = "-p gpu -n 8 -t 02:00:00 --gpus=1"
eb-local config shows each as build.node_types.NAME, with the line that sets it.
Build on every node type¶
Print the batch jobs, from the directory the jobs should run in; among the lines
--explainprints is ansbatchline for each node type:eb-local --explain pigz-2.8-GCCcore-15.2.0.eb --robot# On each node type the site file lists in [build.node_types], the same build as a batch job: # sbatch -p cpu -n 8 -t 02:00:00 --job-name=eb-local-cpu-pigz-2.8-GCCcore-15.2.0.eb --chdir=/home/alice --output=%x-%j.out --wrap='exec /usr/local/bin/eb-local pigz-2.8-GCCcore-15.2.0.eb --robot' # sbatch -p gpu -n 8 -t 02:00:00 --gpus=1 --job-name=eb-local-gpu-pigz-2.8-GCCcore-15.2.0.eb --chdir=/home/alice --output=%x-%j.out --wrap='exec /usr/local/bin/eb-local pigz-2.8-GCCcore-15.2.0.eb --robot'
A build started outside a job prints the same lines after its refusal.
Run each
sbatchline, without the#in front:sbatch -p cpu -n 8 -t 02:00:00 --job-name=eb-local-cpu-pigz-2.8-GCCcore-15.2.0.eb --chdir=/home/alice --output=%x-%j.out --wrap='exec /usr/local/bin/eb-local pigz-2.8-GCCcore-15.2.0.eb --robot'Each job runs this eb-local with the same recipe, options and configuration, in the directory
--explainran in, and writes its output there, aseb-local-cpu-pigz-2.8-GCCcore-15.2.0.eb-JOBID.out. A job inherits the environment of the shell that ransbatch, such asEB_LOCAL_BUILD_SECRETS.
Check that it worked¶
Each job’s output ends as a build’s does:
eb-local: done. To use the modules in a new shell or job:
eval "$(eb-local env)"
eb-local list then shows the module in the column of each CPU target.
With EESSI loaded on a node type, eb-local list --missing prints only the NAME/VERSION modules missing on that target.
With eb-local submit, until 4.0.0¶
eb-local submit sends those jobs itself.
It is deprecated, says so on each run, and is removed in 4.0.0:
eb-local submit pigz-2.8-GCCcore-15.2.0.eb --robot # every node type
eb-local submit --on gpu pigz-2.8-GCCcore-15.2.0.eb --robot # only these
eb-local submit --print pigz-2.8-GCCcore-15.2.0.eb # show the jobs, submit nothing
--on and --print come before the recipe; options after it are EasyBuild’s.
The batch scripts go to <install prefix>/.eb-local/jobs, and each job’s output to <install prefix>/.eb-local/logs/submit-NODETYPE-JOBID.out.
If it fails¶
Message |
Cause |
What to do |
|---|---|---|
|
The site file has no |
Ask the site to list the node types, or build in an allocation on each. |
|
Your file, or a profile, sets node types. |
Remove the table from it. |
|
eb-local 3.1.0 reads a site file written for 3.2.0. |
Install release 3.2.0, or name the table |
|
The site file uses the table’s name from before 3.2. |
Rename the table. |