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.
assessment.ksh in trunk/VALID/2INSTALL/JOBS – NEMO

source: trunk/VALID/2INSTALL/JOBS/assessment.ksh @ 795

Last change on this file since 795 was 795, checked in by ctlod, 16 years ago

Modifications in NVTK's scripts related to the GYRE_LOBSTER configuration, see ticket:#52

  • Property svn:executable set to *
File size: 24.0 KB
Line 
1#!/bin/ksh
2######################################################
3# Original : C. Talandier for ESOPA
4# Contact  : opatlod@locean-ipsl.upmc.fr
5#
6# It is automatically launched (by the cron_jobs.ksh
7# script) when all runs (mon, mpi, (omp)) for a given
8# configuration are finished
9#
10# INPUT ARGS: 1 + 1 optional
11#     - CONF: configuration name (ORCA2_LIM, GYRE ..)
12#     - TODO: (optional) Arg=yes or empty to build
13#             output files including timing results.
14#             Specific to Zahir
15#
16# WORK: It aims to (for each standard configuration) :
17#
18#    I. Check Executable Memory size
19#       - from memory_size.txt output file
20#      *- compare it to a reference version
21#
22#   II. Check CPU time used (if specified)
23#       - from timing output files
24#      *- compare it to a reference version
25#
26#  III. Check the reproductibility between mon & mpi runs
27#       - making diff of solver.stat output files
28#
29#   IV. Check the restartability for mon & mpi runs
30#       - making diff of solver.stat output files
31#
32#    V.*Compare current results to a reference one
33#       
34#   VI. Send the assessment file "endjob.txt" using
35#       user's e-mail
36#       
37# * this step is performed only if a reference tag
38#   is passing through the specifs.txt file
39#   See the Makefile under ./config/HEAD directory
40#
41# It is based on the directories architecture below :
42#
43#         NEMO_VALID/WNAME_CONFIG/
44#                    |-- mon            --> MONO run
45#                    |   |-- 1_SHORT
46#                    |   |-- 2_SHORT
47#                    |   |-- LONG
48#                    |   `-- GTIME
49#                    |-- mpi            --> MPI run
50#                    |   |-- 1_SHORT
51#                    |   |-- 2_SHORT
52#                    |   |-- LONG
53#                    |   `-- GTIME
54#                    `-- omp            --> Open-MP run
55#                        |-- 1_SHORT
56#                        |-- 2_SHORT
57#                        |-- LONG
58#                        `-- GTIME
59#
60###########################################################
61#set -xv
62###########################################################
63CONF=$1
64TODO=$2
65TARGET=osxxlf
66VERSION=$( ( awk '/test=/ { print $2 }' specifs.txt ) )
67LRTYPE="$( ( awk '/runs=/ { printf  "%s %s %s", $2 , $3 , $4}' specifs.txt ) )"
68VTIME=$( ( awk '/time=/ { print $2 }' specifs.txt ) )
69REF_TAG=$( (awk '/tagname=/ {print $2}' specifs.txt) )
70TITLE="NEMO VALIDATION ${VERSION} : $CONF on $TARGET"
71EMAIL='ctlod@locean-ipsl.upmc.fr'
72
73\rm endjob.txt 2> /dev/null
74touch endjob.txt
75
76###########################################################
77# checkfile() is a local function to check if a file exist
78# 2 arguments:
79#    - zf2check : file name to check
80#    - zoutfile : output file name to print results
81#    - zwork    : kind of prints to perform
82#    - zreprint : (optional) to avoid printing twice a message
83###########################################################
84################ Begin checkfile function #################
85function checkfile
86{
87# name of the file to check
88zf2check=$1
89# print output file name
90zoutfile=$2
91# white space prints
92zworkt=$3
93# Print a message only once
94zreprint=$4
95
96#set -x
97
98test -n "${zreprint}"
99zrep=$?
100
101
102genf=$( basename ${zf2check} )
103
104case "${zworkt}" in
105      'NORM' )  blnk='       ' ;;
106      'DIFF' )  blnk=' '  ;;
107esac
108fmes4=" - file ${zf2check} doesn't exist "
109
110# Check file exists
111if [ -a ${zf2check} ] ; then
112    fmes1=" List ${genf} files and check date creation:   "
113    fmes2=" `ls -l ${zf2check}`           "
114    fmes3=" - file ${zf2check} is empty  "
115    [ ${zrep} == 0 ] && echo "${blnk}${fmes1}"  >> ${zoutfile}
116
117   # Check file is not empty
118   if [ -s ${zf2check} ] ; then
119       [ ${zoutfile} ] && echo "${blnk}${fmes2}" >> ${zoutfile}
120       xist=0 ; return ${xist}
121   else
122       [ ${zoutfile} ] &&  echo "${blnk}${fmes3}" >> ${zoutfile}
123       xist=1 ; return ${xist}
124   fi
125else
126   [ ${zoutfile} ] && echo "${blnk}${fmes4}" >> ${zoutfile}
127   xist=1 ; return ${xist}
128fi
129return
130}
131############### End checkfile function ###############
132######################################################
133
134# Get the name of the present script
135nscript=$( (basename $0) )
136
137###########################################################
138# mak_diff_file() is a local function which performs diff
139# on some files and print messages in the endjob.txt file
140# 7 input arguments:
141#    - zfex    : (0/1) (make/do not make) diff (files doesn't exist)
142#    - zfile1  : first input file name
143#    - zfile2  : second input file name
144#    - zruntype: run type (mon, mpi, omp)
145#    - zstream : stream of the run (long, stream_1, stream_2)
146#    - ztag    : the tag name to which are compared files
147#    - zkind   : kind of the check (repro/resta)
148###############################################################
149################ Begin mak_diff_file function #################
150function mak_diff_file
151{
152#
153# help_diff() To print help
154#
155function help_diff
156{
157  echo "Usage: ${nscript} [-x] [-a] [-b] [-r] [-s] [-t] [-k]"
158  echo "Options: These are optional argument"
159  echo " -x : (0/1) (make/do not make) diff "
160  echo " -a : first input file name"
161  echo " -b : second input file name"
162  echo " -r : run type (mon, mpi, omp)"
163  echo " -s : stream of the run (long, stream_1, stream_2)"
164  echo " -t : tag name to which are compared files"
165  echo " -k : kind of the check (repro/resta)" 
166  echo " their values are not taken)"
167  exit 1
168}
169
170##set -xv
171
172# Initialization
173zfex=1
174zfile1=
175zfile2=
176zruntype=
177zstream=
178ztag=
179zkind=none
180
181# Get arguments
182while getopts x:a:b:r:s:t:k: opt
183do
184  case "$opt" in
185    x) zfex="$OPTARG";;
186    a) zfile1="$OPTARG";;
187    b) zfile2="$OPTARG";;
188    r) zruntype="$OPTARG";;
189    s) zstream="$OPTARG";;
190    t) ztag="$OPTARG";;
191    k) zkind="$OPTARG";;
192    *) help_diff;;
193  esac
194done
195
196zgenf=$( basename ${zfile1} )
197zgenftrc=$( basename ${zfile1%.*} )
198
199case "$zkind" in
200  none ) 
201      zmesg1="                   Current run                                                     ${ztag} run   "
202      zmesg2="                   -----------                                                     --------------"
203      zmesg_NOK="        ${zstream} ${zgenf} is NOT identical to the version ${ztag} one"
204      zmesg_OK="        ${zstream} ${zgenf} IS IDENTICAL to the version ${ztag} one  "
205      zmesg_wht="        NO comparison between current ${zstream} and the version ${ztag} ${zgenf} "
206      bnam='cvref_'${zgenftrc}_${zstream}_${zruntype} ;;
207  repro ) 
208      zmesg1="                   mon run                                                         ${zruntype} run      "
209      zmesg2="                   -------                                                         -------      "
210      zmesg_NOK="        NO NO NO NO NO NO for the current version"
211      zmesg_OK="        YES YES YES YES YES YES YES YES for the current version "
212      zmesg_wht="        NO CONCLUSION !!!!!  "
213      bnam=${zkind}_${zgenftrc} ;;
214  resta ) 
215      zmesg1="                   LONG Stream                                                     SHORT Streams"
216      zmesg2="                   -----------                                                     -------------"
217      zmesg_NOK="        NO NO NO NO NO NO for the current version i.e. LONG stream != ( 1_SHORT + 2_SHORT ) streams "
218      zmesg_OK="        YES YES YES YES YES YES YES YES for the current version i.e. LONG stream = ( 1_SHORT + 2_SHORT ) streams "
219      zmesg_wht="        NO CONCLUSION !!!!!! "
220      bnam=${zkind}_${zgenftrc} ;;
221esac
222
223
224if [ ${zfex} == 0 ] ;  then
225    \rm ${bnam}.txt 2> /dev/null
226    echo "                                    Make difference between ${zgenf} files                       "  > ${bnam}.txt
227    echo "                                            ${zstream} ${zruntype} run                           " >> ${bnam}.txt
228    echo "${zmesg1}"                                                                                         >> ${bnam}.txt
229    echo "${zmesg2}"                                                                                         >> ${bnam}.txt
230    sdiff    ${zfile1} ${zfile2} >>  ${bnam}.txt
231    sdiff -s ${zfile1} ${zfile2} >>  ${bnam}_dd.txt
232
233    #---------
234    if [ ${zgenf} = 'ocean.output' ] ; then
235        echo "                                                                                                 " >> ${zstream}_head.txt
236        echo "                                    Make difference between ${zgenf} files                       "  > ${zstream}_head.txt
237        echo "                                            ${zstream} ${zruntype} run                           " >> ${zstream}_head.txt
238        echo "                   Current run                                                     ${ztag} run   " >> ${zstream}_head.txt
239        echo "                   -----------                                                     --------------" >> ${zstream}_head.txt
240        echo "                                                                                                 " >> ${zstream}_head.txt
241        zfout=${bnam}_dd.txt
242        zspmes=" See ${bnam}.txt file for full difference"
243    else
244        touch ${zstream}_head.txt
245        zfout=${bnam}.txt
246        zspmes=""
247    fi
248    #---------
249    if [ -s ${bnam}_dd.txt ] ; then
250    # Differences exist between solver.stat or ocean.output files
251       echo "                             " >> endjob.txt
252       echo "${zmesg_NOK}"                  >> endjob.txt
253       echo "           ${zspmes}         " >> endjob.txt
254       echo "                             " >> endjob.txt
255       cat ${zstream}_head.txt ${zfout}     >> endjob.txt
256       echo "                             " >> endjob.txt
257       echo "                             " >> endjob.txt
258    else
259       # No differences exist between solver.stat or ocean.output files
260       echo "                             " >> endjob.txt
261       echo "${zmesg_OK}"                   >> endjob.txt
262       echo "                             " >> endjob.txt
263    fi
264
265    \rm *_dd* *_head.txt 2> /dev/null
266
267else
268       # It is not possible to conclude because files are missing or empty
269       echo "                             " >> endjob.txt
270       echo "${zmesg_wht}"                  >> endjob.txt
271       echo "                             " >> endjob.txt
272fi
273
274return
275
276}
277############### End mak_diff_file function ####################
278###############################################################
279
280###########################################################
281# concat_perf() is a local function to gather performances
282# files (perfs_runtype.txt_xxxx) build with the hpmcount
283# command on Zahir and standard(s) error output file(s)
284# runtypeCONFNAME_err
285# 1 argument:
286#    - zconf : configuration name
287#############################################################
288################ Begin concat_perf function #################
289function concat_perf
290{
291
292#set -x
293
294# name of the configuration
295zconf=$1
296
297# List of files to treat
298zcatfe[0]="mon/LONG/mon${zconf}_err"
299zcatfe[1]="mon/GTIME/mon${zconf}_err"
300zcatfe[2]="mpi/GTIME/mpi${zconf}_err"
301
302ind=0
303while [ ${ind} -lt 3 ] ; do
304
305       zpath=$( ( dirname ${zcatfe[${ind}]} ) )
306       zname=$( ( basename ${zcatfe[${ind}]} ) )
307       cd ${zpath}
308       cp ${zname} ${zname}_save
309       for kf in `ls perf*` ; do
310           cat ${kf} >> ${zname}
311       done
312       cd ../..
313       let ind=${ind}+1
314done
315
316return
317}
318############### End concat_perf function ###############
319########################################################
320
321
322# ###############################
323# 0. CURRENT VERSION NAME
324# ###############################
325echo " ############################                           "  > endjob.txt
326echo " CURRENT VERSION: $VERSION                              " >> endjob.txt
327echo " ############################                           " >> endjob.txt
328echo "                                                        " >> endjob.txt
329echo "                                                        " >> endjob.txt
330
331test -n "${TODO}"
332id2do=$?
333if [ ${id2do} == 0 -a ${TARGET} = 'aix' ] ; then concat_perf ${CONF} ; fi
334
335#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
336#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
337# ###############################
338# I. CHECK EXECUTABLE MEMORY SIZE
339# ###############################
340filecs='mon/LONG/memory_size.txt' ;  filers='mon/LONG/REF/memory_size.txt'
341filecm="mon/LONG/mon${CONF}_err"  ;  filerm="mon/LONG/REF/mon${CONF}_err"
342xfilecs=0  ; xfilecm=0 ; xfilers=0 ; xfilerm=0
343echo " ############################                           " >> endjob.txt
344echo " CHECK EXECUTABLE MEMORY SIZE                           " >> endjob.txt
345echo " ############################                           " >> endjob.txt
346echo "                                                        " >> endjob.txt
347#--------
348checkfile ${filecs} 'endjob.txt' DIFF yes ; xfilecs=$?
349checkfile ${filers} 'endjob.txt' DIFF     ; xfilers=$?
350checkfile ${filecm} 'endjob.txt' DIFF     ; xfilecm=$?
351checkfile ${filerm} 'endjob.txt' DIFF     ; xfilerm=$?
352
353# If current version files exist
354if [ ${xfilecs} == 0 ] ;  then
355
356    if [ ${REF_TAG} ] ; then 
357        ./MEM_size_${TARGET}.ksh -a ${xfilecm} -b ${xfilers} -d ${xfilerm} -c ${CONF} -o endjob.txt -t ${REF_TAG} 
358    else
359        ./MEM_size_${TARGET}.ksh -a ${xfilecm} -b ${xfilers} -d ${xfilerm} -c ${CONF} -o endjob.txt
360    fi
361
362else
363    echo "                                                    " >> endjob.txt
364    echo "   ---> NO memory size check                        " >> endjob.txt
365    echo "                                                    " >> endjob.txt
366fi
367#
368#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
369#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
370# #######################
371# II. CHECK CPU TIME USED
372# #######################
373if [ ${VTIME} = 'timing' ] ; then
374
375    echo "                                                        " >> endjob.txt
376    echo " ######################                                 " >> endjob.txt
377    echo " CHECK CPU TIME USED                                    " >> endjob.txt
378    echo " ######################                                 " >> endjob.txt
379    echo "                                                        " >> endjob.txt
380    #------
381
382    for runt in ${LRTYPE} ; do
383
384        echo "                                                    " >> endjob.txt
385        echo "   ---> Timing for the ${runt} run :                " >> endjob.txt
386        echo "        ----------------------------                " >> endjob.txt
387        echo "                                                    " >> endjob.txt
388
389        xfilecv=0 ; xfilerv=0
390
391        # Check that timing file for the ${runt} current version exist
392        filecv="${runt}/GTIME/${runt}${CONF}_err" 
393        checkfile ${filecv} 'endjob.txt' NORM yes ; xfilecv=$?
394
395        # Check that timing file for the ${runt} reference version exist
396        filerv="${runt}/GTIME/REF/${runt}${CONF}_err" 
397        checkfile ${filerv} 'endjob.txt' NORM ; xfilerv=$?
398        echo "                                                             " >> endjob.txt
399
400        if [ ${xfilecv} == 0 ] ; then
401            if [ ${REF_TAG} ] ; then 
402                ./CPU_time_${TARGET}.ksh -r ${runt} -a ${filecv} -b ${filerv} -c ${CONF} -o endjob.txt -x ${xfilerv} -t ${REF_TAG} 
403            else
404                ./CPU_time_${TARGET}.ksh -r ${runt} -a ${filecv} -b ${filerv} -c ${CONF} -o endjob.txt -x ${xfilerv}
405            fi
406        fi
407
408    done
409
410fi
411
412#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
413#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
414# ########################################################
415# III. CHECK REPRODUCTIBILITY: mon .vs. mpi & mon .vs .omp
416# ########################################################
417echo "                                                        " >> endjob.txt
418echo " ######################                                 " >> endjob.txt
419echo " CHECK REPRODUCTIBILITY                                 " >> endjob.txt
420echo " ######################                                 " >> endjob.txt
421echo "                                                        " >> endjob.txt
422#------
423for runt in ${LRTYPE} ; do
424
425    if [ ${runt} != 'mon' ] ; then
426        echo "                                                    " >> endjob.txt
427        echo "   ---> Reproductibility mon .vs. ${runt} ? :       " >> endjob.txt
428        echo "        -------------------------------------       " >> endjob.txt
429
430        filemon="mon/LONG/solver.stat" ;  filexxx="${runt}/LONG/solver.stat"
431        xfilemon=0
432
433        checkfile ${filemon} 'endjob.txt' NORM yes ; xfilemon=$?
434        checkfile ${filexxx} 'endjob.txt' NORM ; xfilemon=$?
435       
436        mak_diff_file -x ${xfilemon} -a ${filemon} -b ${filexxx} -r ${runt} -s LONG -k repro
437       
438        if [ ${CONF} = 'GYRE_LOBSTER' ] ; then
439            echo "                                                    " >> endjob.txt
440            echo "   ---> BIO Reproductibility mon .vs. ${runt} ? :   " >> endjob.txt
441            echo "        -----------------------------------------   " >> endjob.txt
442
443            # check that ocean.output files exist
444            filemon="mon/LONG/ocean.output" ;  filexxx="${runt}/LONG/ocean.output"
445            xfilemon=0
446
447            checkfile ${filemon} 'endjob.txt' NORM yes ; xfilemon=$?
448            checkfile ${filexxx} 'endjob.txt' NORM ; xfilemon=$?
449           
450            # check that tracer.stat files have been built based on ocean.output ones
451            filemon="mon/LONG/tracer.stat" ;  filexxx="${runt}/LONG/tracer.stat"
452            xfilemon=0
453           
454            ./BIO_${TARGET}.ksh -a ${filemon} -b ${filexxx} -c ocean.output
455
456            checkfile ${filemon} 'endjob.txt' NORM yes ; xfilemon=$?
457            checkfile ${filexxx} 'endjob.txt' NORM ; xfilemon=$?
458           
459            mak_diff_file -x ${xfilemon} -a ${filemon} -b ${filexxx} -r ${runt} -s LONG -k repro
460        fi
461    fi
462done
463
464#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
465#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
466# ##########################################
467# IV. CHECK RESTARTABILITY: mon mpi omp runs
468# ##########################################
469echo "                                                        " >> endjob.txt
470echo " ####################                                   " >> endjob.txt
471echo " CHECK RESTARTABILITY                                   " >> endjob.txt
472echo " ####################                                   " >> endjob.txt
473echo "                                                        " >> endjob.txt
474
475for runt in ${LRTYPE} ; do
476
477    echo "                                                    " >> endjob.txt
478    echo "   ---> ${runt} restartability ? :                  " >> endjob.txt
479    echo "        --------------------------                  " >> endjob.txt
480
481    file1="${runt}/1_SHORT/solver.stat" ;  file2="${runt}/2_SHORT/solver.stat" ; file3="${runt}/LONG/solver.stat"
482    xfile1=0
483    #-------
484    checkfile ${file1} 'endjob.txt' NORM yes ; xfile1=$?
485    checkfile ${file2} 'endjob.txt' NORM ; xfile1=$?
486    #
487    cat ${file1} ${file2}  > short_solver_${runt}.stat
488    mak_diff_file -x ${xfile1} -a ${file3} -b short_solver_${runt}.stat -r ${runt} -k resta
489    \rm short_solver_${runt}.stat
490   
491    #-------
492
493    if [ ${CONF} = 'GYRE_LOBSTER' ] ; then
494        echo "                                                    " >> endjob.txt
495        echo "   ---> ${runt} BIO restartability ? :              " >> endjob.txt
496        echo "        ------------------------------              " >> endjob.txt
497
498       # check that ocean.output files exist
499        file1="${runt}/2_SHORT/ocean.output" ;  file2="${runt}/LONG/ocean.output"
500        xfile1=0
501
502        checkfile ${file1} 'endjob.txt' NORM yes ; xfile1=$?
503        checkfile ${file2} 'endjob.txt' NORM     ; xfile1=$?
504           
505        # check that tracer.stat files have been built based on ocean.output ones
506        file1="${runt}/2_SHORT/tracer.stat" ;  file2="${runt}/LONG/tracer.stat"
507        xfile1=0
508
509        ./BIO_${TARGET}.ksh -a ${file1} -b ${file2} -c ocean.output
510
511        checkfile ${file1} 'endjob.txt' NORM yes ; xfile1=$?
512        checkfile ${file2} 'endjob.txt' NORM     ; xfile1=$?
513        #
514        mak_diff_file -x ${xfile1} -a ${file2} -b ${file1} -r ${runt} -k resta
515
516    fi
517   
518done
519
520#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
521#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
522# #######################################################
523# V. COMPARE CURRENT ${runt} RESULTS TO THE $REF_TAG ONES
524# #######################################################
525
526# This step is realised only if a reference tag ${REF_TAG} is specified
527if [ ${REF_TAG} ] ; then
528
529    echo "                                                        " >> endjob.txt
530    echo " ####################################################   " >> endjob.txt
531    echo " COMPARE CURRENT VERSION RESULTS TO THE $REF_TAG ONES   " >> endjob.txt
532    echo " ####################################################   " >> endjob.txt
533    echo "                                                        " >> endjob.txt
534
535    for runt in ${LRTYPE} ; do
536
537        echo "   -----------------------------------------------------------------------------" >> endjob.txt
538        echo "   ---> ${runt} results :  current version  |   ${REF_TAG} version  STREAM 1 & 2" >> endjob.txt
539        echo '                        solver.stat    .vs.    solver.stat         ' >> endjob.txt
540        echo '                        ocean.output   .vs.    ocean.output        ' >> endjob.txt
541
542        file1="${runt}/1_SHORT/solver.stat"          ;  file2="${runt}/2_SHORT/solver.stat"
543        filev1="${runt}/1_SHORT/REF/solver.stat"     ;  filev2="${runt}/2_SHORT/REF/solver.stat"
544        file_oc1="${runt}/1_SHORT/ocean.output"      ;  file_oc2="${runt}/2_SHORT/ocean.output"
545        file_roc1="${runt}/1_SHORT/REF/ocean.output" ;  file_roc2="${runt}/2_SHORT/REF/ocean.output"
546        xfilev1=0 ; xfilev2=0 ; xfile_oc1=0 ; xfile_oc2=0
547
548        echo "                                           " >> endjob.txt
549        echo "        STREAM 1 results :                 " >> endjob.txt
550        echo "        -----------------                  " >> endjob.txt
551        #
552        #-------
553        # solver.stat STREAM 1
554        checkfile ${file1}  'endjob.txt' NORM yes ; xfilev1=$?
555        checkfile ${filev1} 'endjob.txt' NORM ; xfilev1=$?
556   
557        mak_diff_file -x ${xfilev1} -a ${file1} -b ${filev1} -r ${runt} -s STREAM_1 -t ${REF_TAG}
558   
559        #-------
560        # ocean.output STREAM 1
561        checkfile ${file_oc1}  'endjob.txt' NORM yes ; xfile_oc1=$?
562        checkfile ${file_roc1} 'endjob.txt' NORM ; xfile_oc1=$?
563   
564        mak_diff_file -x ${xfile_oc1} -a ${file_oc1} -b ${file_roc1} -r ${runt} -s STREAM_1 -t ${REF_TAG}
565   
566        echo "                                           " >> endjob.txt
567        echo "        STREAM 2 results :                 " >> endjob.txt
568        echo "        -----------------                  " >> endjob.txt
569        #
570        #-------
571        # solver.stat STREAM 2
572        checkfile ${file2}  'endjob.txt' NORM yes ; xfilev2=$?
573        checkfile ${filev2} 'endjob.txt' NORM ; xfilev2=$?
574   
575        mak_diff_file -x ${xfilev2} -a ${file2} -b ${filev2} -r ${runt} -s STREAM_2 -t ${REF_TAG}
576   
577        #-------
578        # ocean.output STREAM 2
579        checkfile ${file_oc2}  'endjob.txt' NORM yes ; xfile_oc2=$?
580        checkfile ${file_roc2} 'endjob.txt' NORM ; xfile_oc2=$?
581   
582        mak_diff_file -x ${xfile_oc2} -a ${file_oc2} -b ${file_roc2} -r ${runt} -s STREAM_2 -t ${REF_TAG}
583   
584    done
585    #
586    #-------
587fi
588
589#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
590#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
591# ###############################################
592# VI. SEND THE ASSESSMENT FILE REPORT "endjob.txt"
593# ###############################################
594mail -s "$TITLE" ${EMAIL} < endjob.txt
Note: See TracBrowser for help on using the repository browser.