source: XIOS3/trunk/xios_test_suite/TEST_SUITE/my_run.sh @ 2415

Last change on this file since 2415 was 2415, checked in by jderouillat, 21 months ago

Fix Irene test suite, python3/3.7.5 generates an OpenMPI error importing netCDF

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/bash
2
3echo "running my_run.sh"
4
5export svnR=$(svn info --show-item revision ../../)
6svnurl=$(svn info --show-item url ../../)
7PWD=$(pwd)
8
9fn=report_${svnR}_${arch}_${mode}.txt
10
11if [ -z ${enable_mem_track+x} ]; then
12  # initialize the report for the main part of the test (without memory tracking, see step2.py for details)
13  echo "#revision" ${svnR} > ${fn}
14  echo "#url" ${svnurl} >> ${fn}
15  echo "#machine" ${xios_machine_name} >> ${fn}
16  echo "#build_dir" $(pwd)/build_${arch}_${mode} >> ${fn}
17  echo "#arch" $arch >> ${fn}
18  echo "#mode" $mode >> ${fn}
19else
20  if  [ ! -f "$fn" ]; then 
21    # initialize the report if it does not exist
22    echo "#revision" ${svnR} > ${fn}
23    echo "#url" ${svnurl} >> ${fn}
24    echo "#machine" ${xios_machine_name} >> ${fn}
25    echo "#build_dir" $(pwd)/build_${arch}_${mode} >> ${fn}
26    echo "#arch" $arch >> ${fn}
27    echo "#mode" $mode >> ${fn}
28    echo "#memtrack full" >> ${fn}
29  fi
30  # else write in the same report
31fi
32
33${PYTHON} step1.py
34
35
36if [[ ${xios_machine_name} == "irene" ]]; then
37  cmd=$(ccc_msub full_job_${arch}_${mode}.sh)
38  jobid="${cmd//[!0-9]/}"
39
40  i=0
41  output=$(squeue -u $USER | grep ${jobid})
42  while [ ! -z "$output" ]
43  do
44    echo "job" $jobid "pending/running for about" ${i} seconds
45    sleep 30
46    ((i+=30))
47    output=$(squeue -u $USER | grep ${jobid})
48    if [[ $i -eq 300 ]]; then
49      ccc_mdel $jobid
50      break
51    fi
52  done
53fi
54
55
56
57if [[ ${xios_machine_name} == "jeanzay" ]]; then
58  cmd=$(sbatch full_job_${arch}_${mode}.sh)
59  jobid="${cmd//[!0-9]/}"
60  i=0
61  output=$(squeue -u uim55ri | grep ${jobid})
62  while [ ! -z "$output" ]
63  do
64    echo "job" $jobid "pending/running for about" ${i} seconds
65    sleep 30
66    ((i+=30))
67    if [[ $i -eq 300 ]]; then
68      output=$(squeue -u uim55ri | grep ${jobid})
69      scancel $jobid
70      break
71    fi
72  done
73fi
74
75
76${PYTHON} step2.py
Note: See TracBrowser for help on using the repository browser.