File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change 17
17
repo : " https://github.com/eessi/eessi-demo.git"
18
18
dest : " {{ eessi_test_rootdir }}/eessi-demo"
19
19
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/job.sh"
23
+ content : |
24
+ #!/usr/bin/env bash
25
+ #SBATCH --output=%x.out
26
+ #SBATCH --error=%x.out
23
27
source /cvmfs/pilot.eessi-hpc.org/latest/init/bash
24
28
srun ./run.sh
29
+
30
+ - name : Run test job
31
+ ansible.builtin.shell :
32
+ cmd : sbatch --wait --job-name=tensorflow job.sh
25
33
chdir : " {{ eessi_test_rootdir }}/eessi-demo/TensorFlow"
26
- executable : /bin/bash
34
+ # executable: /bin/bash
27
35
register : job_output
28
- async : " {{ 10 * 60 }}" # wait for up to 10 minutes
29
- poll : 15 # check every 15 seconds
36
+
37
+ - name : Retrieve output
38
+ slurp :
39
+ src : " {{ eessi_test_rootdir }}/eessi-demo/TensorFlow/tensorflow.out"
40
+ register : _tensorflow_out
30
41
31
42
- name : Fail if job output contains error
32
43
fail :
33
44
# Note: Job prints live progress bar to terminal, so use regex filter to remove this from stdout
34
45
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 '
46
+ when : ' "Epoch 5/5" not in _tensorflow_out.content | b64decode '
36
47
You can’t perform that action at this time.
0 commit comments