#!/bin/csh -f # # simple SETTE report generator. # # This version should be run in the SETTE directory. # The machine name will be picked up from the sette.sh script but the location of the # validation directory needs to be set here (currently assumed to reside in the ../CONFIG directory) # set mach = `grep "COMPILER=" ./sette.sh | sed -e 's/COMPILER=//'` set NEMO_VALID = ../CONFIG/NEMO_VALIDATION # if ( ! -d $NEMO_VALID ) then echo "$NEMO_VALID validation directory not found" endif # set basedir = `pwd` cd $NEMO_VALID # # The script also needs the date or revision tag. Currently this is taken from the latest sub-directory # found in the WGYRELOB_LONG directory # set dorv = `ls -1rtd ./WGYRELOB_LONG/{$mach}/* | tail -1l ` set dorv = $dorv:t # # Now loop through all the test directories. On the second pass the user can optionally examine any mismatched # outputs # # This is crude but readable and easily extended for new test configurations # foreach pass (0 1 ) if ( -d ./WGYRELOB_LONG ) then set f1o = ./WGYRELOB_LONG/{$mach}/{$dorv}/LONG/ocean.output set f1s = ./WGYRELOB_LONG/{$mach}/{$dorv}/LONG/solver.stat set f2o = ./WGYRELOB_LONG/{$mach}/{$dorv}/SHORT/ocean.output set f2s = ./WGYRELOB_LONG/{$mach}/{$dorv}/SHORT/solver.stat set nl = `wc -l $f2s` tail -$nl[1] $f1s > f1.tmp$$ cmp -s f1.tmp$$ $f2s if ( $status == 0 ) then echo "GYRELOB restartability passed" else echo "GYRELOB restartability FAILED" if ( $pass == 1 ) then echo " to view solver.stat differences" set y = $< sdiff -W f1.tmp$$ $f2s echo " to view ocean.output differences" set y = $< sdiff -W $f1o $f2o | grep "|" echo " to continue" set y = $< endif endif rm f1.tmp$$ endif if ( -d ./WORCA2LIMPIS_LONG ) then set f1o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output set f1s = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/solver.stat set f2o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/SHORT/ocean.output set f2s = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/SHORT/solver.stat set nl = `wc -l $f2s` tail -$nl[1] $f1s > f1.tmp$$ cmp -s f1.tmp$$ $f2s if ( $status == 0 ) then echo "ORCA2LIMPIS restartability passed" else echo "ORCA2LIMPIS restartability FAILED" if ( $pass == 1 ) then echo " to view solver.stat differences" set y = $< sdiff -W f1.tmp$$ $f2s echo " to view ocean.output differences" set y = $< sdiff -W $f1o $f2o | grep "|" echo " to continue" set y = $< endif endif rm f1.tmp$$ endif if ( -d ./WORCA2OFFPIS_LONG ) then set f1o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output set f1s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/tracer.stat set f2o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/SHORT/ocean.output set f2s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/SHORT/tracer.stat set nl = `wc -l $f2s` tail -$nl[1] $f1s > f1.tmp$$ cmp -s f1.tmp$$ $f2s if ( $status == 0 ) then echo "ORCA2OFFPIS restartability passed" else echo "ORCA2OFFPIS restartability FAILED" if ( $pass == 1 ) then echo " to view tracer.stat differences" set y = $< sdiff -W f1.tmp$$ $f2s echo " to view ocean.output differences" set y = $< sdiff -W $f1o $f2o | grep "|" echo " to continue" set y = $< endif endif rm f1.tmp$$ endif if ( -d ./WAMM12_LONG ) then set f1o = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/ocean.output set f1s = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/solver.stat set f2o = ./WAMM12_LONG/{$mach}/{$dorv}/SHORT/ocean.output set f2s = ./WAMM12_LONG/{$mach}/{$dorv}/SHORT/solver.stat set nl = `wc -l $f2s` tail -$nl[1] $f1s > f1.tmp$$ cmp -s f1.tmp$$ $f2s if ( $status == 0 ) then echo "AMM12 restartability passed" else echo "AMM12 restartability FAILED" if ( $pass == 1 ) then echo " to view solver.stat differences" set y = $< sdiff -W f1.tmp$$ $f2s echo " to view ocean.output differences" set y = $< sdiff -W $f1o $f2o | grep "|" echo " to continue" set y = $< endif endif rm f1.tmp$$ endif echo if ( -d ./WGYRELOB_4 ) then set f1o = ./WGYRELOB_4/{$mach}/{$dorv}/REPRO_1_4/ocean.output set f1s = ./WGYRELOB_4/{$mach}/{$dorv}/REPRO_1_4/solver.stat set f2o = ./WGYRELOB_4/{$mach}/{$dorv}/REPRO_2_2/ocean.output set f2s = ./WGYRELOB_4/{$mach}/{$dorv}/REPRO_2_2/solver.stat cmp -s $f1s $f2s if ( $status == 0 ) then echo "GYRELOB reproducibility passed" else echo "GYRELOB reproducibility FAILED" if ( $pass == 1 ) then echo " to view solver.stat differences" set y = $< sdiff -W $f1s $f2s echo " to view ocean.output differences" set y = $< sdiff -W $f1o $f2o | grep "|" echo " to continue" set y = $< endif endif endif if ( -d ./WORCA2LIMPIS_16 ) then set f1o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output set f1s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/solver.stat set f2o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output set f2s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_4_4/solver.stat cmp -s $f1s $f2s if ( $status == 0 ) then echo "ORCA2LIMPIS reproducibility passed" else echo "ORCA2LIMPIS reproducibility FAILED" if ( $pass == 1 ) then echo " to view solver.stat differences" set y = $< sdiff -W $f1s $f2s echo " to view ocean.output differences" set y = $< sdiff -W $f1o $f2o | grep "|" echo " to continue" set y = $< endif endif endif if ( -d ./WORCA2OFFPIS_16 ) then set f1o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output set f1s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/tracer.stat set f2o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output set f2s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_4_4/tracer.stat cmp -s $f1s $f2s if ( $status == 0 ) then echo "ORCA2OFFPIS reproducibility passed" else echo "ORCA2OFFPIS reproducibility FAILED" if ( $pass == 1 ) then echo " to view tracer.stat differences" set y = $< sdiff -W $f1s $f2s echo " to view ocean.output differences" set y = $< sdiff -W $f1o $f2o | grep "|" echo " to continue" set y = $< endif endif endif if ( -d ./WAMM12_32 ) then set f1o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/ocean.output set f1s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/solver.stat set f2o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_8_4/ocean.output set f2s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_8_4/solver.stat cmp -s $f1s $f2s if ( $status == 0 ) then echo "AMM12 reproducibility passed" else echo "AMM12 reproducibility FAILED" if ( $pass == 1 ) then echo " to view solver.stat differences" set y = $< sdiff -W $f1s $f2s echo " to view ocean.output differences" set y = $< sdiff -W $f1o $f2o | grep "|" echo " to continue" set y = $< endif endif endif echo " for second (more detailed) pass (y/n)" set y = $< if ( $y != "y" ) exit end cd $basedir exit