Changeset 3935


Ignore:
Timestamp:
Jun 15, 2021, 10:16:38 AM (3 years ago)
Author:
Laurent Fairhead
Message:

Rajout d'une option -j au script pour ne faire que les comparaisons sans écriture dans RESUBENCH

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/check_version.sh

    r3926 r3935  
    1515parallel=none
    1616parallel=mpi_omp
     17justcheck=0 # just compare results not writing of results in RESUBENCH
    1718tmpdir=/tmp/`whoami` ; mkdir -p $tmpdir
    1819
     
    5152      "-c")
    5253          compilo="$2" ; shift ; shift ;;
     54      "-j")
     55          justcheck="$2" ; shift ; shift ;;
    5356      *)
    5457          version="$1" ; shift ; if [ "$#" = 1 ] ; then version_ref=$1 ; shift ; fi ;;
     
    7073
    7174# recuperation de la version a laquelle on compare pour le message final :
    72 comparea=`ls -l $RESU_D/$version_ref | awk -F/ ' { print $NF } '`
     75comparea=`ls -ld $RESU_D/$version_ref | awk -F/ ' { print $NF } '`
    7376
    7477#  LANCEMENT D UN CERTAIN NOMBRE DE TESTS
     
    8083if [ $diagonly = 0 ] ; then
    8184  \rm -f install_lmdz.sh ; $get/install_lmdz.sh ; chmod +x install_lmdz.sh
    82   ./install_lmdz.sh -v $version -d $resolution -SCM -parallel $parallel
     85  ./install_lmdz.sh -v $version -d $resolution -SCM -parallel $parallel -veget CMIP6
    8386fi
    8487
     
    8891outf=$MODEL/1D/EXEC/NPv6.1L79/ARMCU/REF/restartphy.nc
    8992if [ -f $outf ] ; then
    90    mkdir -p $resubench/ARMCU/REF
    91    cp $MODEL/1D/EXEC/NPv6.1L79/ARMCU/REF/restartphy.nc $resubench/ARMCU/REF/
    92    cmp -s $resubench/ARMCU/REF/restartphy.nc $latest/ARMCU/REF/restartphy.nc
    93    if [ $? = 0 ] ; then converge1D=U ; else converge1D=u ; fi
     93    if [ $justcheck = 0 ] ; then
     94        mkdir -p $resubench/ARMCU/REF
     95        cp $MODEL/1D/EXEC/NPv6.1L79/ARMCU/REF/restartphy.nc $resubench/ARMCU/REF/
     96    fi
     97#   cmp -s $resubench/ARMCU/REF/restartphy.nc $latest/ARMCU/REF/restartphy.nc
     98    cmp -s $MODEL/1D/EXEC/NPv6.1L79/ARMCU/REF/restartphy.nc $latest/ARMCU/REF/restartphy.nc
     99    if [ $? = 0 ] ; then converge1D=U ; else converge1D=u ; fi
    94100else
    95101   converge1D=-
     
    125131#    Les resultats de la simulation debug sont dans SIMD
    126132
    127    mkdir -p $resubench/$BENCH
     133   if [ $justcheck = 0 ] ; then mkdir -p $resubench/$BENCH; fi
    128134   if [ -f restartphy.nc ] ; then
    129       ncks -M -m -h -v ps -O restart.nc $resubench/$BENCH/ps.nc
    130       cp restart.nc $resubench/$BENCH/restart.nc
    131       cmp -s $resubench/$BENCH/restart.nc $latest/$BENCH/restart.nc
     135       if [ $justcheck = 0 ] ; then
     136           ncks -M -m -h -v ps -O restart.nc $resubench/$BENCH/ps.nc
     137           cp restart.nc $resubench/$BENCH/restart.nc
     138       fi
     139#       cmp -s $resubench/$BENCH/restart.nc $latest/$BENCH/restart.nc
     140       cmp -s ./restart.nc $latest/$BENCH/restart.nc
    132141      if [ $? = 0 ] ; then converge=S ; else converge=s ; fi
    133142   else
     
    143152   suf=NPv5.5
    144153   suf=NPv6.0.14splith
    145    cp -f config.def_oraer config.def
     154#   cp -f config.def_oraer config.def
     155   sed -e 's/VEGET=y/VEGET=n/' config.def_oraer > config.def
    146156   if [ -f physiq.def_$suf ] ; then \cp -f physiq.def_$suf physiq.def ; fi
    147157   if [ $diagonly = 0 ] ; then
     
    180190#   if [ -f restartphy.nc ] ; then  Correction 2017/04/26
    181191   if [ -f SIM1/restartphy.nc ] ; then
    182       ncks -M -m -h -v ps -O SIM1/restart.nc $resubench/$BENCH/ps$suf.nc
    183       cp SIM1/restart.nc $resubench/$BENCH/restart$suf.nc
    184       \rm sechiba_out_2.nc sechiba_history.nc sechiba_rest_out.nc
    185       cmp -s $resubench/$BENCH/restart$suf.nc $latest/$BENCH/restart$suf.nc
     192       if [ $justcheck = 0 ] ; then
     193           ncks -M -m -h -v ps -O SIM1/restart.nc $resubench/$BENCH/ps$suf.nc
     194           cp SIM1/restart.nc $resubench/$BENCH/restart$suf.nc
     195       fi
     196       \rm sechiba_out_2.nc sechiba_history.nc sechiba_rest_out.nc
     197#       cmp -s $resubench/$BENCH/restart$suf.nc $latest/$BENCH/restart$suf.nc
     198       cmp -s SIM1/restart.nc $latest/$BENCH/restart$suf.nc
    186199      if [ $? = 0 ] ; then convergeNP=N ; else convergeNP=n ; fi
    187200   else
     
    202215      suf=D
    203216      if [ -f SIMD/restartphy.nc ] ; then
    204          ncks -M -m -h -v ps -O SIMD/restart.nc $resubench/$BENCH/ps$suf.nc
    205          cp SIMD/restart.nc $resubench/$BENCH/restart$suf.nc
    206          cmp -s $resubench/$BENCH/restart$suf.nc $latest/$BENCH/restart$suf.nc
    207          if [ $? = 0 ] ; then convergeD=D ; else convergeD=d ; fi
     217          if [ $justcheck = 0 ] ; then
     218              ncks -M -m -h -v ps -O SIMD/restart.nc $resubench/$BENCH/ps$suf.nc
     219              cp SIMD/restart.nc $resubench/$BENCH/restart$suf.nc
     220          fi
     221          cmp -s SIMD/restart.nc $latest/$BENCH/restart$suf.nc
     222          if [ $? = 0 ] ; then convergeD=D ; else convergeD=d ; fi
    208223      else
    209224         convergeD=-
     
    224239   if [ -f limit.nc ] ; then
    225240      var=Tsoil01srf01
    226       mkdir -p $resubench/START$resolution
    227       ncks -M -m -h -v $var startphy.nc -O  $resubench/START$resolution/$var.nc
    228       cp startphy.nc $resubench/START$resolution/
     241      if [ $justcheck = 0 ] ; then
     242          mkdir -p $resubench/START$resolution
     243          ncks -M -m -h -v $var startphy.nc -O  $resubench/START$resolution/$var.nc
     244          cp startphy.nc $resubench/START$resolution/
     245      fi
    229246#!     cmp -s  $resubench/START$resolution/$var.nc  $latest/START$resolution/$var.nc
    230       cmp -s  $resubench/START$resolution/startphy.nc  $latest/START$resolution/startphy.nc
     247       cmp -s  startphy.nc  $latest/START$resolution/startphy.nc
    231248      if [ $? = 0 ] ; then
    232249          init=OK
     
    237254      init=-
    238255   fi
     256########################################################################
     257   echo end of test cases
     258########################################################################   
    239259   bench=OK
    240260else
     
    243263fi
    244264
    245 latest=$RESU_D/latest
    246 \rm -f $latest
    247 ln -sf  $resubench $latest
     265if [ $justcheck = 0 ] ; then
     266    latest=$RESU_D/latest
     267    \rm -f $latest
     268    ln -sf  $resubench $latest
     269fi
     270
    248271
    249272cd $MODEL/m*/m*/
Note: See TracChangeset for help on using the changeset viewer.