source: BOL/script_install/verif_commit.sh @ 5480

Last change on this file since 5480 was 5461, checked in by fhourdin, 3 weeks ago

Quality control improvements

  • Property svn:executable set to *
File size: 2.7 KB
Line 
1#!/bin/bash
2#
3# Lancement d'un install_lmdz.sh immédiatement apres un commit
4# pour tester la compilation et l'execution. Retour d'un code erreur adequat
5# au serveur svn pour notifier qui de droit
6
7set -vx
8
9REV="$1"
10
11TMP_OUT=/u/lmdz/WWW/Distrib/OUT
12TMP_D=/tmp/lmdz/test_rev_${REV}_$$ ; mkdir -p $TMP_D
13ncdfdir=/u/lmdz/Netcdf/lmdz-cq_20230902
14
15resolution=48x36x39
16physiq=NPv6.0.14splith
17# Changed on 15/03/2023 r4473
18physiq=NPv6.3
19
20cd $TMP_D
21cp /u/lmdz/WWW/pub/install_lmdz.sh .
22#chmod 755 /u/lmdz/WWW/pub/install_lmdz.sh
23chmod +x install_lmdz.sh
24#./install_lmdz.sh -SCM -unstable -debug -d $resolution -r $REV -physiq $physiq > ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$ 2>&1
25#./install_lmdz.sh -SCM -unstable -debug -d $resolution -r $REV -netcdf /u/lmdz/Netcdf/lmdz-cq_9.4.0_ubunutu20.04/ -rad oldrad -parallel mpi_omp  -physiq $physiq \
26./install_lmdz.sh -SCM -unstable -debug -d $resolution -r $REV -netcdf $ncdfdir -rad oldrad -parallel mpi_omp  -benchphysiq $physiq \
27                  -arch local-gfortran9-parallel -arch_dir /u/lmdz/WWW/Distrib/arch.local \
28                   > ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$ 2>&1
29#
30# menage: si ca a marche on efface le repertoire dans /tmp/lmdz
31#
32grep 'Everything is cool' ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$
33RET=$?
34# checking 1D results
35cd LMDZ*${REV}*/1D/EXEC/6AL79/
36listecas="ARMCU/REF RICO/SHORT SANDU/REF"
37((ret1d=0))
38for cas in $listecas ; do
39    ((ret1d=$ret1d*10))
40    gunzip -dc "$cas"/listing.gz |grep -i cool
41    retcas=$?
42    ((ret1d=$ret1d+$retcas))
43done
44# checking isotope compilation
45if [[ -v LD_LIBRARY_PATH ]]; then
46    echo "export LD_LIBRARY_PATH=$ncdfdir/lib:$LD_LIBRARY_PATH" >> icosalmdz.env
47else
48    echo "export LD_LIBRARY_PATH=$ncdfdir/lib" >> icosalmdz.env
49fi
50export PATH=$ncdfdir/bin:$PATH
51
52cd $TMP_D
53cd LMDZ*${REV}*/modipsl/modeles/LMDZ/
54./makelmdz_fcm -debug -arch local -j 8 -rad rrtm -d $resolution -v false -p lmdiso -isotopes true -isoverif true gcm  > ./compile_iso.out 2>&1
55ls bin/*iso*
56retiso=$?
57
58if [ ${RET} -eq 0 ] && [ ${ret1d} -eq 0 ] && [ ${retiso} -eq 0 ] ; then
59  echo "Everything is cool for revision ${REV}" >> ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$
60  echo "Cleaning up /tmp/lmdz/test_rev_${REV}_$$" >> ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$
61  \rm -rf /tmp/lmdz/test_rev_${REV}_$$
62else
63  echo "There is a problem. QC is run in this directory /tmp/lmdz/test_rev_${REV}_$$ on lmdz-cq"
64fi
65#
66# sorties retour nécessaires pour envoyer le message a la liste
67#
68echo "Sortie dans" ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$
69if [ ${RET} -eq 0 ] ; then
70    echo "Bench 3D ok"
71fi
72if [ ${ret1d} -eq 0 ] ; then
73    echo "Bench 1D ok"
74fi
75if [ ${retiso} -eq 0 ] ; then
76    echo "Compilation iso ok"
77fi
78
79#grep 'Everything is cool' ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$
80exit
Note: See TracBrowser for help on using the repository browser.