Skip to content

Commit 307f5ba

Browse files
committed
capture tensorflow EESSI test output
1 parent 854e491 commit 307f5ba

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

ansible/ci/check_eessi.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,34 @@
1717
repo: "https://github.com/eessi/eessi-demo.git"
1818
dest: "{{ eessi_test_rootdir }}/eessi-demo"
1919

20-
- name: Run test job
21-
ansible.builtin.shell:
22-
cmd: |
20+
- name: Create batch script
21+
copy:
22+
dest: "{{ eessi_test_rootdir }}/eessi-demo/TensorFlow/tensorflow.sh"
23+
content: |
24+
#!/usr/bin/env bash
25+
#SBATCH --output=%x.out
26+
#SBATCH --error=%x.out
2327
source /cvmfs/pilot.eessi-hpc.org/latest/init/bash
2428
srun ./run.sh
29+
30+
- name: Run test job
31+
ansible.builtin.shell:
32+
cmd: sbatch --wait tensorflow.sh
2533
chdir: "{{ eessi_test_rootdir }}/eessi-demo/TensorFlow"
26-
executable: /bin/bash
2734
register: job_output
28-
async: "{{ 10 * 60 }}" # wait for up to 10 minutes
29-
poll: 15 # check every 15 seconds
35+
36+
- name: Retrieve job output
37+
slurp:
38+
src: "{{ eessi_test_rootdir }}/eessi-demo/TensorFlow/tensorflow.sh.out"
39+
register: _tensorflow_out
40+
no_log: true # as its base64 encoded so useless
41+
42+
- name: Show job output
43+
debug:
44+
msg: "{{ _tensorflow_out.content | b64decode }}"
3045

3146
- name: Fail if job output contains error
3247
fail:
3348
# Note: Job prints live progress bar to terminal, so use regex filter to remove this from stdout
3449
msg: "Test job using EESSI modules failed. Job output was: {{ job_output.stdout | regex_replace('\b', '') }}"
35-
when: '"Epoch 5/5" not in job_output.stdout'
36-
50+
when: '"Epoch 5/5" not in _tensorflow_out.content | b64decode'

0 commit comments

Comments
 (0)