-
Notifications
You must be signed in to change notification settings - Fork 0
/
play.yml
73 lines (69 loc) · 2.64 KB
/
play.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
# WIP: playbook to install/use intel cluster checker (clck): https://software.intel.com/en-us/intel-cluster-checker
#
# run using:
# ansible-playbook -e @config/openhpc.yml -i ansible/inventory-openhpc play.yml
# where paths except play.yml refer to p3 appliances files
#
# Assumes that /home is shared between all nodes.
# Note this will overwrite an existing ~/clck_results.log on the launching host (if clck runs ok).
# It will also generate a clck_debug.log on the slurm login node.
#
# TODO: check entropy is ok and fix hw support if needed
- name: ensure passwordless ssh from login->compute works
hosts: 127.0.0.1
connection: local
tasks:
- name: add ssh identities
command: ssh-add
# TODO: also need to make sure the agent is started and keys exist etc...
- name: install intel packages
# clck docs don't state this as a prerequisite but they appear to be, to not get a FAIL at least
# note not everything is at latest version as that didn't work
hosts: openhpc_login openhpc_compute
become: yes
tasks:
- name: add intel key
# TODO: make key adding idempotent
command: rpm --import https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB
- name: add intel HPC repos
command: yum-config-manager --add-repo https://yum.repos.intel.com/setup/intelproducts.repo
# note yum_repository module doesn't support adding .repo files (https://stackoverflow.com/a/53982372/916373)
- name: install intel-mpi
yum:
name: intel-mpi-2018.4-057
state: present
- name: install intel-mkl
# (includes the hpl benchmark we want in /opt/intel/compilers_and_libraries_*/linux/mkl/benchmarks/mp_linpack)
yum:
name: intel-mkl-2019.4-070
state: present
- name: add intel CLCK repo
command: yum-config-manager --add-repo https://yum.repos.intel.com/clck/2019/setup/intel-clck-2019.repo
- name: install CLCK
yum:
name: intel-clck-2019.3.5-025
state: present
- name: run clck
# NB: *don't* want to be root for this iaw clck docs
hosts: openhpc_login
tasks:
- name: create CLCK node file
copy:
content: "{{ '\n'.join(groups['openhpc_compute']) + '\n'}}"
dest: ~/clck_nodes
- name: run clck
script: "{{ playbook_dir }}/run_clck.sh"
# have to do this as a script as have to source various files first
- name: retrieve results
fetch:
src: ~/clck_results.log
flat: yes
dest: ~/clck_results.log
register: result
- debug:
msg: "Retrieved results as ~/clck_results.log"
when: result is succeeded
- debug:
msg: "** No results retrieved **"
when: result is failed