Index: trunk/NVTK/INSTALL/JOBS/CPU_time_sx8mercure.ksh
===================================================================
--- trunk/NVTK/INSTALL/JOBS/CPU_time_sx8mercure.ksh	(revision 1366)
+++ trunk/NVTK/INSTALL/JOBS/CPU_time_sx8mercure.ksh	(revision 1366)
@@ -0,0 +1,183 @@
+#!/bin/ksh
+# $Id: CPU_time_sx8brodie.ksh 1301 2009-02-09 17:15:38Z ctlod $
+##############################################################
+# Original : C. Talandier for NEMO team
+# Contact  : nemo_st@locean-ipsl.upmc.fr
+#
+# It is called by the assessment.ksh script for a 
+# given configuration 
+#
+# INPUT ARGS: 6
+#     - zfile1 : mon run timing input file name
+#     - zfile2 : mpi run timing input file name
+#     - zconf  : configuration name
+#     - zout   : output file name
+#     - ztag   : tag name to which are compared files
+#     - zxis   : (0/1) reference timing files (do/do not) exist
+#
+# WORK: It aims to :
+#
+#      - Treat output timing from the sx8brodie target for 
+#        mon, mpi & omp runs
+#     *- compare it to a reference version 
+#
+# * this step is performed only if a reference tag 
+#   is specified with the -t option and if files exist.
+#   See the Makefile under ./config/NVTK directory
+#
+##############################################################
+#set -xv
+##############################################################
+
+# Get the name of the present script
+nscript=$( (basename $0) )
+
+#
+# help_CPU_time() To print help
+#
+function help_CPU_time
+{
+  echo "Usage: $nscript [-r] [-a] [-b] [-c] [-o] [-t] [-x]"
+  echo "Options: These are optional argument"
+  echo " -r : run type to treat"
+  echo " -a : current version timing input file name"
+  echo " -b : reference version timing input file name"
+  echo " -c : configuration name"
+  echo " -o : output file name"
+  echo " -t : tag name to which are compared files"
+  echo " -x : (0/1) reference timing files (do/do not) exist"
+  echo " their values are not taken)"
+  exit 1
+}
+
+# Initialization
+zrunt=
+zfile1=
+zfile2=
+zconf=
+zout=
+ztag=
+zxis=1
+
+# Get arguments
+while getopts r:a:b:c:o:t:x: opt
+do
+  case "$opt" in
+    r) zrunt="$OPTARG";;
+    a) zfile1="$OPTARG";;
+    b) zfile2="$OPTARG";;
+    c) zconf="$OPTARG";;
+    o) zout="$OPTARG";;
+    t) ztag="$OPTARG";;
+    x) zxis="$OPTARG";;
+    *) help_CPU_time;;
+  esac
+done
+
+# Check if results must be compare to the reference version
+test -n "${ztag}"
+evaltag=$?
+
+case "${zrunt}" in
+
+     'mon' | 'omp' )
+
+           # OUTPUT TIMING OF THE MON/OMP RUN
+           ###################################
+           
+           if [ ${evaltag} == 0 -a ${zxis} == 0 ] ; then
+               # Get values from the reference tag
+               zreal=$( (awk '/Real/        {print $NF}' ${zfile2} ) )
+               zuser=$( (awk '/User/        {print $NF}' ${zfile2} ) )
+               zmflo=$( (awk '/MFLOPS/ && ! /concurrent/      {print $NF}' ${zfile2} ) )
+               [ ${zrunt} = 'omp' ] && zmfli=$( (awk '/MFLOPS/ &&   /concurrent/      {print $NF}' ${zfile2} ) )
+               [ ${zrunt} = 'omp' ] && zmprc=$( (awk '/Max Concurrent Proc/           {print $NF}' ${zfile2} ) )
+               zvlen=$( (awk '/VLEN/        {print $NF}' ${zfile2} ) )
+               zmemo=$( (awk '/Memory Size/ {print $NF}' ${zfile2} ) )
+               # Print: Variable long name | current version values | reference version values | variations
+               echo "                                Current version    ${ztag} version    Variation " >> ${zout}
+               awk '/Real/         { creal=$5 ; printf("%-5s %.25s  %10.2f      | %10.2f    |   %7.2f % \n", " ", $0, $NF, invar, ((creal-invar)/invar)*100 ) }' invar=${zreal} ${zfile1} >> ${zout}
+               awk '/User/         { cuser=$5 ; printf("%-5s %.25s  %10.2f      | %10.2f    |   %7.2f % \n", " ", $0, $NF, invar, ((cuser-invar)/invar)*100 ) }' invar=${zuser} ${zfile1} >> ${zout}
+               awk '/MFLOPS/ && ! /concurrent/      { cmflo=$3 ; printf("%-5s %.25s  %10.2f      | %10.2f    |   %7.2f % \n", " ", $0, $NF, invar, ((cmflo-invar)/invar)*100 ) }' invar=${zmflo} ${zfile1} >> ${zout}
+               [ ${zrunt} = 'omp' ] && awk '/MFLOPS/ &&   /concurrent/      { cmfli=$4 ; printf("%-5s %.25s  %10.2f      | %10.2f    |   %7.2f % \n", " ", $0, $NF, invar, ((cmfli-invar)/invar)*100 ) }' invar=${zmfli} ${zfile1} >> ${zout}
+               awk '/VLEN/         { cvlen=$3 ; printf("%-5s %.25s  %10.2f      | %10.2f    |   %7.2f % \n", " ", $0, $NF, invar, ((cvlen-invar)/invar)*100 ) }' invar=${zvlen} ${zfile1} >> ${zout}
+               awk '/Memory Size/  { cmemo=$5 ; printf("%-5s %.25s  %10.2f      | %10.2f    |   %7.2f % \n", " ", $0, $NF, invar, ((cmemo-invar)/invar)*100 ) }' invar=${zmemo} ${zfile1} >> ${zout} 
+               [ ${zrunt} = 'omp' ] && awk '/Max Concurrent Proc/  { cmprc=$5 ; printf("%-5s %.25s  %10i      | %10i    |   %7i \n", " ", $0, $NF, invar, (cmprc-invar) ) }' invar=${zmprc} ${zfile1} >> ${zout} 
+           else
+               # Print: Variable long name | current version values
+               echo "                                 Current version " >> ${zout}
+               awk '/Real/        {printf("%-5s %.25s  %10.2f\n", " ", $0, $NF ) }' ${zfile1} >> ${zout}
+               awk '/User/        {printf("%-5s %.25s  %10.2f\n", " ", $0, $NF ) }' ${zfile1} >> ${zout}
+               awk '/MFLOPS/ && ! /concurrent/     {printf("%-5s %.25s  %10.2f\n", " ", $0, $NF ) }' ${zfile1} >> ${zout}
+               [ ${zrunt} = 'omp' ] && awk '/MFLOPS/ &&   /concurrent/     {printf("%-5s %.25s  %10.2f\n", " ", $0, $NF ) }' ${zfile1} >> ${zout}
+               awk '/VLEN/        {printf("%-5s %.25s  %10.2f\n", " ", $0, $NF ) }' ${zfile1} >> ${zout}
+               awk '/Memory Size/ {printf("%-5s %.25s  %10.2f\n", " ", $0, $NF ) }' ${zfile1} >> ${zout}
+               [ ${zrunt} = 'omp' ] && awk '/Max Concurrent Proc/  { cmprc=$5 ; printf("%-5s %.25s  %10i\n", " ", $0, $NF ) }' ${zfile1} >> ${zout} 
+           fi 
+
+           ;;
+
+     'mpi' )
+           # OUTPUT TIMING OF THE MPI RUN
+           ##############################
+           
+           if [ ${evaltag} == 0 -a ${zxis} == 0 ] ; then
+               # Get reference tag information
+               # Syntax: 1) search pattern between // symbol, 2) print text of the last column (identified by $NF)
+               zreal=$( (awk '( /\[/ && /\]/ ) && /Real/                           {print $NF}' ${zfile2} ) )
+               zuser=$( (awk '( /\[/ && /\]/ ) && /User/                           {print $NF}' ${zfile2} ) )
+               zmflo=$( (awk '( /\[/ && /\]/ ) && /MFLOPS/                         {print $NF}' ${zfile2} ) )
+               zvlen=$( (awk '( /\[/ && /\]/ ) && /Average Vector Length/          {print $NF}' ${zfile2} ) )
+               zmemo=$( (awk '( /\[/ && /\]/ ) && ! /Global/ && /Memory size used/ {print $NF}' ${zfile2} ) )
+           
+               # Print: Variable long name | current version values | reference version values | variations
+               # Syntax: 1) search pattern between // symbol, 2) print text & values following a format (printf) explicited between "" symbol
+               awk '/Global Data/ { printf( "        %.29s  Current version   %s version      Variation \n", $0, tag) }' tag=${ztag} ${zfile1} >> ${zout}
+               awk '/==========================/ { printf("        %s \n", $0) }' ${zfile1} >> ${zout}
+               awk '( /\[/ && /\]/ ) && /Real/                  { printf( "%-7s %.29s  %10.2f     |   %10.2f    |    %7.2f %\n", " ", $0 , $NF, invar, (($NF-invar)/invar)*100 ) }' invar=${zreal} ${zfile1} >> ${zout}
+               awk '( /\[/ && /\]/ ) && /User/                  { printf( "%-7s %.29s  %10.2f     |   %10.2f    |    %7.2f %\n", " ", $0 , $NF, invar, (($NF-invar)/invar)*100 ) }' invar=${zuser} ${zfile1} >> ${zout}
+               awk '( /\[/ && /\]/ ) && /MFLOPS/                { printf( "%-7s %.29s  %10.2f     |   %10.2f    |    %7.2f %\n", " ", $0 , $NF, invar, (($NF-invar)/invar)*100 ) }' invar=${zmflo} ${zfile1} >> ${zout}
+               awk '( /\[/ && /\]/ ) && /Average Vector Length/ { printf( "%-7s %.29s  %10.2f     |   %10.2f    |    %7.2f %\n", " ", $0 , $NF, invar, (($NF-invar)/invar)*100 ) }' invar=${zvlen} ${zfile1} >> ${zout}
+               awk '( /\[/ && /\]/ ) && /Memory size used/ && !/Global/ { printf( "%-7s %.29s  %10.2f     |   %10.2f    |    %7.2f %\n", " ", $0 , $NF, invar, (($NF-invar)/invar)*100 ) }' invar=${zmemo} ${zfile1} >> ${zout}
+               echo " " >> ${zout} 
+           
+               # Get reference tag information (Overall data)
+               # Syntax: 1) search pattern between // symbol, 2) print text of the last column (identified by $NF)
+               zreal=$( (awk '!( /\[/ && /\]/ ) && /Real/                           {print $NF}' ${zfile2} ) )
+               zuser=$( (awk '!( /\[/ && /\]/ ) && ! /OPS/ && /User/                {print $NF}' ${zfile2} ) )
+               zgflo=$( (awk '!( /\[/ && /\]/ ) && /GFLOPS/                         {print $NF}' ${zfile2} ) )
+               zmemo=$( (awk '!( /\[/ && /\]/ ) && ! /Global/ && /Memory size used/ {print $NF}' ${zfile2} ) )
+           
+               # Print: Variable long name | current version values 
+               # Syntax: 1) search pattern between // symbol, 2) print text & values following a format (printf) explicited between "" symbol
+               awk '/Overall Data/ { printf( "        %-28s  Current version   %s version       Variation \n", $0, tag) }' tag=${ztag} ${zfile1} >> ${zout}
+               echo "        =============" >> ${zout} 
+               awk '!( /\[/ && /\]/ ) && /Real/             { printf( "%-7s %.29s  %10.2f     |   %10.2f    |    %7.2f %\n", " ", $0 , $NF, invar, (($NF-invar)/invar)*100 ) }' invar=${zreal} ${zfile1} >> ${zout}
+               awk '!( /\[/ && /\]/ ) && ! /OPS/ && /User/  { printf( "%-7s %.29s  %10.2f     |   %10.2f    |    %7.2f %\n", " ", $0 , $NF, invar, (($NF-invar)/invar)*100 ) }' invar=${zuser} ${zfile1} >> ${zout}
+               awk '!( /\[/ && /\]/ ) && /GFLOPS/           { printf( "%-7s %.29s  %10.2f     |   %10.2f    |    %7.2f %\n", " ", $0 , $NF, invar, (($NF-invar)/invar)*100 ) }' invar=${zgflo} ${zfile1} >> ${zout}
+               awk '!( /\[/ && /\]/ ) && /Memory size used/ && !/Global/ { printf( "%-7s %.29s  %10.2f     |   %10.2f    |    %7.2f %\n", " ", $0 , $NF, invar, (($NF-invar)/invar)*100 ) }' invar=${zmemo} ${zfile1} >> ${zout}
+               echo " " >> ${zout} 
+           
+           else
+           
+               # Print: Variable long name | current version values 
+               awk '/Global Data/ { printf( "        %.29s   Current version\n ", $0) }' ${zfile1} >> ${zout}
+               awk '/==========================/ { printf("%-7s %-.26s \n", " ", $0) } ' ${zfile1} >> ${zout}
+               awk '( /\[/ && /\]/ ) && /Real/                  { printf( "%-7s %.29s  %10.2f \n", " ", $0 , $NF) }' ${zfile1} >> ${zout}
+               awk '( /\[/ && /\]/ ) && /User/                  { printf( "%-7s %.29s  %10.2f \n", " ", $0 , $NF) }' ${zfile1} >> ${zout}
+               awk '( /\[/ && /\]/ ) && /MFLOPS/                { printf( "%-7s %.29s  %10.2f \n", " ", $0 , $NF) }' ${zfile1} >> ${zout}
+               awk '( /\[/ && /\]/ ) && /Average Vector Length/ { printf( "%-7s %.29s  %10.2f \n", " ", $0 , $NF) }' ${zfile1} >> ${zout}
+               awk '( /\[/ && /\]/ ) && /Memory size used/ && ! /Global/ { printf( "%-7s %.29s  %10.2f \n", " ", $0 , $NF) }' ${zfile2} >> ${zout}
+               echo " " >> ${zout} 
+           
+               # Print: Variable long name | current version values (Overall data)
+               awk '/Overall Data/ { printf( "        %-28s   Current version\n ", $0 ) }' ${zfile1} >> ${zout}
+               echo "        =============" >> ${zout} 
+               awk '!( /\[/ && /\]/ ) && /Real/             { printf( "%-7s %.29s  %10.2f \n", " ", $0 , $NF ) }' ${zfile1} >> ${zout}
+               awk '!( /\[/ && /\]/ ) && ! /OPS/ && /User/  { printf( "%-7s %.29s  %10.2f \n", " ", $0 , $NF ) }' ${zfile1} >> ${zout}
+               awk '!( /\[/ && /\]/ ) && /GFLOPS/           { printf( "%-7s %.29s  %10.2f \n", " ", $0 , $NF ) }' ${zfile1} >> ${zout}
+               awk '!( /\[/ && /\]/ ) && /Memory size used/  && ! /Global/ { printf( "%-7s %.29s  %10.2f \n", " ", $0 , $NF ) }' ${zfile1} >> ${zout}
+               echo "" >> ${zout} 
+           fi
+           ;;
+esac
Index: trunk/NVTK/INSTALL/JOBS/MEM_size_sx8mercure.ksh
===================================================================
--- trunk/NVTK/INSTALL/JOBS/MEM_size_sx8mercure.ksh	(revision 1366)
+++ trunk/NVTK/INSTALL/JOBS/MEM_size_sx8mercure.ksh	(revision 1366)
@@ -0,0 +1,106 @@
+#!/bin/ksh
+# $Id: MEM_size_sx8brodie.ksh 1301 2009-02-09 17:15:38Z ctlod $
+##############################################################
+# Original : C. Talandier for NEMO team
+# Contact  : nemo_st@locean-ipsl.upmc.fr
+#
+# It is called by the assessment.ksh script for a 
+# given configuration 
+#
+# INPUT ARGS: 6
+#     - zxcm   : (0/1) mon${zconf}_err file (do/do not) exist"
+#     - zxrs   : (0/1) Ref memory_size.txt file (do/do not) exist"
+#     - zxrm   : (0/1) Ref mon${zconf}_err file (do/do not) exist"
+#     - zexp   : experience name directory"
+#     - zconf  : configuration name"
+#     - zout   : output file name"
+#     - ztag   : tag name to which are compared files"
+#
+# WORK: It aims to :
+#
+#      - Treat output timing from the sx8brodie target for 
+#        mon, mpi & omp runs
+#     *- compare it to a reference version 
+#
+# * this step is performed only if a reference tag 
+#   is specified with the -t option and if files exist.
+#   See the Makefile under ./config/NVTK directory
+#
+##############################################################
+#set -xv
+##############################################################
+
+# Get the name of the present script
+nscript=$( (basename $0) )
+
+#
+# help_CPU_time() To print help
+#
+function help_CPU_time
+{
+  echo "Usage: $nscript [-a] [-b] [-d] [-e] [-c] [-o] [-t]"
+  echo "Options: These are optional argument"
+  echo " -a : (0/1) mon${zconf}_err file (do/do not) exist"
+  echo " -b : (0/1) Ref memory_size.txt file (do/do not) exist"
+  echo " -d : (0/1) Ref mon${zconf}_err file (do/do not) exist"
+  echo " -e : experience name directory"
+  echo " -c : configuration name"
+  echo " -o : output file name"
+  echo " -t : tag name to which are compared files"
+  echo " their values are not taken)"
+  exit 1
+}
+
+# Initialization
+zxcm=1
+zxrs=1
+zxrm=1
+zexp=
+zconf=
+zout=
+ztag=
+
+# Get arguments
+while getopts a:b:d:e:c:o:t: opt
+do
+  case "$opt" in
+    a) zxcm="$OPTARG";;
+    b) zxrs="$OPTARG";;
+    d) zxrm="$OPTARG";;
+    e) zexp="$OPTARG";;
+    c) zconf="$OPTARG";;
+    o) zout="$OPTARG";;
+    t) ztag="$OPTARG";;
+    *) help_MEM_size;;
+  esac
+done
+
+# Check if results must be compared to the reference version
+test -n "${ztag}"
+evaltag=$?
+
+zfilecs="mon/LONG/${zexp}/memory_size.txt" ;  zfilers='mon/LONG/REF/memory_size.txt'
+zfilecm="mon/LONG/${zexp}/mon${zconf}_err"  ;  zfilerm="mon/LONG/REF/mon${zconf}_err"
+
+# If reference version files exist
+if [ ${evaltag} == 0 -a ${zxrm} == 0 ] ;  then
+    # Get values from the reference tag
+    Mo_stack_ms=$( (awk '/Stack/ {print $NF/(1024*1024) }' ${zfilers} ) )
+    Mo_stati_ms=$( (awk '/Stati/ {print $NF/(1024*1024) }' ${zfilers} ) )
+    if [ ${zxcm} == 0 ] ; then Mo_max_used=$( (awk '/Memory/ {print $NF}' ${zfilerm} ) ) ; fi
+
+    # Print: Variable long name | current version values | reference version values | variations
+    echo "                                                 " >> ${zout}
+    echo "                                      Version    " >> ${zout}
+    echo "             Memory          Current /       \ ${ztag}        Variation " >> ${zout}
+    awk ' /Stack/ { val=$NF/(1024*1024) } END {printf("%-9s %-16s %8.1f      |   %8.1f     |    %5.1f %\n ", " ", "Stack     (Mo) :", val, inck, ((val-inck)/inck)*100 ) }' inck=${Mo_stack_ms} ${zfilecs} >> ${zout}
+    awk ' /Stati/ { val=$NF/(1024*1024) } END {printf("%-8s %-16s %8.1f      |   %8.1f     |    %5.1f %\n ", " ", "Static    (Mo) :", val, inti, ((val-inti)/inti)*100 ) }' inti=${Mo_stati_ms} ${zfilecs} >> ${zout}
+    if [ ${zxcm} == 0 ] ; then awk ' /Memory/ { val=$NF } END {printf("%-8s %-16s %8.1f      |   %8.1f     |    %5.1f %\n ", " ", "Max. used (Mo) :", val, inus, ((val-inus)/inus)*100 ) }' inus=${Mo_max_used} ${zfilecm} >> ${zout} ; fi
+else
+    # Print: Variable long name | current version values
+    echo "                                                 " >> ${zout}
+    echo "             Memory          Current version "     >> ${zout}
+    awk ' /Stack/  {printf("%-9s %-.16s %11.1f\n ", " ", "Stack     (Mo) :", $NF/(1024*1024) ) }' ${zfilecs} >> ${zout}
+    awk ' /Stati/  {printf("%-8s %-.16s %11.1f\n ", " ", "Static    (Mo) :", $NF/(1024*1024) ) }' ${zfilecs} >> ${zout}
+    if [ ${zxcm} == 0 ] ; then awk ' /Memory/   {printf("%-8s %-.16s %11.1f\n ", " ", "Max. used (Mo) :", $NF ) }' ${zfilecm} >> ${zout} ; fi
+fi
Index: trunk/NVTK/INSTALL/JOBS/jhd_sx8mercure_mon
===================================================================
--- trunk/NVTK/INSTALL/JOBS/jhd_sx8mercure_mon	(revision 1366)
+++ trunk/NVTK/INSTALL/JOBS/jhd_sx8mercure_mon	(revision 1366)
@@ -0,0 +1,12 @@
+# $Id: jhd_sx8brodie_mon 1155 2008-06-26 14:39:39Z ctlod $
+############################################################################
+#### sx8mercure Header mon
+############################################################################
+#PBS -S /bin/ksh                  # Shell used
+#PBS -l cputim_job=00:40:00       # temps max (HH:MM:SS)
+#PBS -l memsz_job=4.0gb           # memoire max /job
+#PBS -N                           # Job name
+#PBS -e                           # error output file name
+#PBS -o                           # standard output file name
+
+
Index: trunk/NVTK/INSTALL/JOBS/jhd_sx8mercure_mpi
===================================================================
--- trunk/NVTK/INSTALL/JOBS/jhd_sx8mercure_mpi	(revision 1366)
+++ trunk/NVTK/INSTALL/JOBS/jhd_sx8mercure_mpi	(revision 1366)
@@ -0,0 +1,12 @@
+# $Id: jhd_sx8brodie_mpi 1155 2008-06-26 14:39:39Z ctlod $
+############################################################################
+#### sx8mercure Header mpi
+############################################################################
+#PBS -S /bin/ksh                  # Shell used
+#PBS -l cpunum_job=8              # réservation de 8 processeurs
+#PBS -l elapstim_req=0:30:00      # temps max (HH:MM:SS)
+#PBS -l memsz_job=8.0gb           # memoire max /job
+#PBS -N                           # Job name
+#PBS -e                           # error output file name
+#PBS -o                           # standard output file name
+
Index: trunk/NVTK/INSTALL/JOBS/jhd_sx8mercure_omp
===================================================================
--- trunk/NVTK/INSTALL/JOBS/jhd_sx8mercure_omp	(revision 1366)
+++ trunk/NVTK/INSTALL/JOBS/jhd_sx8mercure_omp	(revision 1366)
@@ -0,0 +1,15 @@
+# $Id: jhd_sx8brodie_omp 1155 2008-06-26 14:39:39Z ctlod $
+############################################################################
+#### sx8mercure Header omp
+############################################################################
+#PBS -S /bin/ksh                  # Shell used
+#PBS -q multi                     # classe multiple
+#PBS -l cpunum_job=8              # réservation de 8 processeurs
+#PBS -l cputim_prc=00:20:00       # temps max (HH:MM:SS)
+#PBS -l cputim_job=00:30:00       # temps max (HH:MM:SS)
+#PBS -l memsz_job=4.0gb           # memoire max /job
+#PBS -N                           # Job name
+#PBS -e                           # error output file name
+#PBS -o                           # standard output file name
+
+
