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

Last change on this file since 2210 was 2210, checked in by jderouillat, 5 months ago

Setting XIOS_COULING test suite for Jean-Zay (validated in OpenMPI)

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