source: BOL/script_install/verif_commit.sh @ 5054

Last change on this file since 5054 was 4635, checked in by Laurent Fairhead, 16 months ago

Problem if there are several LMDZ* directories in the tmp space

  • Property svn:executable set to *
File size: 2.1 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
13
14resolution=48x36x39
15physiq=NPv6.0.14splith
16# Changed on 15/03/2023 r4473
17physiq=NPv6.3
18
19cd $TMP_D
20cp /u/lmdz/WWW/pub/install_lmdz.sh .
21#chmod 755 /u/lmdz/WWW/pub/install_lmdz.sh
22chmod +x install_lmdz.sh
23#./install_lmdz.sh -SCM -unstable -debug -d $resolution -r $REV -physiq $physiq > ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$ 2>&1
24./install_lmdz.sh -SCM -unstable -debug -d $resolution -r $REV -netcdf /u/lmdz/Netcdf/lmdz-cq_gcc_8.3.0/ -rad oldrad -parallel mpi_omp  -physiq $physiq \
25                   > ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$ 2>&1
26#
27# menage: si ca a marche on efface le repertoire dans /tmp/lmdz
28#
29grep 'Everything is cool' ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$
30RET=$?
31# checking 1D results
32cd LMDZ*${REV}*/1D/EXEC/6AL79/
33listecas="ARMCU/REF RICO/SHORT SANDU/REF"
34((ret1d=0))
35for cas in $listecas ; do
36    ((ret1d=$ret1d*10))
37    gunzip -dc "$cas"/listing.gz |grep -i cool
38    retcas=$?
39    ((ret1d=$ret1d+$retcas))
40done
41# checking isotope compilation
42cd $TMP_D
43cd LMDZ*${REV}*/modipsl/modeles/LMDZ/
44./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
45ls bin/*iso*
46retiso=$?
47
48if [ ${RET} -eq 0 ] && [ ${ret1d} -eq 0 ] && [ ${retiso} -eq 0 ] ; then
49  echo "Everything is cool for revision ${REV}" >> ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$
50  echo "Cleaning up /tmp/lmdz/test_rev_${REV}_$$" >> ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$
51  \rm -rf /tmp/lmdz/test_rev_${REV}_$$
52fi
53#
54# sorties retour nécessaires pour envoyer le message a la liste
55#
56echo "Sortie dans" ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$
57if [ ${RET} -eq 0 ] ; then
58    echo "Bench 3D ok"
59fi
60if [ ${ret1d} -eq 0 ] ; then
61    echo "Bench 1D ok"
62fi
63if [ ${retiso} -eq 0 ] ; then
64    echo "Compilation iso ok"
65fi
66
67#grep 'Everything is cool' ${TMP_OUT}/post-commit-lmdz-cq-${REV}_$$
68exit
Note: See TracBrowser for help on using the repository browser.