Skip to content

Commit ae5418b

Browse files
authored
Merge pull request #226 from stackhpc/fix/pingpong-plots
Make pingpong plotting independent of role path
2 parents f7dbe46 + cc944ec commit ae5418b

File tree

5 files changed

+11
-2
lines changed

5 files changed

+11
-2
lines changed

ansible/adhoc/hpctests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
---
66

7-
- hosts: login[0] # TODO: might want to make which node is used selectable?
7+
- hosts: hpctests[0] # TODO: might want to make which node is used selectable?
88
become: false
99
gather_facts: false
1010
tasks:

ansible/roles/hpctests/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Role Variables
3535
The following variables should not generally be changed:
3636
- `hpctests_pingmatrix_modules`: Optional. List of modules to load for pingmatrix test. Defaults are suitable for OpenHPC 2.x cluster using the required packages.
3737
- `hpctests_pingpong_modules`: As above but for pingpong test.
38+
- `hpctests_pingpong_plot`: Whether to plot pingpong results. Default `yes`.
3839
- `hpctests_hpl_modules`: As above but for hpl tests.
3940
- `hpctests_hpl_version`: Version of HPL
4041

ansible/roles/hpctests/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
hpctests_rootdir:
33
hpctests_pingmatrix_modules: [gnu9 openmpi4]
44
hpctests_pingpong_modules: [gnu9 openmpi4 imb]
5+
hpctests_pingpong_plot: yes
56
hpctests_hpl_modules: [gnu9 openmpi4 openblas]
67
hpctests_outdir: "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/hpctests"
78
hpctests_ucx_net_devices: all

ansible/roles/hpctests/tasks/pingpong.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@
4848

4949
- name: Plot image
5050
shell:
51-
cmd: "python {{lookup('env', 'APPLIANCES_REPO_ROOT') }}/ansible/roles/hpctests/files/plot_imb_pingpong.py {{ _pingpong_local_output }}"
51+
cmd: "python {{ role_path }}/files/plot_imb_pingpong.py {{ _pingpong_local_output }}"
5252
creates: "{{ _pingpong_local_output | dirname }}/latency.png"
5353
register: _pingpong_plot
5454
delegate_to: localhost
55+
when: hpctests_pingpong_plot | bool
5556

5657
- debug:
5758
msg: |
@@ -61,5 +62,7 @@
6162
Zero-size msg latency: {{ hpctests_pingpong_out['columns']['latency'][0] }} us
6263
Max bandwidth: {{ hpctests_pingpong_out['columns']['bandwidth'] | max }} Mbytes/s ({{ (hpctests_pingpong_out['columns']['bandwidth'] | max) / 125.0 }} Gbit/s)
6364
65+
{% if hpctests_pingpong_plot %}
6466
See plot on localhost:
6567
{{ _pingpong_plot.stdout }}
68+
{% endif %}

environments/common/inventory/groups

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ login
1313
control
1414
compute
1515

16+
[hpctests:children]
17+
# Login group to use for running mpi-based testing.
18+
login
19+
1620
[cluster:children]
1721
# All nodes in the appliance - add e.g. service nodes not running Slurm here.
1822
openhpc

0 commit comments

Comments
 (0)