Index: NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/namelist_cfg_orca025_like
===================================================================
--- NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/namelist_cfg_orca025_like	(revision 9844)
+++ NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/namelist_cfg_orca025_like	(revision 9846)
@@ -8,5 +8,5 @@
    cn_exp      =   'BENCH' !  experience name
    nn_it000    =       1   !  first time step
-   nn_itend    =     100   !  last time step 
+   nn_itend    =    1000   !  last time step 
    nn_stock    =       0   !  frequency of creation of a restart file (modulo referenced to 1)
    nn_write    =       0   !  frequency of write in the output file   (modulo referenced to nn_it000)
Index: NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/namelist_cfg_orca1_like
===================================================================
--- NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/namelist_cfg_orca1_like	(revision 9844)
+++ NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/namelist_cfg_orca1_like	(revision 9846)
@@ -8,5 +8,5 @@
    cn_exp      =   'BENCH' !  experience name
    nn_it000    =       1   !  first time step
-   nn_itend    =     100   !  last time step 
+   nn_itend    =    1000   !  last time step 
    nn_stock    =       0   !  frequency of creation of a restart file (modulo referenced to 1)
    nn_write    =       0   !  frequency of write in the output file   (modulo referenced to nn_it000)
Index: NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/sh_bench
===================================================================
--- NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/sh_bench	(revision 9846)
+++ NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/sh_bench	(revision 9846)
@@ -0,0 +1,51 @@
+#!/bin/bash
+set -u
+set -xv
+
+resolution=$1
+machine=$( hostname | sed -e "s/[0-9]*//g" )
+
+case $machine in 
+    "beaufix") ncore_nod=40 ;;
+    "curie")   ncore_node=16 ;;
+esac
+
+case $ncore_node in
+    16)
+    case ${resolution} in
+	"1")list1="4*4 8*4 8*8 8*16 24*10 24*22 40*24 72*28 120*30 72*66" ;;
+	"025")list025="4*4 8*4 8*8 16*8 20*12 24*22 32*32 48*42 160*25 56*134 120*134 240*121" ;;
+	"12")list12="16*8 16*16 32*16 40*26 80*26 80*51 114*72 160*102 240*126" ;;
+    esac
+    ;;
+    40)
+    case ${resolution} in
+	"1")list1="8*5 8*10 16*10 20*16 20*30 40*33 60*42 120*42" ;;
+	"025")list025="8*5 10*8 16*10 20*16 20*32 40*32 60*42 80*67 180*64" ;;
+	"12")list12="40*31 60*42 80*63 160*75" ;;
+    esac
+    ;;
+esac
+
+
+# ORCA1
+if [ ${resolution} == "1" ]; then
+for cores in $list1
+do
+  ./submit_bench $cores $ncore_node ${resolution}
+done
+
+# ORCA025
+elif [ ${resolution} == "025" ]; then
+for cores in $list025
+do
+  ./submit_bench $cores $ncore_node ${resolution}
+done
+
+# ORCA12
+elif [ ${resolution} == "12" ]; then
+for cores in $list12
+do
+  ./submit_bench $cores $ncore_node ${resolution}
+done
+fi
Index: NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/submit_bench
===================================================================
--- NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/submit_bench	(revision 9846)
+++ NEMO/branches/2018/dev_r9759_HPC09_ESIWACE/tests/BENCH/EXPREF/submit_bench	(revision 9846)
@@ -0,0 +1,137 @@
+#!/bin/bash
+#  
+#  BENCH launching scripts for beaufix, Meteo-France
+#  To be modified for other machines
+#
+set -u
+set -vx
+#
+cores=$1
+ncore_node=$2
+resolution=$3
+machine=$( hostname | sed -e "s/[0-9]*//g" )
+######################################################################
+#
+# number of processes for each executable
+    nproc_exe1=$( echo $cores | bc )
+  (( nproc = $nproc_exe1 ))
+(( nnode = $nproc / $ncore_node ))
+[ $nnode -lt 1 ] && nnode=1
+
+nproc5=$( printf "%05d\n" ${nproc_exe1} )
+
+if [ "$machine" == "beaufix" ]
+then
+    
+cat > Log/run_bench << EOF
+#!/bin/bash
+#SBATCH --time=00:1:00
+#SBATCH -p  normal64         # partition/queue
+#SBATCH --job-name=bench      # job name
+#SBATCH -N $nnode            # number of nodes
+#SBATCH -n $nproc            # number of procs
+#SBATCH -o /scratch/work/cglo315/ESIWACE/dev_r9759_HPC09_ESIWACE/tests/LBENCH_RN/EXP00/Log/job.out%j
+#SBATCH -e /scratch/work/cglo315/ESIWACE/dev_r9759_HPC09_ESIWACE/tests/LBENCH_RN/EXP00/Log/job.out%j
+#SBATCH --exclusive
+
+module unload intelmpi intel grib_api
+module load intel/16.1.150 intelmpi/5.1.2.150
+
+itac=0
+xpmpi=0
+
+if [ \$xpmpi == 1 ]; then
+  module load bullxde
+  module load xPMPI/1.1_intelmpi
+fi
+
+[ \$itac == 1 ] && module load itac/2017.2.028
+
+set -vx
+
+cd \${TMPDIR}
+cp /scratch/work/cglo315/ESIWACE/dev_r9759_HPC09_ESIWACE/tests/LBENCH_RN/EXP00/* .
+
+# Best decompositions BENCH-1
+jpni=${cores/\**/}
+jpni=${cores/?*\*/}
+
+sed -e "s/jpni *=.*/jpni = \${jpni}/" -e "s/jpnj *=.*/jpnj = \${jpnj}/" namelist_cfg_orca${resolution}_like > namelist_cfg
+
+export OMP_NUM_THREADS=1
+ulimit -s unlimited
+#
+if [ \$itac == 1 ]; then
+  source /opt/softs/intel/2017/update_1/itac_latest/bin/itacvars.sh
+  time mpirun -ordered-output -prepend-rank -trace -np $nproc_exe1 ./nemo > jobout 2>joberr
+else
+  time mpirun -ordered-output -prepend-rank -np $nproc_exe1 ./nemo > jobout_${resolution}_${nproc5}
+fi
+/opt/softs/bin/ja
+
+if [ \$xpmpi == 1 ]; then
+  module unload xPMPI/1.1_intelmpi
+  module unload bullxde
+fi
+#
+EOF
+
+
+######################################################################
+###
+### 4. Execute the model
+
+    echo 'Submitting the job to queue using sbatch'
+    sbatch Log/run_bench
+    squeue -u cglo315
+
+echo 'is executed or submitted to queue.'
+
+######################################################################
+
+fi
+
+if [ "$machine" == "curie" ]
+then
+
+    if [ $nproc_exe1 -lt 256 ]
+    then
+	timejob=10000
+    else
+	timejob=1800
+    fi
+    
+    jobname=$HOME/binrun/jobbench
+    cat > $jobname << EOF
+#!/bin/bash
+#MSUB -r jobbench${nproc5}
+#MSUB -n ${nproc_exe1}
+#MSUB -T $timejob
+#MSUB -e bench_${resolution}_${nproc5}_%I.eo
+#MSUB -o bench_${resolution}_${nproc5}_%I.eo
+#MSUB -j oe
+#MSUB -x
+#MSUB -q standard
+#MSUB -A gen6895
+#==========================================
+set -u
+#
+
+cd \${BRIDGE_MSUB_PWD}/..
+
+rsync -av --exclude="*eo" EXPREF/ EXP_${resolution}_${nproc5}/
+rsync -av EXP00/nemo EXP_${resolution}_${nproc5}/nemo
+cd EXP_${resolution}_${nproc5}/
+
+jpni=${cores/\**/}
+jpnj=${cores/?*\*/}
+
+sed -e "s/jpni *=.*/jpni = \${jpni}/" -e "s/jpnj *=.*/jpnj = \${jpnj}/" namelist_cfg_orca${resolution}_like > namelist_cfg
+
+time ccc_mprun -n \${BRIDGE_MSUB_NPROC} ./nemo > jobout_${resolution}_${nproc5}
+
+EOF
+
+    ccc_msub $jobname
+
+fi
