Skip to content

Add hpctests_pre_cmd option #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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