Skip to content

Commit 09ef693

Browse files
committed
Adds bandwidth.yml playbook for NVIDIA nvbandwidth and
removes samples.yml tasks from adhoc/cudatest.yml
1 parent cc61ed3 commit 09ef693

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

ansible/adhoc/cudatests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
- hosts: cuda
33
become: true
44
gather_facts: true
5-
tags: cuda_samples
5+
tags: cuda_bandwidth
66
tasks:
7-
- ansible.builtin.import_role:
8-
name: cuda
9-
tasks_from: samples.yml
10-
117
- name: Run CUDA bandwidth tasks
128
ansible.builtin.import_role:
139
name: cuda

ansible/roles/cuda/defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ cuda_samples_programs:
1717
# cuda_devices: # discovered from deviceQuery run
1818
cuda_persistenced_state: started
1919
# variables for nvbandwidth (for bandwidth.yml tasks run in cudatests.yml)
20+
cuda_bandwidth_version: 'v0.8'
2021
cuda_bandwidth_path: "/var/lib/{{ ansible_user }}/cuda_bandwidth"
21-
cuda_bandwidth_release_url: "https://github.com/NVIDIA/nvbandwidth/archive/refs/tags/v0.8.tar.gz"
22+
cuda_bandwidth_release_url: "https://github.com/NVIDIA/nvbandwidth/archive/refs/tags/{{ cuda_bandwidth_version }}.tar.gz"

ansible/roles/cuda/tasks/bandwidth.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
- name: Ensure cuda_bandwidth_path exists
2+
- name: Ensure CUDA bandwidth path exists
33
ansible.builtin.file:
44
state: directory
55
path: "{{ cuda_bandwidth_path }}"
@@ -31,18 +31,19 @@
3131

3232
- name: Build CUDA bandwidth test
3333
ansible.builtin.shell:
34-
cmd: |
34+
cmd: >
3535
source /cvmfs/software.eessi.io/versions/2023.06/init/bash &&
36+
module load buildenv/default-foss-2023b &&
3637
module load Boost/1.82.0-GCC-12.3.0 &&
37-
. /etc/profile.d/sh.local && cmake .. &&
38+
. /etc/profile.d/sh.local &&
39+
cmake .. &&
3840
make -j {{ ansible_processor_vcpus }}
3941
chdir: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8/build"
4042
creates: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8/build/nvbandwidth"
43+
changed_when: true
4144

4245
- name: Run CUDA bandwidth test
4346
ansible.builtin.shell: |
44-
export LD_LIBRARY_PATH=/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen4/software/GCCcore/12.3.0/lib64:\
45-
/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen4/software/Boost/1.82.0-GCC-12.3.0/lib
4647
./nvbandwidth
4748
args:
4849
chdir: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8/build/"
@@ -51,6 +52,6 @@
5152
- name: Save CUDA bandwidth output to bandwidth_results.txt
5253
ansible.builtin.copy:
5354
content: "{{ cuda_bandwidth_output.stdout }}"
54-
dest: "{{ appliances_environment_root }}/cudatests/bandwidth_results.txt"
55+
dest: "{{ appliances_environment_root }}/cudatests/{{ inventory_hostname }}bandwidth_results.txt"
5556
mode: '0644'
5657
delegate_to: localhost

0 commit comments

Comments
 (0)