Index: /branches/2017/dev_merge_2017/NEMOGCM/ARCH/arch-openmpi_KARA_MERCATOR_XIOS.fcm
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/ARCH/arch-openmpi_KARA_MERCATOR_XIOS.fcm	(revision 9480)
+++ /branches/2017/dev_merge_2017/NEMOGCM/ARCH/arch-openmpi_KARA_MERCATOR_XIOS.fcm	(revision 9480)
@@ -0,0 +1,39 @@
+# ifort compiler options for linux
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+# debug: -g  -check bounds -check uninit -check pointers -traceback
+# #-xAVX
+#
+%NCDF_INC            -I$NETCDF_INC
+%NCDF_LIB            -L$NETCDF_LIB -lnetcdff -lnetcdf -L$HDF5_LIB -lhdf5_hl -lhdf5 -lz
+
+%CPP	             cpp
+%FC                  mpif90 -fpp 
+# norep 156 %FCFLAGS             -i4 -r8 -O3 -fp-model precise
+# norep 156 %FCFLAGS             -i4 -r8 -O2 -fp-model precise
+%FCFLAGS             -i4 -r8 -O0 -fp-model precise
+%FFLAGS              %FCFLAGS
+%LD                   mpif90
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS             -O2
+%AR                  ar
+%ARFLAGS             -rs
+%MK                  gmake
+%USER_INC            -I$XIOS_INC %NCDF_INC
+%USER_LIB            -L$XIOS_LIB -lxios %NCDF_LIB -lstdc++
+
+%CC                  cc
+%CFLAGS              -O0
Index: /branches/2017/dev_merge_2017/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-openmpi_KARA_MERCATOR_XIOS
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-openmpi_KARA_MERCATOR_XIOS	(revision 9480)
+++ /branches/2017/dev_merge_2017/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-openmpi_KARA_MERCATOR_XIOS	(revision 9480)
@@ -0,0 +1,75 @@
+#!/bin/sh 
+#SBATCH -J sette
+#SBATCH -o sette.%j.out
+#SBATCH -e sette.%j.err
+#SBATCH -N NODES
+#SBATCH --ntasks-per-node=NPROC_NODE
+#SBATCH -p multi
+#SBATCH --time=02:00:00
+#SBATCH --exclusive
+
+#
+# Test specific settings. Do not hand edit these lines; the fcm_job.sh script will set these
+# (via sed operating on this template job file). 
+#
+  OCEANCORES=NPROCS
+  export SETTE_DIR=DEF_SETTE_DIR
+
+###############################################################
+#
+# set up mpp computing environment
+#
+# Local settings for machine IBM Power6 (VARGAS at IDRIS France)
+#
+#cbr export MPIRUN="mpiexec -n $OCEANCORES"
+export MPIRUN="mpirun -np $OCEANCORES"
+
+#
+# load sette functions (only post_test_tidyup needed)
+#
+  . ${SETTE_DIR}/all_functions.sh
+#
+
+# Don't remove neither change the following line
+# BODY
+
+#
+# These variables are needed by post_test_tidyup function in all_functions.sh
+#
+  export EXE_DIR=DEF_EXE_DIR
+  export INPUT_DIR=DEF_INPUT_DIR
+  export CONFIG_DIR=DEF_CONFIG_DIR
+  export TOOLS_DIR=DEF_TOOLS_DIR
+  export NEMO_VALIDATION_DIR=DEF_NEMO_VALIDATION
+  export NEW_CONF=DEF_NEW_CONF
+  export CMP_NAM=DEF_CMP_NAM
+  export TEST_NAME=DEF_TEST_NAME
+#
+# end of set up
+###############################################################
+#
+# change to the working directory 
+#
+cd ${EXE_DIR}
+  echo Running on host `hostname`
+  echo Time is `date`
+  echo Directory is `pwd`
+# 
+#  Run the parallel MPI executable 
+#
+  echo "Running time ${MPIRUN} ./opa"
+#
+  if [ MPI_FLAG == "yes" ]; then
+     mpirun -np $OCEANCORES ./opa
+  else
+     time ./opa
+  fi
+
+#
+  post_test_tidyup
+
+# END_BODY
+# Don't remove neither change the previous line
+
+
+  exit
Index: /branches/2017/dev_merge_2017/NEMOGCM/SETTE/prepare_job.sh
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/SETTE/prepare_job.sh	(revision 9479)
+++ /branches/2017/dev_merge_2017/NEMOGCM/SETTE/prepare_job.sh	(revision 9480)
@@ -273,4 +273,16 @@
                                 echo NB_PROC_NODE ${NB_PROC_NODE}
                                 ;;
+                        openmpi_KARA_MERCATOR_XIOS)
+                                NB_NODES=$( echo $NB_PROC | awk '{print $1 - $1 % 32}'  | awk '{print $1 / 32 }')
+                                NB_PROC_NODE=16
+
+                                if [ ${NB_PROC} -le 128 ] ; then
+                                      QUEUE=multi
+                                      NB_PROC_NODE=32
+                                fi
+                                echo NB_PROCS     ${NB_PROC}
+                                echo NB_NODES     ${NB_NODES}
+                                echo NB_PROC_NODE ${NB_PROC_NODE}
+                                ;;
 			*)
 				NB_NODES=${NB_PROC}
@@ -295,5 +307,10 @@
 
         case ${COMPILER} in
-              openmpi_NAVITI_MERCATOR)
+              openmpi_NAVITI_MERCATOR )
+                    cat run_sette_test.job | sed -e"s/NPROC_NODE/${NB_PROC_NODE}/" \
+                                                 -e"s:QUEUE:${QUEUE}:" > run_sette_test1.job
+                    mv run_sette_test1.job run_sette_test.job
+                    ;;
+              openmpi_KARA_MERCATOR_XIOS )
                     cat run_sette_test.job | sed -e"s/NPROC_NODE/${NB_PROC_NODE}/" \
                                                  -e"s:QUEUE:${QUEUE}:" > run_sette_test1.job
