source: XIOS/dev/dev_ym/XIOS_COUPLING/xios_test_suite/TEST_SUITE/run_test @ 2295

Last change on this file since 2295 was 2295, checked in by jderouillat, 2 years ago

Replace ccc_mpp by squeue in the test suite. ccc_mpp generates in the test suite from a few days the error 'ccc_mpp[717]: printf: warning: invalid argument of type T'

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