source: XIOS3/trunk/xios_test_suite/TEST_SUITE/run_test @ 2393

Last change on this file since 2393 was 2393, checked in by jderouillat, 22 months ago

Set QoS to dev for the jeanzay test suite

  • Property svn:executable set to *
File size: 3.8 KB
Line 
1#!/bin/bash
2
3export build_dir=xios_test_suite/RUN_TEST_SUITE/build_${arch}_${mode}
4export svnR=$(svn info --show-item revision ../../)
5if [[ -v enable_mem_track ]]; then
6  echo "enable_mem_track is set to '$enable_mem_track'"
7fi
8
9echo "Start Building XIOS ... "
10
11if [[ ${xios_machine_name} == "jeanzay" ]]; then
12
13  rm -f compile.sh
14  echo "#!/bin/bash" >> compile.sh
15  echo "#SBATCH --ntasks=1 ">> compile.sh
16  echo "#SBATCH --cpus-per-task=16 ">> compile.sh
17  echo "#SBATCH --hint=nomultithread ">> compile.sh
18  echo "#SBATCH -t 00:30:00  " >> compile.sh
19  echo "#SBATCH -o compile.out ">> compile.sh
20  echo "#SBATCH -e compile.err ">> compile.sh
21  echo "#SBATCH --account="$user_account  >> compile.sh
22  echo "#SBATCH --job-name=XIOS_rev"$svnR >> compile.sh
23  echo "#SBATCH --qos=qos_cpu-dev " >> compile.sh
24  echo "#SBATCH --exclusive " >> compile.sh
25  echo "cd \${SLURM_SUBMIT_DIR}">> compile.sh
26  echo "ulimit -c 0">> compile.sh
27  echo "cd ../.. ">> compile.sh
28  echo "./make_xios --arch_path `pwd`/../ARCH --arch ${arch} --${mode} --use_tv --build_dir ${build_dir} --job 16" >> compile.sh
29  cmd=$(sbatch compile.sh)
30  jobid="${cmd//[!0-9]/}"
31  i=0
32  output=$(squeue -u uim55ri | grep ${jobid})
33  while [ ! -z "$output" ]
34  do
35    echo "compiling job " $jobid "pending/running for about" ${i} seconds
36    sleep 30
37    ((i+=30))
38    output=$(squeue -u uim55ri | grep ${jobid})
39  done
40
41fi
42
43if [[ ${xios_machine_name} == "irene" ]]; then
44
45  rm -f compile.sh
46  echo "#!/bin/bash" >> compile.sh
47  echo "#MSUB -o compile.out" >> compile.sh
48  echo "#MSUB -e compile.err" >> compile.sh
49  echo "#MSUB -eo" >> compile.sh
50  echo "#MSUB -c 16" >> compile.sh
51  echo "#MSUB -n 1" >> compile.sh
52  echo "#MSUB -X" >> compile.sh
53  echo "#MSUB -x" >> compile.sh
54  echo "#MSUB -T 1800" >> compile.sh
55  echo "#MSUB -q skylake" >> compile.sh
56  echo "#MSUB -A "$user_account >> compile.sh
57  echo "#MSUB -Q test" >> compile.sh
58  echo "#MSUB -r XIOS_rev"$svnR >> compile.sh
59  echo "#MSUB -m work,scratch" >> compile.sh
60  echo "cd ../.. ">> compile.sh
61  echo "./make_xios --arch_path `pwd`/../ARCH --arch ${arch} --${mode} --use_tv ${enable_mem_track} --build_dir ${build_dir} --job 16" >> compile.sh
62  cmd=$(ccc_msub compile.sh)
63  jobid="${cmd//[!0-9]/}"
64  i=0
65  output=$(squeue -u $USER | grep ${jobid})
66  while [ ! -z "$output" ]
67  do
68    echo "compiling job " $jobid "pending/running for about" ${i} seconds
69    sleep 30
70    ((i+=30))
71    output=$(squeue -u $USER | grep ${jobid})
72  done
73
74fi
75
76exec=build_${arch}_${mode}/bin/generic_testcase.exe
77if [[ -f "$exec" ]]; then
78  build_ok=true
79else
80  build_ok=false
81fi
82
83
84if [ "$build_ok" = true ]
85then
86  echo "XIOS Build Finished. Start Unit Tests"
87  bash ./my_run.sh
88 
89  if [ "$COPY_TO_SERVER" = true ]
90  then
91    echo "with files copy"
92    rundir=${xios_test_suite_repository}/RUN
93    mkdir -p $rundir ; CHMOD  $rundir
94    mkdir -p ${rundir}/test_${xios_machine_name} ; CHMOD ${rundir}/test_${xios_machine_name}
95
96    cp report_${svnR}_${arch}_${mode}.txt ${rundir}/test_${xios_machine_name}/test_${svnR}_${xios_machine_name}_${arch}_${mode}.txt
97
98    CHMOD ${rundir}/test_${xios_machine_name}/test_${svnR}_${xios_machine_name}_${arch}_${mode}.txt
99
100    mkdir -p ${rundir}/def_files ;  CHMOD ${rundir}/def_files
101    mkdir -p ${rundir}/def_files/${svnR} ;  CHMOD ${rundir}/def_files/${svnR}
102
103    for i in $(ls -d test_*/)
104    do
105      mkdir -p ${rundir}/def_files/${svnR}/${i%%} ; CHMOD ${rundir}/def_files/${svnR}/${i%%}
106      cp ${i%%}/user_param_*.json ${rundir}/def_files/${svnR}/${i%%}
107      for j in $(ls -d ${i%%/}/CONFIG_*)
108      do
109        mkdir -p ${rundir}/def_files/${svnR}/${j%%} ; CHMOD ${rundir}/def_files/${svnR}/${j%%}
110        cp ${j%%}/all_param.def ${rundir}/def_files/${svnR}/${j%%}
111      done
112    done
113  else
114    echo "without files copy"
115  fi
116
117else
118  echo "XIOS Build Failed. Skip Unit Tests"
119fi
120
121
122
Note: See TracBrowser for help on using the repository browser.