New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
sette_rpt in trunk/NEMOGCM/SETTE – NEMO

source: trunk/NEMOGCM/SETTE/sette_rpt @ 4899

Last change on this file since 4899 was 4687, checked in by acc, 10 years ago

#1351 alternative loop structure to fix errors in dynspg_ts.F90 when compiling with -O3 and the ifort compiler. Without this change the AMM12 SETTE tests fail after 12 timesteps. Also included a single line efficiency change in domzgr.F90 and improvements to sette scripts and local NOCS files.

  • Property svn:executable set to *
File size: 10.6 KB
RevLine 
[3667]1#!/bin/csh -f
2#
3# simple SETTE report generator.
4#
5# This version should be run in the SETTE directory.
6# The machine name will be picked up from the sette.sh script but the location of the
7# validation directory needs to be set here (currently assumed to reside in the ../CONFIG directory)
8#
9  set mach = `grep "COMPILER=" ./sette.sh | sed -e 's/COMPILER=//'`
10  set NEMO_VALID = ../CONFIG/NEMO_VALIDATION
11#
12  if ( ! -d $NEMO_VALID ) then
13    echo "$NEMO_VALID validation directory not found"
14  endif
15#
16  set basedir = `pwd`
17  cd $NEMO_VALID
18#
[4687]19# The script also needs the date or revision tag. Currently this is taken from the latest sub-directory found in each directory
[3667]20#
21#
22# Now loop through all the test directories. On the second pass the user can optionally examine any mismatched
23# outputs
24#
25# This is crude but readable and easily extended for new test configurations
26
27foreach pass (0 1 )
[3715]28  if ( -d ./WGYRE_LONG ) then
[4687]29    set dorv = `ls -1rtd ./WGYRE_LONG/{$mach}/* | tail -1l `
30    set dorv = $dorv:t
[3715]31    set f1o = ./WGYRE_LONG/{$mach}/{$dorv}/LONG/ocean.output
32    set f1s = ./WGYRE_LONG/{$mach}/{$dorv}/LONG/solver.stat
33    set f2o = ./WGYRE_LONG/{$mach}/{$dorv}/SHORT/ocean.output
34    set f2s = ./WGYRE_LONG/{$mach}/{$dorv}/SHORT/solver.stat
[3667]35 
36    set nl = `wc -l $f2s`
37    tail -$nl[1] $f1s > f1.tmp$$
38    cmp -s f1.tmp$$ $f2s
39    if ( $status == 0 ) then
[4687]40      echo "GYRE        restartability  passed"
[3667]41    else
[4687]42      echo "GYRE        restartability  FAILED"
[3667]43      if ( $pass == 1 ) then
44        echo "<return> to view solver.stat differences"
45        set y = $<
[3715]46        sdiff f1.tmp$$ $f2s
[3667]47        echo "<return> to view ocean.output differences"
48        set y = $<
[3715]49        sdiff $f1o $f2o | grep "|"
[3667]50        echo "<return> to continue"
51        set y = $<
52      endif
53    endif
54    rm f1.tmp$$
55  endif
56 
57  if ( -d ./WORCA2LIMPIS_LONG ) then
[4687]58    set dorv = `ls -1rtd ./WORCA2LIMPIS_LONG/{$mach}/* | tail -1l `
59    set dorv = $dorv:t
[3667]60    set f1o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output
61    set f1s = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/LONG/solver.stat
62    set f2o = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/SHORT/ocean.output
63    set f2s = ./WORCA2LIMPIS_LONG/{$mach}/{$dorv}/SHORT/solver.stat
64 
65    set nl = `wc -l $f2s`
66    tail -$nl[1] $f1s > f1.tmp$$
67    cmp -s f1.tmp$$ $f2s
68    if ( $status == 0 ) then
69      echo "ORCA2LIMPIS restartability  passed"
70    else
71      echo "ORCA2LIMPIS restartability  FAILED"
72      if ( $pass == 1 ) then
73        echo "<return> to view solver.stat differences"
74        set y = $<
[3715]75        sdiff f1.tmp$$ $f2s
[3667]76        echo "<return> to view ocean.output differences"
77        set y = $<
[3715]78        sdiff $f1o $f2o | grep "|"
[3667]79        echo "<return> to continue"
80        set y = $<
81      endif
82    endif
83    rm f1.tmp$$
84  endif
85
86  if ( -d ./WORCA2OFFPIS_LONG ) then
[4687]87    set dorv = `ls -1rtd ./WORCA2OFFPIS_LONG/{$mach}/* | tail -1l `
88    set dorv = $dorv:t
[3667]89    set f1o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/ocean.output
90    set f1s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/LONG/tracer.stat
91    set f2o = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/SHORT/ocean.output
92    set f2s = ./WORCA2OFFPIS_LONG/{$mach}/{$dorv}/SHORT/tracer.stat
93
94    set nl = `wc -l $f2s`
95    tail -$nl[1] $f1s > f1.tmp$$
96    cmp -s f1.tmp$$ $f2s
97    if ( $status == 0 ) then
98      echo "ORCA2OFFPIS restartability  passed"
99    else
100      echo "ORCA2OFFPIS restartability  FAILED"
101      if ( $pass == 1 ) then
102        echo "<return> to view tracer.stat differences"
103        set y = $<
[3715]104        sdiff f1.tmp$$ $f2s
[3667]105        echo "<return> to view ocean.output differences"
106        set y = $<
[3715]107        sdiff $f1o $f2o | grep "|"
[3667]108        echo "<return> to continue"
109        set y = $<
110      endif
111    endif
112    rm f1.tmp$$
113  endif
114 
115  if ( -d ./WAMM12_LONG ) then
[4687]116    set dorv = `ls -1rtd ./WAMM12_LONG/{$mach}/* | tail -1l `
117    set dorv = $dorv:t
[3667]118    set f1o = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/ocean.output
119    set f1s = ./WAMM12_LONG/{$mach}/{$dorv}/LONG/solver.stat
120    set f2o = ./WAMM12_LONG/{$mach}/{$dorv}/SHORT/ocean.output
121    set f2s = ./WAMM12_LONG/{$mach}/{$dorv}/SHORT/solver.stat
122
123    set nl = `wc -l $f2s`
124    tail -$nl[1] $f1s > f1.tmp$$
125    cmp -s f1.tmp$$ $f2s
126    if ( $status == 0 ) then
127      echo "AMM12       restartability  passed"
128    else
129      echo "AMM12       restartability  FAILED"
130      if ( $pass == 1 ) then
131        echo "<return> to view solver.stat differences"
132        set y = $<
[3715]133        sdiff f1.tmp$$ $f2s
[3667]134        echo "<return> to view ocean.output differences"
135        set y = $<
[3715]136        sdiff $f1o $f2o | grep "|"
[3667]137        echo "<return> to continue"
138        set y = $<
139      endif
140    endif
141    rm f1.tmp$$
142  endif
[4687]143NEXT0:
144  if ( -d ./WSAS_LONG ) then
145    set dorv = `ls -1rtd ./WSAS_LONG/{$mach}/* | tail -1l `
146    set dorv = $dorv:t
147    set f1o = ./WSAS_LONG/{$mach}/{$dorv}/LONG/ocean.output
148    set f1s = ./WSAS_LONG/{$mach}/{$dorv}/LONG/solver.stat
149    set f2o = ./WSAS_LONG/{$mach}/{$dorv}/SHORT/ocean.output
150    set f2s = ./WSAS_LONG/{$mach}/{$dorv}/SHORT/solver.stat
[3667]151
[4687]152    foreach f ( $f1o $f1s $f2o $f2s )
153     if ( ! -f $f ) then
154      echo 'SAS         restartability  inconclusive ( ' $f:t ' not found )'
155      goto NEXT
156     endif
157    end
158
159    set nl = `wc -l $f2s`
160    tail -$nl[1] $f1s > f1.tmp$$
161    cmp -s f1.tmp$$ $f2s
162    if ( $status == 0 ) then
163      echo "SAS         restartability  passed"
164    else
165      echo "SAS         restartability  FAILED"
166      if ( $pass == 1 ) then
167        echo "<return> to view solver.stat differences"
168        set y = $<
169        sdiff f1.tmp$$ $f2s
170        echo "<return> to view ocean.output differences"
171        set y = $<
172        sdiff $f1o $f2o | grep "|"
173        echo "<return> to continue"
174        set y = $<
175      endif
176    endif
177    rm f1.tmp$$
178  endif
179
180NEXT:
[3667]181echo
182 
[3715]183  if ( -d ./WGYRE_4 ) then
[4687]184    set dorv = `ls -1rtd ./WGYRE_4/{$mach}/* | tail -1l `
185    set dorv = $dorv:t
[3715]186    set f1o = ./WGYRE_4/{$mach}/{$dorv}/REPRO_1_4/ocean.output
187    set f1s = ./WGYRE_4/{$mach}/{$dorv}/REPRO_1_4/solver.stat
188    set f2o = ./WGYRE_4/{$mach}/{$dorv}/REPRO_2_2/ocean.output
189    set f2s = ./WGYRE_4/{$mach}/{$dorv}/REPRO_2_2/solver.stat
[3667]190 
191    cmp -s $f1s $f2s
192    if ( $status == 0 ) then
[4687]193      echo "GYRE        reproducibility passed"
[3667]194    else
[4687]195      echo "GYRE        reproducibility FAILED"
[3667]196      if ( $pass == 1 ) then
197        echo "<return> to view solver.stat differences"
198        set y = $<
[3715]199        sdiff $f1s $f2s
[3667]200        echo "<return> to view ocean.output differences"
201        set y = $<
[3715]202        sdiff $f1o $f2o | grep "|"
[3667]203        echo "<return> to continue"
204        set y = $<
205      endif
206    endif
207  endif
208 
209  if ( -d ./WORCA2LIMPIS_16 ) then
[4687]210    set dorv = `ls -1rtd ./WORCA2LIMPIS_16/{$mach}/* | tail -1l `
211    set dorv = $dorv:t
[3667]212    set f1o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
213    set f1s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_2_8/solver.stat
214    set f2o = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output
215    set f2s = ./WORCA2LIMPIS_16/{$mach}/{$dorv}/REPRO_4_4/solver.stat
216 
217    cmp -s $f1s $f2s
218    if ( $status == 0 ) then
219      echo "ORCA2LIMPIS reproducibility passed"
220    else
221      echo "ORCA2LIMPIS reproducibility FAILED"
222      if ( $pass == 1 ) then
223        echo "<return> to view solver.stat differences"
224        set y = $<
[3715]225        sdiff $f1s $f2s
[3667]226        echo "<return> to view ocean.output differences"
227        set y = $<
[3715]228        sdiff $f1o $f2o | grep "|"
[3667]229        echo "<return> to continue"
230        set y = $<
231      endif
232    endif
233  endif
234
235  if ( -d ./WORCA2OFFPIS_16 ) then
[4687]236    set dorv = `ls -1rtd ./WORCA2OFFPIS_16/{$mach}/* | tail -1l `
237    set dorv = $dorv:t
[3667]238    set f1o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/ocean.output
239    set f1s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_2_8/tracer.stat
240    set f2o = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_4_4/ocean.output
241    set f2s = ./WORCA2OFFPIS_16/{$mach}/{$dorv}/REPRO_4_4/tracer.stat
242
243    cmp -s $f1s $f2s
244    if ( $status == 0 ) then
245      echo "ORCA2OFFPIS reproducibility passed"
246    else
247      echo "ORCA2OFFPIS reproducibility FAILED"
248      if ( $pass == 1 ) then
249        echo "<return> to view tracer.stat differences"
250        set y = $<
[3715]251        sdiff $f1s $f2s
[3667]252        echo "<return> to view ocean.output differences"
253        set y = $<
[3715]254        sdiff $f1o $f2o | grep "|"
[3667]255        echo "<return> to continue"
256        set y = $<
257      endif
258    endif
259  endif
260 
261  if ( -d ./WAMM12_32 ) then
[4687]262    set dorv = `ls -1rtd ./WAMM12_32/{$mach}/* | tail -1l `
263    set dorv = $dorv:t
[3667]264    set f1o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/ocean.output
265    set f1s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_4_8/solver.stat
266    set f2o = ./WAMM12_32/{$mach}/{$dorv}/REPRO_8_4/ocean.output
267    set f2s = ./WAMM12_32/{$mach}/{$dorv}/REPRO_8_4/solver.stat
268
269    cmp -s $f1s $f2s
270    if ( $status == 0 ) then
271      echo "AMM12       reproducibility passed"
272    else
273      echo "AMM12       reproducibility FAILED"
274      if ( $pass == 1 ) then
275        echo "<return> to view solver.stat differences"
276        set y = $<
[3715]277        sdiff $f1s $f2s
[3667]278        echo "<return> to view ocean.output differences"
279        set y = $<
[3715]280        sdiff $f1o $f2o | grep "|"
[3667]281        echo "<return> to continue"
282        set y = $<
283      endif
284    endif
285  endif
286
[4687]287  if ( -d ./WSAS_32 ) then
288    set dorv = `ls -1rtd ./WSAS_32/{$mach}/* | tail -1l `
289    set dorv = $dorv:t
290    set f1o = ./WSAS_32/{$mach}/{$dorv}/REPRO_4_8/ocean.output
291    set f1s = ./WSAS_32/{$mach}/{$dorv}/REPRO_4_8/solver.stat
292    set f2o = ./WSAS_32/{$mach}/{$dorv}/REPRO_8_4/ocean.output
293    set f2s = ./WSAS_32/{$mach}/{$dorv}/REPRO_8_4/solver.stat
294
295    foreach f ( $f1o $f1s $f2o $f2s )
296     if ( ! -f $f ) then
297      echo 'SAS         reproducibility inconclusive ( ' $f:t ' not found )'
298      goto NEXT1
299     endif
300    end
301
302    cmp -s $f1s $f2s
303    if ( $status == 0 ) then
304      echo "SAS reproducibility passed"
305    else
306      echo "SAS reproducibility FAILED"
307      if ( $pass == 1 ) then
308        echo "<return> to view solver.stat differences"
309        set y = $<
310        sdiff $f1s $f2s
311        echo "<return> to view ocean.output differences"
312        set y = $<
313        sdiff $f1o $f2o | grep "|"
314        echo "<return> to continue"
315        set y = $<
316      endif
317    endif
318  endif
319NEXT1:
320
[3715]321  if ( -d ./WORCA2AGUL_1_2 ) then
[4687]322    set dorv = `ls -1rtd ./WORCA2AGUL_1_2/{$mach}/* | tail -1l `
323    set dorv = $dorv:t
[3715]324    set f1o = ./WORCA2AGUL_1_2/{$mach}/{$dorv}/SHORT/ocean.output
325    set f1s = ./WORCA2AGUL_1_2/{$mach}/{$dorv}/SHORT/solver.stat
326
327    if ( -f $f1o && -f  $f1s ) then
328      echo "ORCA2_LIM_AGRIF runability passed"
329    else
330      echo "ORCA2_LIM_AGRIF runability FAILED"
331    endif
332  endif
333
[3667]334  echo "<return> for second (more detailed) pass (y/n)"
335  set y = $<
336  if ( $y != "y" ) exit
337end
338cd $basedir
339exit
Note: See TracBrowser for help on using the repository browser.