Index: /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW6_VARGAS
===================================================================
--- /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW6_VARGAS	(revision 3335)
+++ /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW6_VARGAS	(revision 3336)
@@ -60,11 +60,11 @@
   echo Directory is `pwd`
 # 
-#  Run the parallel MPI executable 
-#
-  echo "Running time ${MPIRUN} ./opa"
+#  Run the executable 
 #
   if [ MPI_FLAG == "yes" ]; then
+  echo "Running time ${MPIRUN} ./opa"
      time ${MPIRUN} ./opa
   else
+  echo "Running time ./opa"
      time ./opa
   fi
Index: /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_TITANE
===================================================================
--- /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_TITANE	(revision 3335)
+++ /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_TITANE	(revision 3336)
@@ -54,9 +54,9 @@
 #  Run the parallel MPI executable 
 #
+  if [ MPI_FLAG == "yes" ]; then
   echo "Running time ${MPIRUN} ./opa"
-#
-  if [ MPI_FLAG == "yes" ]; then
      time ${MPIRUN} ./opa
   else
+  echo "Running time ./opa"
      time ./opa
   fi
Index: /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_MERCATOR_CLUSTER
===================================================================
--- /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_MERCATOR_CLUSTER	(revision 3335)
+++ /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_MERCATOR_CLUSTER	(revision 3336)
@@ -57,9 +57,9 @@
 #  Run the parallel MPI executable 
 #
+  if [ MPI_FLAG == "yes" ]; then
   echo "Running time ${MPIRUN} ./opa"
-#
-  if [ MPI_FLAG == "yes" ]; then
      time ${MPIRUN} ./opa
   else
+  echo "Running time ./opa"
      time ./opa
   fi
Index: /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template
===================================================================
--- /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template	(revision 3335)
+++ /trunk/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template	(revision 3336)
@@ -64,10 +64,9 @@
 #  Run the parallel MPI executable 
 #
+  if [ MPI_FLAG == "yes" ]; then
   echo "Running time ${MPIRUN} ./opa"
-#
-
-  if [ MPI_FLAG == "yes" ]; then
      time ${MPIRUN} ./opa
   else
+  echo "Running time./opa"
      time ./opa
   fi
Index: /trunk/NEMOGCM/SETTE/README
===================================================================
--- /trunk/NEMOGCM/SETTE/README	(revision 3335)
+++ /trunk/NEMOGCM/SETTE/README	(revision 3336)
@@ -32,5 +32,8 @@
 				    IT is mandatory to have different TEST_NAME for each job run if not existing files are re-written (for example namelist)
 
-               fcm_job.sh needs input: input_CONFIG_NAME TOTAL_NUMBER_OF_PROCS_used TEST_NAME
+               prepare_job.sh generates the script to be executed 
+			input: INPUT_FILE_CONFIG_NAME NB_PROCS TEST_NAME MPI_FLAG JOB_FILE_NAME
+
+               fcm_job.sh needs input: TOTAL_NUMBER_OF_PROCS_used JOB_FILE_NAME INTERACT_FLAG MPI_FLAG 
 			(for example if you compile ORCA2_LIM with key_mpp_mpi 
 			and only run short test ===> ./fcm_job input_ORCA2_LIM.cfg 4 SHORT)
Index: /trunk/NEMOGCM/SETTE/fcm_job.sh
===================================================================
--- /trunk/NEMOGCM/SETTE/fcm_job.sh	(revision 3335)
+++ /trunk/NEMOGCM/SETTE/fcm_job.sh	(revision 3336)
@@ -6,5 +6,5 @@
 # fcm_job.sh   : simple job to run NEMO with fcm 
 ######################################################
-#set -x
+#set -vx
 set -o posix
 #set -u
@@ -23,7 +23,7 @@
 # ========
 #
-# ::
+# :: lauches the script $JOB_FILE interactive or batch, one task or MPI
 #
-#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
+#  $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT MPI_FLAG
 #
 #
@@ -33,12 +33,5 @@
 # Simple job for SET TESTS for NEMO (SETTE)
 # 
-#   get input files (if needed) : tar file  
-#  (note this job needs to have an input_CONFIG.cfg in which can be found input tar file name)
-#
-#   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are
-#
-#   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory
-#
-#   and call post_test_tidyup function (that moves in NEMO_VALIDATION_DIR solver.stat, tracer.stat (for LOBSTER & PISCES) & ocean.output)
+#  
 #
 # EXAMPLES
@@ -47,11 +40,7 @@
 # ::
 #
-#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
+#  $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT MPI_FLAG
 #
-#  run a job of config GYRE with 1 processor SHORT test ( 5 days ) using an interactive run without mpirun
-#  $ ./fcm_job.sh input_GYRE.cfg 1 SHORT yes no
-#
-#  run a job of config ORCA2_LIM_PISCES	with 8 processors test RESTARTABILITY submitting the job to the batch queue system and using mpirun
-#  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 LONG no yes
+#  run a 
 #
 #
@@ -74,12 +63,12 @@
 #
 
-usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME INTERACT MPI_FLAG"
-usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes no/yes"
+usage=" Usage : ./fcm_job.sh  NUMBER_OF_PROCS JOB_FILE INTERACT MPI_FLAG"
+usage=" example : ./fcm_job.sh 8 SHORT no/yes no/yes"
 
 
-minargcount=2
+minargcount=4
         if [ ${#} -lt ${minargcount} ]
         then
-                echo "not enought arguments for fcm_job.sh script"
+                echo "not enough arguments for fcm_job.sh script"
                 echo "control number of argument of fcm_job.sh in sette.sh"
                 echo "${usage}"
@@ -94,13 +83,18 @@
 export NB_PROCS=$1
 export JOB_FILE=$2
+export INTERACT=$3
+export MPI_FLAG=$4
 ################################################################
 # RUN OPA
 cd ${EXE_DIR}
-
+if [ "$INTERACT" == "yes" ]; then
+        eval $JOB_FILE
+else if [ "$INTERACT" == "no" ]; then
 # submit job to batch system 
-        if [ ${NB_PROC} -eq 1 ]; then
-	   eval ${BATCH_COMMAND_SEQ} $JOB_FILE 
+        if [ "$NB_PROC" == "1" ]; then
+	   eval ${BATCH_COMMAND_SEQ} $JOB_FILE ; echo  ${BATCH_COMMAND_SEQ} $JOB_FILE
         else
-	   eval ${BATCH_COMMAND_PAR} $JOB_FILE
+	   eval ${BATCH_COMMAND_PAR} $JOB_FILE ; echo ${BATCH_COMMAND_PAR} $JOB_FILE
         fi
-
+fi
+fi
Index: /trunk/NEMOGCM/SETTE/prepare_job.sh
===================================================================
--- /trunk/NEMOGCM/SETTE/prepare_job.sh	(revision 3335)
+++ /trunk/NEMOGCM/SETTE/prepare_job.sh	(revision 3336)
@@ -6,9 +6,9 @@
 # prepare_job.sh   : create the job script for running job 
 ######################################################
-#set -x
+#set -vx
 set -o posix
 #set -u
 #set -e
-#
+#+
 #
 # ================
@@ -25,5 +25,5 @@
 # ::
 #
-#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
+#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE
 #
 #
@@ -31,14 +31,7 @@
 # ===========
 #
-# Simple job for SET TESTS for NEMO (SETTE)
+# Part of the SETTE package to run tests for NEMO
 # 
-#   get input files (if needed) : tar file  
-#  (note this job needs to have an input_CONFIG.cfg in which can be found input tar file name)
-#
-#   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are
-#
-#   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory
-#
-#   and call post_test_tidyup function (that moves in NEMO_VALIDATION_DIR solver.stat, tracer.stat (for LOBSTER & PISCES) & ocean.output)
+# prepare the script $JOB_FILE to run the tests 
 #
 # EXAMPLES
@@ -47,11 +40,7 @@
 # ::
 #
-#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
-#
-#  run a job of config GYRE with 1 processor SHORT test ( 5 days ) using an interactive run without mpirun
-#  $ ./fcm_job.sh input_GYRE.cfg 1 SHORT yes no
-#
-#  run a job of config ORCA2_LIM_PISCES	with 8 processors test RESTARTABILITY submitting the job to the batch queue system and using mpirun
-#  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 LONG no yes
+#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG $JOB_FILE
+#
+# prepare the $JOB_FILE for execution 
 #
 #
@@ -65,5 +54,5 @@
 # ==========
 #
-# $Id: fcm_job.sh 3050 2011-11-07 14:11:34Z acc $
+# $Id: prepare_job.sh 3050 2011-11-07 14:11:34Z acc $
 #
 #
@@ -74,6 +63,6 @@
 #
 
-usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME INTERACT MPI_FLAG"
-usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes no/yes"
+usage=" Usage : ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE"
+usage=" example : ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE"
 
 
@@ -81,6 +70,6 @@
         if [ ${#} -lt ${minargcount} ]
         then
-                echo "not enought arguments for fcm_job.sh script"
-                echo "control number of argument of fcm_job.sh in sette.sh"
+                echo "not enough arguments for prepare_job.sh script"
+                echo "control number of argument of prepare_job.sh in sette.sh"
                 echo "${usage}"
         exit 1
@@ -165,31 +154,8 @@
     exit 1
 fi
-#if [ ${NB_PROC} == 1 ] ; then
-#    echo "running opa" >> ${SETTE_DIR}/output.sette
-#    echo "            " >> ${SETTE_DIR}/output.sette
-#    ./opa
-#
-# Tidy out output from this test and populate the NEMO_VALIDATION_DIR tree
-#
-#    post_test_tidyup
-#else
-#    echo "running opa in MPI" >> ${SETTE_DIR}/output.sette
-#    echo "            " >> ${SETTE_DIR}/output.sette
-
-#    if [ ${MPI_INTERACT} == "yes" ] ; then
-#	#
-#	# example for brodie (NEC SX8) machine
-#	#	mpirun -np ${NB_PROC} opa
-#	# example for dedale machine
-#	#	mpirun --mca btl self,tcp -np ${NB_PROC} opa
-#	# example for vargas (IBM Power6) machine
-#	mpiexec -n ${NB_PROC} opa
-#	#
-#	post_test_tidyup
-#    fi
-#
+
 # example for NOCS Altix system using PBS batch submission (requires ${SETTE_DIR}/sette_batch_template file)
 #
-  #  if [ ${MPI_INTERACT} == "no" ] ; then
+  #  if [ ${MPI_FLAG} == "no" ] ; then
 		case ${COMPILER} in 
 			ALTIX_NAUTILUS_MPT)
@@ -239,5 +205,5 @@
 	fi
 	
-	chmod a+x $JOB_FILE
+	chmod a+x $JOB_FILE ; echo "$JOB_FILE is ready"
 
 #fi
Index: /trunk/NEMOGCM/SETTE/sette.sh
===================================================================
--- /trunk/NEMOGCM/SETTE/sette.sh	(revision 3335)
+++ /trunk/NEMOGCM/SETTE/sette.sh	(revision 3336)
@@ -84,4 +84,8 @@
 #
 #
+#  prepare_job.sh
+#
+#  to generate the script run_job.sh
+#
 #  fcm_job.sh 
 #
@@ -129,7 +133,9 @@
 #-
 # Compiler among those in NEMOGCM/ARCH
-COMPILER=PW6_CALYPSO
-export BATCH_COMMAND_PAR="bsub < "
+COMPILER=PW6_VARGAS
+export BATCH_COMMAND_PAR="llsubmit"
 export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
+export INTERACT_FLAG="no"
+export MPIRUN_FLAG="yes"
 
 
@@ -160,7 +166,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=1
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"GYRELOB_LONG\"
@@ -172,5 +177,8 @@
     set_namelist namelist_top ln_diatrc .false.
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC $JOB_FILE $INTERACT_FLAG $MPIRUN_FLAG
 
     cd ${SETTE_DIR}
@@ -194,7 +202,8 @@
     set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\"
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -209,7 +218,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=4
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"GYRELOB_14\"
@@ -227,7 +235,8 @@
     set_namelist namelist jpnij 4
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 
     cd ${SETTE_DIR}
@@ -235,7 +244,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=4
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"GYRELOB_22\"
@@ -252,7 +260,8 @@
     set_namelist namelist jpnij 4
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -268,7 +277,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=1
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"O2LP_LONG\"
@@ -288,8 +296,11 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    
-    cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
+    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE    
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
+#
     export TEST_NAME="SHORT"
+    cd ${SETTE_DIR}
     . prepare_exe_dir.sh
     cd ${EXE_DIR}
@@ -319,7 +330,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE $INTERACT_FLAG $MPIRUN_FLAG 
 fi
 
@@ -334,7 +346,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=16
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -356,7 +367,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 
     cd ${SETTE_DIR}
@@ -364,7 +376,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=16
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -386,7 +397,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -402,7 +414,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=1
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"OFFP_LONG\"
@@ -421,4 +432,5 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     
@@ -445,7 +457,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -460,7 +473,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=16
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -480,7 +492,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 
     cd ${SETTE_DIR}
@@ -488,7 +501,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=16
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -508,7 +520,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -524,7 +537,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=32
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -539,7 +551,8 @@
     set_namelist namelist jpnij 32
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE $INTERACT_FLAG $MPIRUN_FLAG 
 
     cd ${SETTE_DIR}
@@ -547,7 +560,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=32
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -562,7 +574,8 @@
     set_namelist namelist jpnij 32
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -577,7 +590,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=32
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -593,5 +605,8 @@
     set_namelist namelist jpnij 32
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 
     cd ${SETTE_DIR}
@@ -613,7 +628,8 @@
     set_namelist namelist cn_ocerst_in \"../LONG/AMM12_00000006_restart\"
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE $INTERACT_FLAG $MPIRUN_FLAG 
 fi
 
@@ -629,7 +645,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=2
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -645,7 +660,8 @@
     set_namelist 1_namelist ln_clobber .true.
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
Index: /trunk/NEMOGCM/SETTE/sette_beginner.sh
===================================================================
--- /trunk/NEMOGCM/SETTE/sette_beginner.sh	(revision 3335)
+++ /trunk/NEMOGCM/SETTE/sette_beginner.sh	(revision 3336)
@@ -11,5 +11,5 @@
 #
 #############################################################
-#set -x
+#set -vx
 set -o posix
 #set -u
@@ -39,6 +39,7 @@
 # Compiler among those in NEMOGCM/ARCH
 COMPILER=PW6_VARGAS
-export BATCH_COMMAND=llsubmit
-export MPI_INTERACT="no"
+export BATCH_COMMAND_PAR="llsubmit"
+export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
+# export MPI_INTERACT="no"
 
 # Directory to run the tests
@@ -57,5 +58,5 @@
 # small test to start
 # compile GYRE configuration with gfortran_osx compiler run with 1 proc, by default in cpp_GYRE.fcm file : 
-export TEST_NAME="TEST01"
+export TEST_NAME="TEST02"
 cd ${SETTE_DIR}
 . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_SHORT -r GYRE
@@ -65,4 +66,5 @@
 # creation of execution directory
 . prepare_exe_dir.sh
+JOB_FILE=${EXE_DIR}/run_job.sh
 cd ${EXE_DIR}
 # setting namelist parameters
@@ -75,5 +77,11 @@
 # frequency of creation of a restart file
 set_namelist namelist nn_stock 60
+
 cd ${SETTE_DIR}
+# . ./prepare_job.sh input_file_config_name NB_PROCS TEST_NAME MPI_FLAG JOB_FILE
+. ./prepare_job.sh input_GYRE.cfg 1 SHORT no $JOB_FILE
 # run job, with 1 processor, test named SHORT (= 60 time steps)
-. ./fcm_job.sh input_GYRE.cfg 1 ${TEST_NAME}
+#. ./fcm_job.sh NB_PROCS JOB_FILE INTERACT_FLAG MPI_FLAG
+    cd ${SETTE_DIR}   
+. ./fcm_job.sh 1 $JOB_FILE no no
+
