|
| 1 | +--- |
| 2 | +- name: Ensure cuda_bandwidth_path exists |
| 3 | + ansible.builtin.file: |
| 4 | + state: directory |
| 5 | + path: "{{ cuda_bandwidth_path }}" |
| 6 | + owner: "{{ ansible_user }}" |
| 7 | + group: "{{ ansible_user }}" |
| 8 | + mode: "0755" |
| 9 | + |
| 10 | +- name: Download CUDA bandwith test release |
| 11 | + ansible.builtin.unarchive: |
| 12 | + remote_src: true |
| 13 | + src: "{{ cuda_bandwidth_release_url }}" |
| 14 | + dest: "{{ cuda_bandwidth_path }}" |
| 15 | + owner: "{{ ansible_user }}" |
| 16 | + group: "{{ ansible_user }}" |
| 17 | + creates: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8" |
| 18 | + |
| 19 | +- name: Creates CUDA bandwidth test build directory |
| 20 | + ansible.builtin.file: |
| 21 | + state: directory |
| 22 | + path: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8/build" |
| 23 | + mode: "0755" |
| 24 | + |
| 25 | +- name: Ensure cudatests directory exists |
| 26 | + ansible.builtin.file: |
| 27 | + path: "{{ appliances_environment_root }}/cudatests" |
| 28 | + state: directory |
| 29 | + mode: '0755' |
| 30 | + delegate_to: localhost |
| 31 | + |
| 32 | +- name: Build CUDA bandwidth test |
| 33 | + ansible.builtin.shell: |
| 34 | + cmd: source /cvmfs/software.eessi.io/versions/2023.06/init/bash && module load Boost/1.82.0-GCC-12.3.0 && . /etc/profile.d/sh.local && cmake .. && make -j {{ ansible_processor_vcpus }} |
| 35 | + chdir: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8/build" |
| 36 | + creates: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8/build/nvbandwidth" |
| 37 | + |
| 38 | +- name: Run CUDA bandwidth test |
| 39 | + ansible.builtin.shell: | |
| 40 | + export LD_LIBRARY_PATH=/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen4/software/GCCcore/12.3.0/lib64:/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/amd/zen4/software/Boost/1.82.0-GCC-12.3.0/lib |
| 41 | + ./nvbandwidth |
| 42 | + args: |
| 43 | + chdir: "{{ cuda_bandwidth_path }}/nvbandwidth-0.8/build/" |
| 44 | + register: cuda_bandwidth_output |
| 45 | + |
| 46 | +- name: Save CUDA bandwidth output to bandwidth_results.txt |
| 47 | + ansible.builtin.copy: |
| 48 | + content: "{{ cuda_bandwidth_output.stdout }}" |
| 49 | + dest: "{{ appliances_environment_root }}/cudatests/bandwidth_results.txt" |
| 50 | + delegate_to: localhost |
0 commit comments