Skip to content

Commit

Permalink
add hpctests_pre_cmd option (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjpb authored Mar 7, 2024
1 parent b434bda commit 17f2b2d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions ansible/roles/hpctests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Role Variables
- `hpctests_hpl_arch`: Optional, default 'linux64'. Arbitrary architecture name for HPL build. HPL is compiled on the first compute node of those selected (see `hpctests_nodes`), so this can be used to create different builds for different types of compute node.

The following variables should not generally be changed:
- `hpctests_pre_cmd`: Optional. Command(s) to include in sbatch templates before module load commands.
- `hpctests_pingmatrix_modules`: Optional. List of modules to load for pingmatrix test. Defaults are suitable for OpenHPC 2.x cluster using the required packages.
- `hpctests_pingpong_modules`: As above but for pingpong test.
- `hpctests_pingpong_plot`: Whether to plot pingpong results. Default `yes`.
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/hpctests/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
hpctests_rootdir:
hpctests_pre_cmd: ''
hpctests_pingmatrix_modules: [gnu12 openmpi4]
hpctests_pingpong_modules: [gnu12 openmpi4 imb]
hpctests_pingpong_plot: yes
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/hpctests/templates/hpl-build.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{%if hpctests_nodes is defined %}#SBATCH --nodelist={{ hpctests_computes.stdout_lines[0] }}{% endif %}

echo HPL arch: {{ hpctests_hpl_arch }}

{{ hpctests_pre_cmd }}
module load {{ hpctests_hpl_modules | join(' ' ) }}
make arch={{ hpctests_hpl_arch }} clean_arch_all
make arch={{ hpctests_hpl_arch }}
2 changes: 1 addition & 1 deletion ansible/roles/hpctests/templates/hpl-solo.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ echo SLURM_JOB_NODELIST: $SLURM_JOB_NODELIST
echo SLURM_JOB_ID: $SLURM_JOB_ID
echo UCX_NET_DEVICES: $UCX_NET_DEVICES
echo HPL arch: {{ hpctests_hpl_arch }}

{{ hpctests_pre_cmd }}
module load {{ hpctests_hpl_modules | join(' ' ) }}
mpirun ./xhpl-{{ hpctests_hpl_arch }}
1 change: 1 addition & 0 deletions ansible/roles/hpctests/templates/pingmatrix.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export UCX_NET_DEVICES={{ hpctests_ucx_net_devices }}
echo SLURM_JOB_NODELIST: $SLURM_JOB_NODELIST
echo SLURM_JOB_ID: $SLURM_JOB_ID
echo UCX_NET_DEVICES: $UCX_NET_DEVICES
{{ hpctests_pre_cmd }}
module load {{ hpctests_pingmatrix_modules | join(' ' ) }}

mpicc -o nxnlatbw mpi_nxnlatbw.c
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/hpctests/templates/pingpong.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export UCX_NET_DEVICES={{ hpctests_ucx_net_devices }}
echo SLURM_JOB_NODELIST: $SLURM_JOB_NODELIST
echo SLURM_JOB_ID: $SLURM_JOB_ID
echo UCX_NET_DEVICES: $UCX_NET_DEVICES
{{ hpctests_pre_cmd }}
module load {{ hpctests_pingpong_modules | join(' ' ) }}

#srun --mpi=pmi2 IMB-MPI1 pingpong # doesn't work in ohpc v2.1
Expand Down

0 comments on commit 17f2b2d

Please sign in to comment.