Index: /trunk/CONFIG/ORCA2_LIM/EXP00/iodef.xml
===================================================================
--- /trunk/CONFIG/ORCA2_LIM/EXP00/iodef.xml	(revision 1411)
+++ /trunk/CONFIG/ORCA2_LIM/EXP00/iodef.xml	(revision 1412)
@@ -1,5 +1,7 @@
 <?xml version="1.0"?>
 
-<simulation> 
+<simulation>
+
+<context id="nemo"> 
 
 <!-- groups of variables definition -->
@@ -183,3 +185,5 @@
   </grid_definition>    
 
+</context>
+
 </simulation>
Index: /trunk/CONFIG/ORCA2_LIM/EXP00/xmlio_server.def
===================================================================
--- /trunk/CONFIG/ORCA2_LIM/EXP00/xmlio_server.def	(revision 1412)
+++ /trunk/CONFIG/ORCA2_LIM/EXP00/xmlio_server.def	(revision 1412)
@@ -0,0 +1,15 @@
+! xmlio_server namelist
+!
+! using_server: .TRUE.(.FALSE.) to use(bypass) the io_server
+! using_oasis : .TRUE.(.FALSE.) if nemo is coupled through OASIS
+! client_id   : used only for OASIS, NEMO      id in the namecouple 
+! server_id   : used only for OASIS, io_server id in the namecouple
+!
+&coupling_param
+  using_server = .FALSE.
+  using_oasis  = .FALSE.
+  client_id    = 'nemo.x'
+  server_id    = 'ionemo'
+/
+  
+  
Index: unk/NEMO/OPA_SRC/IOM/io_interface.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/IOM/io_interface.F90	(revision 1411)
+++ 	(revision )
@@ -1,51 +1,0 @@
-MODULE io_interface
-
-   !! $Id$
-
-#if defined key_ioserver
-   USE mod_ioclient
-   USE mod_event_client
-   USE iomanager
-#endif
-
-   IMPLICIT NONE
-
-CONTAINS
-
-   SUBROUTINE init_ioserver( kcomm, is_mode_server )
-      LOGICAL, intent(in   )           :: is_mode_server
-      INTEGER, intent(  out), OPTIONAL :: kcomm
-#if defined key_ioserver
-      !
-      INTEGER :: nb_server
-      INTEGER :: server_rank
-      INTEGER :: ierr
-# if defined key_mpp_mpi
-      !$AGRIF_DO_NOT_TREAT
-#include <mpif.h>
-      !$AGRIF_END_DO_NOT_TREAT
-# endif
-
-      IF (is_mode_server) THEN
-         CALL init_ioclient(kcomm)
-         using_server=.TRUE.
-      ELSE
-# if defined key_mpp_mpi
-         kcomm = MPI_COMM_WORLD
-         CALL MPI_INIT( ierr )
-         CALL MPI_COMM_SIZE( kcomm, nb_server, ierr )     
-         CALL MPI_COMM_RANK( kcomm, server_rank, ierr )
-# else
-         nb_server = 1
-         server_rank = 0
-# endif
-         CALL iom__init(1,nb_server,server_rank)
-         CALL iom__set_current_rank(1)
-         using_server=.FALSE.
-      ENDIF
-#endif
-
-   END SUBROUTINE init_ioserver
-
-
-END MODULE io_interface
Index: /trunk/NEMO/OPA_SRC/IOM/iom.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/IOM/iom.F90	(revision 1411)
+++ /trunk/NEMO/OPA_SRC/IOM/iom.F90	(revision 1412)
@@ -26,5 +26,5 @@
    USE iom_rstdimg     ! restarts access direct format "dimg" style...
 
-#if defined key_ioserver
+#if defined key_iomput
    USE mod_event_client
 # endif
@@ -38,5 +38,5 @@
    PRIVATE iom_g0d, iom_g1d, iom_g2d, iom_g3d, iom_get_123d
    PRIVATE iom_p2d, iom_p3d
-#if defined key_ioserver
+#if defined key_iomput
    PRIVATE iom_init_chkcpp
    PRIVATE set_grid
@@ -52,5 +52,5 @@
      MODULE PROCEDURE iom_p2d, iom_p3d
   END INTERFACE
-#if defined key_ioserver
+#if defined key_iomput
    INTERFACE iom_setkt
       MODULE PROCEDURE event__set_timestep
@@ -74,5 +74,5 @@
       !!----------------------------------------------------------------------
       REAL(wp), INTENT(in) ::  pjulian   !: julian day at nit000 = 0
-#if defined key_ioserver
+#if defined key_iomput
       !!----------------------------------------------------------------------
       ! read the xml file
@@ -307,5 +307,5 @@
          i_s = 1
          i_e = jpmax_files
-#if defined key_ioserver
+#if defined key_iomput
          CALL event__stop_ioserver
 #endif
@@ -896,5 +896,5 @@
       CHARACTER(LEN=*)            , INTENT(in) ::   cdname
       REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   pfield2d
-#if defined key_ioserver
+#if defined key_iomput
       CALL event__write_field2D( cdname, pfield2d(nldi:nlei, nldj:nlej) )
 #endif
@@ -904,5 +904,5 @@
       CHARACTER(LEN=*)                , INTENT(in) ::   cdname
       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in) ::   pfield3d
-#if defined key_ioserver
+#if defined key_iomput
       CALL event__write_field3D( cdname, pfield3d(nldi:nlei, nldj:nlej, :) )
 #endif
@@ -911,5 +911,5 @@
 
 
-#if defined key_ioserver
+#if defined key_iomput
 
    SUBROUTINE set_grid( cdname, plon, plat )
Index: /trunk/NEMO/OPA_SRC/lib_mpp.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/lib_mpp.F90	(revision 1411)
+++ /trunk/NEMO/OPA_SRC/lib_mpp.F90	(revision 1412)
@@ -2364,14 +2364,8 @@
       !!            08/04 :: R. Benshila, generalisation
       !!---------------------------------------------------------------------
-#if defined key_ioserver
-      USE io_interface
-#endif
       INTEGER                                 :: code, ierr
       LOGICAL                                 :: mpi_was_called
       !!---------------------------------------------------------------------
       !
-#if defined key_ioserver
-      CALL init_ioserver(mpi_comm_opa,.TRUE.)
-#else
       CALL mpi_initialized( mpi_was_called, code )      ! MPI initialization
       IF ( code /= MPI_SUCCESS ) THEN
@@ -2388,5 +2382,4 @@
          ENDIF
       ENDIF
-#endif
       !
       IF( nn_buffer > 0 ) THEN
Index: /trunk/NEMO/OPA_SRC/opa.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/opa.F90	(revision 1411)
+++ /trunk/NEMO/OPA_SRC/opa.F90	(revision 1412)
@@ -80,6 +80,6 @@
    USE trcini          ! Initialization of the passive tracers
    USE iom
-#if defined key_ioserver
-   USE io_interface
+#if defined key_iomput
+   USE mod_ioclient
 #endif
 
@@ -176,5 +176,5 @@
       !!
       !!----------------------------------------------------------------------
-#if defined key_oasis3 || defined key_oasis4 || defined key_ioserver
+#if defined key_oasis3 || defined key_oasis4 || defined key_iomput
       INTEGER :: localComm
 #endif
@@ -210,14 +210,26 @@
       READ  ( numnam, namctl )
 
-#if defined key_oasis3 || defined key_oasis4
-      call cpl_prism_init(localComm)
+#if defined key_iomput
+# if defined key_oasis3 || defined key_oasis4
+      ! nemo local communicator given by oasis
+      CALL cpl_prism_init( localComm )
+      ! io_server will get its communicators (if needed) from oasis (we don't see it)
+      CALL init_ioclient()
+# else
+      ! nemo local communicator (used or not) given by the io_server
+      CALL init_ioclient( localcomm )
+# endif
       ! Nodes selection
-      narea = mynode(localComm)
-#elif key_ioserver
-      CALL init_ioserver(localcomm, .FALSE.)
-      narea = mynode(localComm)
+      narea = mynode( localComm )
 #else
+# if defined key_oasis3 || defined key_oasis4
+      ! nemo local communicator given by oasis
+      CALL cpl_prism_init( localComm )
+      ! Nodes selection
+      narea = mynode( localComm )
+# else
       ! Nodes selection
       narea = mynode()
+# endif
 #endif
       narea = narea + 1    ! mynode return the rank of proc (0 --> jpnij -1 )
Index: /trunk/NVTK/INSTALL/CONFIG_FILES/AA_make
===================================================================
--- /trunk/NVTK/INSTALL/CONFIG_FILES/AA_make	(revision 1411)
+++ /trunk/NVTK/INSTALL/CONFIG_FILES/AA_make	(revision 1412)
@@ -9,6 +9,6 @@
 
 $(filter-out mpi omp, $(RUN)): omp
-	gmake -C WORK COMP=$@ EXPER=$(REXP) clean > $(NEMOLIB)_logbook_$@.txt
-	gmake -C WORK COMP=$@ EXPER=$(REXP) >> $(NEMOLIB)_logbook_$@.txt
+	gmake -C WORK COMP=$@ EXPER=$(REXP) USE_IOMPUT=$(USE_IOMPUT) clean > $(NEMOLIB)_logbook_$@.txt
+	gmake -C WORK COMP=$@ EXPER=$(REXP) USE_IOMPUT=$(USE_IOMPUT) >> $(NEMOLIB)_logbook_$@.txt
 
 	cp ../../bin/opa_$(NEMOLIB)_$@_$(REXP)  $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/opa_$(NEMOLIB)_$@_$(REXP)
@@ -34,11 +34,11 @@
 #-Q- osxxlf	cp ../NVTK/INSTALL/JOBS/CPU_time_osxxlf.ksh  $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/CPU_time_osxxlf.ksh
 #-Q- osxxlf	cp ../NVTK/INSTALL/JOBS/MEM_size_osxxlf.ksh  $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/MEM_size_osxxlf.ksh
-	( cd $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/$@/ ; ./lance_batch.ksh $(NEMOLIB) $(MKTE) $(JOB) $(REXP) $(RTG) ; )
+	( cd $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/$@/ ; ./lance_batch.ksh $(NEMOLIB) $(MKTE) $(JOB) $(REXP) $(RTG) $(USE_IOMPUT) $(USE_IOSERVER) $(NB_PROCS_IOSERVER) ; )
 endif
 
 omp: mpi
 ifeq ($(filter omp,$(RUN)),omp)
-	gmake -C WORK COMP=$@ EXPER=$(REXP) clean > $(NEMOLIB)_logbook_$@.txt
-	gmake -C WORK COMP=$@ EXPER=$(REXP) >> $(NEMOLIB)_logbook_$@.txt
+	gmake -C WORK COMP=$@ EXPER=$(REXP) USE_IOMPUT=$(USE_IOMPUT) clean > $(NEMOLIB)_logbook_$@.txt
+	gmake -C WORK COMP=$@ EXPER=$(REXP) USE_IOMPUT=$(USE_IOMPUT) >> $(NEMOLIB)_logbook_$@.txt
 
 	cp ../../bin/opa_$(NEMOLIB)_$@_$(REXP)  $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/opa_$(NEMOLIB)_$@_$(REXP)
@@ -58,5 +58,5 @@
 #-Q- sx8mercure	cp ../NVTK/INSTALL/JOBS/CPU_time_sx8mercure.ksh  $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/CPU_time_sx8mercure.ksh
 #-Q- sx8mercure	cp ../NVTK/INSTALL/JOBS/MEM_size_sx8mercure.ksh  $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/MEM_size_sx8mercure.ksh
-	( cd $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/$@/ ; ./lance_batch.ksh $(NEMOLIB) $(MKTE) $(JOB) $(REXP) $(RTG) ; )
+	( cd $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/$@/ ; ./lance_batch.ksh $(NEMOLIB) $(MKTE) $(JOB) $(REXP) $(RTG) $(USE_IOMPUT) $(USE_IOSERVER) $(NB_PROCS_IOSERVER) ; )
 endif
 
@@ -68,6 +68,6 @@
 ifeq ($(filter mpi,$(RUN)),mpi)
 	cp ./MY_SRC/par_oce.F90_keep ./MY_SRC/par_oce.F90 
-	gmake -C WORK COMP=$@ EXPER=$(REXP) clean > $(NEMOLIB)_logbook_$@.txt
-	gmake -C WORK COMP=$@ EXPER=$(REXP) >> $(NEMOLIB)_logbook_$@.txt
+	gmake -C WORK COMP=$@ EXPER=$(REXP) USE_IOMPUT=$(USE_IOMPUT) clean > $(NEMOLIB)_logbook_$@.txt
+	gmake -C WORK COMP=$@ EXPER=$(REXP) USE_IOMPUT=$(USE_IOMPUT) >> $(NEMOLIB)_logbook_$@.txt
 	rm -f ./MY_SRC/par_oce.F90
 
@@ -94,5 +94,5 @@
 #-Q- osxxlf	cp ../NVTK/INSTALL/JOBS/CPU_time_osxxlf.ksh  $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/CPU_time_osxxlf.ksh
 #-Q- osxxlf	cp ../NVTK/INSTALL/JOBS/MEM_size_osxxlf.ksh  $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/MEM_size_osxxlf.ksh
-	( cd $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/$@/ ; ./lance_batch.ksh $(NEMOLIB) $(MKTE) $(JOB) $(REXP) $(RTG) ; )
+	( cd $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/$@/ ; ./lance_batch.ksh $(NEMOLIB) $(MKTE) $(JOB) $(REXP) $(RTG) $(USE_IOMPUT) $(USE_IOSERVER) $(NB_PROCS_IOSERVER) ; )
 endif
 
@@ -106,6 +106,6 @@
 memo:
 ifeq ($(MKMO),memo)
-	gmake -C WORK COMP=$@ EXPER=$(REXP) clean > $(NEMOLIB)_logbook_$@.txt
-	gmake -C WORK COMP=$@ EXPER=$(REXP) >> $(NEMOLIB)_logbook_$@.txt
+	gmake -C WORK COMP=$@ EXPER=$(REXP) USE_IOMPUT=$(USE_IOMPUT) clean > $(NEMOLIB)_logbook_$@.txt
+	gmake -C WORK COMP=$@ EXPER=$(REXP) USE_IOMPUT=$(USE_IOMPUT) >> $(NEMOLIB)_logbook_$@.txt
 
 	cp ../../bin/opa_$(NEMOLIB)_$@_$(REXP)  $(WWDIR)/NEMO_VALID/W$(NEMOLIB)/opa_$(NEMOLIB)_$@_$(REXP)
Index: /trunk/NVTK/INSTALL/CONFIG_FILES/AA_make.ldef
===================================================================
--- /trunk/NVTK/INSTALL/CONFIG_FILES/AA_make.ldef	(revision 1411)
+++ /trunk/NVTK/INSTALL/CONFIG_FILES/AA_make.ldef	(revision 1412)
@@ -16,4 +16,7 @@
 MKMO=
 REXP=
+USE_IOMPUT = 
+USE_IOSERVER = 
+NB_PROCS_IOSERVER = 
 WWDIR=/workdir/rech/eee/reee534/AUTRE/modipsl/config/
 #---------------------------------------------------------------------
Index: /trunk/NVTK/INSTALL/CONFIG_FILES/BB_make.ldef_ORCA2_LIM
===================================================================
--- /trunk/NVTK/INSTALL/CONFIG_FILES/BB_make.ldef_ORCA2_LIM	(revision 1411)
+++ /trunk/NVTK/INSTALL/CONFIG_FILES/BB_make.ldef_ORCA2_LIM	(revision 1412)
@@ -27,4 +27,5 @@
 EXEC_BIN = ../../../bin/opa_$(NEMOLIB)_$(COMP)_$(EXPER)
 NBPRC = 6
+USE_IOMPUT = 
 
 #-
Index: /trunk/NVTK/INSTALL/JOBS/job_ORCA2_LIM.ksh
===================================================================
--- /trunk/NVTK/INSTALL/JOBS/job_ORCA2_LIM.ksh	(revision 1411)
+++ /trunk/NVTK/INSTALL/JOBS/job_ORCA2_LIM.ksh	(revision 1412)
@@ -14,5 +14,8 @@
 MYO_EXP=xxx
 TSYMB=xxx
-
+USE_IOMPUT=xxx
+USE_IOSERVER=xxx
+NB_PROCS_IOSERVER=xxx
+#
 # Variables changed by ins_valid.ksh script
 MAINDIR=/workdir/rech/eee/reee534/AUTRE
@@ -89,5 +92,11 @@
 
 # iom_put xml file
-get_namelist ${LOC_NAM} iodef.xml ${MYO_EXP} iodef.xml
+if [ "${USE_IOMPUT}" = "true" ]
+then
+    get_namelist ${LOC_NAM} xmlio_server.def ${MYO_EXP} xmlio_server.def
+    get_namelist ${LOC_NAM} iodef.xml ${MYO_EXP} iodef.xml
+    sed -e "s/^ *using_server *=.*$/  using_server = .${USE_IOSERVER}./" xmlio_server.def > tmp$$
+    mv tmp$$ xmlio_server.def
+fi
 
 # Local function to find namelists parameters
@@ -181,5 +190,9 @@
 chmod 777 opa_${CONF}_${RUN}_${MYO_EXP}
 chmod 777 opa_${CONF}_memo_${MYO_EXP}
-
+if [ "${USE_IOSERVER}" = "true" ]
+then
+    cp ${WORK}/../bin/ioserver ioserver
+    chmod 777 ioserver
+fi
 #
 # Profiling & Executable memory size
@@ -216,5 +229,29 @@
 ##########################
 
-case ${RUN} in
+
+if [ "${USE_IOSERVER}" = "true" ]
+then
+#-T- aix6        rm -f cmdfile
+#-T- aix6        cnt=1
+#-T- aix6        while [ $cnt -le ${NB_PROCS_IOSERVER} ]
+#-T- aix6        do
+#-T- aix6          echo "${CPERF#poe} ./ioserver" >> cmdfile
+#-T- aix6          cnt=$(( $cnt + 1 ))
+#-T- aix6        done
+#-T- aix6        cnt=1
+#-T- aix6        while [ $cnt -le ${NB_PROCS} ]
+#-T- aix6        do
+#-T- aix6          echo "${CPERF#poe} ./opa_${CONF}_${RUN}_${MYO_EXP}" >> cmdfile
+#-T- aix6          cnt=$(( $cnt + 1 ))
+#-T- aix6        done
+#-T- aix6        poe -pgmmodel MPMD -cmdfile ./cmdfile
+#-T- sx8brodie   echo "-h 0 -p ${NB_PROCS_IOSERVER} ./ioserver" > cmdfile
+#-T- sx8brodie   echo "-h 0 -p ${NB_PROCS} ./opa_${CONF}_${RUN}_${MYO_EXP}" >> cmdfile
+#-T- sx8brodie   ${CPERF} ${LEXE} -f cmdfile ;;
+#-T- sx8mercure  echo "-h 0 -p ${NB_PROCS_IOSERVER} ./ioserver" > cmdfile
+#-T- sx8mercure  echo "-h 0 -p ${NB_PROCS} ./opa_${CONF}_${RUN}_${MYO_EXP}" >> cmdfile
+#-T- sx8mercure  ${CPERF} ${LEXE} -f cmdfile ;;
+else
+    case ${RUN} in
         'mon' | 'omp' ) 
               ${CPERF} ./opa_${CONF}_${RUN}_${MYO_EXP} ;;
@@ -227,5 +264,7 @@
 #-T- osxxlf   ${CPERF} ${LEXE} ./opa_${CONF}_${RUN}_${MYO_EXP}
 #-T- osxxlf   mpdallexit ;;
-esac
+    esac
+    
+fi
 
 ls -l
@@ -241,7 +280,7 @@
 case ${RUN} in
 	'mon' | 'omp' )
-               liste_files='*abort* memory* namelist* perfs* solver.stat ocean.output layout* ORCA2* restart* mono*' ;;
+               liste_files='*abort* memory* namelist* *xml* perfs* cmdfile solver.stat ocean.output layout* ORCA2* restart* mono*' ;;
 	'mpi' )
-               liste_files='*abort* namelist* solver.stat perfs* ocean.output* layout* ORCA2* restart* mpp*' ;;
+               liste_files='*abort* namelist* *xml* solver.stat perfs* cmdfile ocean.output* layout* ORCA2* restart* mpp*' ;;
 esac
 
Index: /trunk/NVTK/INSTALL/JOBS/lance_batch.ksh
===================================================================
--- /trunk/NVTK/INSTALL/JOBS/lance_batch.ksh	(revision 1411)
+++ /trunk/NVTK/INSTALL/JOBS/lance_batch.ksh	(revision 1412)
@@ -5,11 +5,13 @@
 # Contact  : nemo_st@locean-ipsl.upmc.fr
 #
-# INPUT ARGS: 4 + 1 optional
+# INPUT ARGS: 8
 #     - CONF  : configuration name (ORCA2_LIM, GYRE ..)
 #     - MTIME : timing/no timing (timing or notiming)
 #     - JOBTOL: jobs to launch: all, long, 1_short or gtime
 #     - OWNEXP: name of the experience performed
-#     - REFTAG: (optional): reference tag name to which current 
-#               version will be compare to
+#     - REFTAG: reference tag name to be compare to
+#     - USE_IOMPUT: true of false (default false)
+#     - USE_IOSERVER: true of false (default false)
+#     - NB_PROCS_IOSERVER: (default 0)
 #
 # WORK: This script aims to (for each standard configuration) :
@@ -71,6 +73,20 @@
 OWNEXP=$4
 REFTAG=$5
+USE_IOMPUT=${6:-false}
+USE_IOSERVER=${7:-false}
+NB_PROCS_IOSERVER=${8:-0}
+[ "${USE_IOMPUT}" = "false" ] && USE_IOSERVER=false
+[ "${USE_IOSERVER}" = "false" ] && NB_PROCS_IOSERVER=0
 RUN=$(basename `pwd`)
-
+[ "${RUN}" = "mon" ] && PRC=1
+if [[ ( "${TARGET}" = "sx8brodie" ) || ( "${TARGET}" = "sx8mercure" ) ]]
+then
+    if [ $(( ${PRC} + ${NB_PROCS_IOSERVER} )) -gt 8 ]
+    then
+	echo NVTK is not made to use more than 1 node on SX8 machines...
+	echo please, reduce the number of cpu used by NEMO or/and the ioserver
+	exit 1
+    fi
+fi
 # ---------------------------------------------------------------
 #  I. Take into account target's specificities 
@@ -155,5 +171,5 @@
           CAR_JMPI=$( grep '\# @ total_tasks' jhd_${TARGET}_${RUN} )
           sed    -e "s%$CAR_JNAM%\# @ job_name = ${RUN}${CONFS}%" \
-          -e "s%$CAR_JMPI%\# @ total_tasks = ${PRC}%" \
+          -e "s%$CAR_JMPI%\# @ total_tasks = $(( ${PRC} + ${NB_PROCS_IOSERVER} ))%" \
           jhd_${TARGET}_${RUN} > jhd_${TARGET}_${RUN}_tmp  ;;
      'sx8brodie' )
@@ -166,5 +182,5 @@
               -e "s%$CAR_JNAMO%\#PBS -o  ${RUN}${CONFS}_std%" \
               -e "s%$CAR_JNAME%\#PBS -e  ${RUN}${CONFS}_err%" \
-              -e "s%$CAR_JMPI%\#PBS -l cpunum_job=${PRC}%" \
+              -e "s%$CAR_JMPI%\#PBS -l cpunum_job=$(( ${PRC} + ${NB_PROCS_IOSERVER} ))%" \
               jhd_${TARGET}_${RUN} > jhd_${TARGET}_${RUN}_tmp
           else
@@ -183,5 +199,5 @@
               -e "s%$CAR_JNAMO%\#PBS -o  ${RUN}${CONFS}_std%" \
               -e "s%$CAR_JNAME%\#PBS -e  ${RUN}${CONFS}_err%" \
-              -e "s%$CAR_JMPI%\#PBS -l cpunum_job=${PRC}%" \
+              -e "s%$CAR_JMPI%\#PBS -l cpunum_job=$(( ${PRC} + ${NB_PROCS_IOSERVER} ))%" \
               jhd_${TARGET}_${RUN} > jhd_${TARGET}_${RUN}_tmp
           else
@@ -230,43 +246,32 @@
 esac
 
+chwd () { 
+    word=$( grep "^ *${1}" job_tmp_${RUN}.ksh | cut -f 1 -d " " )
+    if [ "${word}" != "" ] 
+    then
+	sed -e "s@${word}@${1%=*}=\"${2}\"@" job_tmp_${RUN}.ksh > tmp$$
+	mv tmp$$ job_tmp_${RUN}.ksh
+    fi
+}
+
 while [ $ind -lt ${iloop} ]
 do
-       CAR_TYPE_tmp=$( grep 'type=' job_tmp_${RUN}.ksh )
-       CAR_TYPE=`echo $CAR_TYPE_tmp | cut -f 1 -d " " `
-       CAR_RUN_tmp=$( grep 'RUN=xxx' job_tmp_${RUN}.ksh )
-       CAR_RUN=`echo $CAR_RUN_tmp | cut -f 1 -d " " `
-       CAR_MPP_tmp=$( grep 'NB_PROCS=xxx' job_tmp_${RUN}.ksh )
-       CAR_MPP=`echo $CAR_MPP_tmp | cut -f 1 -d " " `
-       CAR_SUB_tmp=$( grep 'LAUNCH=xxx' job_tmp_${RUN}.ksh )
-       CAR_SUB=`echo $CAR_SUB_tmp | cut -f 1 -d " " `
-       CAR_EXE_tmp=$( grep 'LEXE=xxx' job_tmp_${RUN}.ksh )
-       CAR_EXE=`echo $CAR_EXE_tmp | cut -f 1 -d " " `
-       CAR_PER_tmp=$( grep 'CPERF=xxx' job_tmp_${RUN}.ksh )
-       CAR_PER=`echo $CAR_PER_tmp | cut -f 1 -d " " `
-       CAR_MAN_tmp=$( grep 'MAINDIR=xxx' job_tmp_${RUN}.ksh )
-       CAR_MAN=`echo $CAR_MAN_tmp | cut -f 1 -d " " `
-       CAR_INP_tmp=$( grep 'D_INPUT=xxx' job_tmp_${RUN}.ksh )
-       CAR_INP=`echo $CAR_INP_tmp | cut -f 1 -d " " `
-       CAR_GET_tmp=$( grep 'D_GET=xxx' job_tmp_${RUN}.ksh )
-       CAR_GET=`echo $CAR_GET_tmp | cut -f 1 -d " " `
-       CAR_RTG_tmp=$( grep 'REF_TAG=xxx' job_tmp_${RUN}.ksh )
-       CAR_RTG=`echo $CAR_RTG_tmp | cut -f 1 -d " " `
-       CAR_MYO_tmp=$( grep 'MYO_EXP=xxx' job_tmp_${RUN}.ksh )
-       CAR_MYO=`echo $CAR_MYO_tmp | cut -f 1 -d " " `
-       CAR_TSY_tmp=$( grep 'TSYMB=xxx' job_tmp_${RUN}.ksh )
-       CAR_TSY=`echo $CAR_TSY_tmp | cut -f 1 -d " " `
-
-       sed    -e "s%$CAR_TYPE%type=${jobnam[$ind]}%" \
-       -e "s%$CAR_RUN%RUN=$RUN%" \
-       -e "s%$CAR_MPP%NB_PROCS=$PRC%" \
-       -e "s%$CAR_SUB%LAUNCH='$LAUN'%" \
-       -e "s%$CAR_EXE%LEXE='$LSUB'%" \
-       -e "s%$CAR_PER%CPERF='$LPERF'%" \
-       -e "s%$CAR_INP%D_INPUT=$IODIR%" \
-       -e "s%$CAR_GET%D_GET=$CMDGET%" \
-       -e "s%$CAR_RTG%REF_TAG=$REFTAG%" \
-       -e "s%$CAR_MYO%MYO_EXP=$OWNEXP%" \
-       -e "s%$CAR_TSY%TSYMB=$SYMBOL%" \
-       job_tmp_${RUN}.ksh > job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh
+
+       chwd "type="                "${jobnam[$ind]}"
+       chwd "RUN=xxx"              "${RUN}"
+       chwd "NB_PROCS=xxx"          ${PRC}
+       chwd "LAUNCH=xxx"           "${LAUN}"
+       chwd "LEXE=xxx"             "${LSUB}"
+       chwd "CPERF=xxx"            "${LPERF}"
+       chwd "D_INPUT=xxx"          "${IODIR}"
+       chwd "D_GET=xxx"            "${CMDGET}"
+       chwd "REF_TAG=xxx"          "${REFTAG}" 
+       chwd "MYO_EXP=xxx"          "${OWNEXP}"
+       chwd "TSYMB=xxx"            "${SYMBOL}"
+       chwd "USE_IOMPUT=xxx"        ${USE_IOMPUT}
+       chwd "USE_IOSERVER=xxx"      ${USE_IOSERVER}
+       chwd "NB_PROCS_IOSERVER=xxx" ${NB_PROCS_IOSERVER}
+
+       mv job_tmp_${RUN}.ksh job_${RUN}_${jobnam[$ind]}_${OWNEXP}.ksh
 
        if [ ${jobnam[$ind]} = 'gtime' ] ; then
Index: /trunk/NVTK/Makefile
===================================================================
--- /trunk/NVTK/Makefile	(revision 1411)
+++ /trunk/NVTK/Makefile	(revision 1412)
@@ -37,5 +37,10 @@
 #-
 #- Compilation list type to perform, mon (mono) &/or mpi &/or omp (Open-MP)
-BUILD_MAKE =  mon mpi
+BUILD_MAKE = mon mpi
+#-
+#- Do we use the new io interface (iom_put)? With the io_server? On how many procs?
+USE_IOMPUT = false
+USE_IOSERVER = false
+NB_PROCS_IOSERVER = 1
 #-
 #- Proceed to a timing, use key word 'timing' or 'notiming'
@@ -81,5 +86,5 @@
 	@echo
 	@echo
-	@gmake -C ../$@ RUN='$(BUILD_MAKE)' JOB=$(JOBS_2LAUN) RTG=$(REF_TAGV) MKTE=$(MAK_TIME) MKMO=$(MAK_MEMO) REXP=$(NAM_V) -j 2 > $@_step.txt
+	@gmake -C ../$@ RUN='$(BUILD_MAKE)' JOB=$(JOBS_2LAUN) RTG=$(REF_TAGV) MKTE=$(MAK_TIME) MKMO=$(MAK_MEMO) REXP=$(NAM_V) USE_IOMPUT=$(USE_IOMPUT) USE_IOSERVER=$(USE_IOSERVER) NB_PROCS_IOSERVER=$(NB_PROCS_IOSERVER) -j 2 > $@_step.txt
 
 #- Rebuild dependencies when new cpp key and/or new module used
Index: /trunk/NVTK/fait_AA_make
===================================================================
--- /trunk/NVTK/fait_AA_make	(revision 1411)
+++ /trunk/NVTK/fait_AA_make	(revision 1412)
@@ -93,5 +93,5 @@
 ifeq (\$(IOSERVER),use)
 	(cd ../../../modeles/XMLF90; ./configure -arch \$(FCM_ARCH); fcm build; mkdir -p ../../lib/libxmlio_server  ; cd ../../lib/libxmlio_server ; ln -sf ../../modeles/XMLF90/lib/*.a .; ln -sf ../../modeles/XMLF90/inc/*.mod .)
-	(cd ../../../modeles/XMLIO_SERVER; ./configure -arch \$(FCM_ARCH); fcm build ; cd ../../lib/libxmlio_server ; ln -sf ../../modeles/XMLIO_SERVER/lib/*.a . ; ln -sf ../../modeles/XMLIO_SERVER/inc/* . ; cd \$(BINDIR) ; ln -sf ../modeles/XMLIO_SERVER/bin/server.exe ioserver)
+	(cd ../../../modeles/XMLIO_SERVER; ./configure -arch \$(FCM_ARCH); fcm build ; cd ../../lib/libxmlio_server ; ln -sf ../../modeles/XMLIO_SERVER/lib/*.a . ; ln -sf ../../modeles/XMLIO_SERVER/inc/* . ; cd ../../bin ; ln -sf ../modeles/XMLIO_SERVER/bin/server.exe ioserver)
 endif
 
@@ -297,4 +297,8 @@
 echo 'endif'
 echo ''
+echo 'ifeq ($(USE_IOMPUT),true)'
+echo 'P_P := $(P_P) key_iomput'
+echo 'endif'
+echo ''
 echo '# add suffix to P_P'
 echo 'P_P := $(P_P:%=$(prefix)%)'
@@ -316,5 +320,5 @@
 echo '# Some tests to define variables related to xmlioserver compilation'
 echo '# Please do not change '
-echo 'ifneq (,$(findstring key_ioserver,$(P_P)))'
+echo 'ifneq (,$(findstring key_iomput,$(P_P)))'
 echo 'IOSERVER=use'
 echo 'override USER_LIB += -L../../../lib/libxmlio_server -lioserver -lxmlio -lxmlf90'
Index: /trunk/UTIL/fait_AA_make
===================================================================
--- /trunk/UTIL/fait_AA_make	(revision 1411)
+++ /trunk/UTIL/fait_AA_make	(revision 1412)
@@ -77,5 +77,5 @@
 ifeq (\$(IOSERVER),use)
 	(cd ../../XMLF90; ./configure -arch \$(FCM_ARCH); fcm build; mkdir -p ../../lib/libxmlio_server  ; cd ../../lib/libxmlio_server ; ln -sf ../../modeles/XMLF90/lib/*.a .; ln -sf ../../modeles/XMLF90/inc/*.mod .)
-	(cd ../../XMLIO_SERVER; ./configure -arch \$(FCM_ARCH); fcm build ; cd ../../lib/libxmlio_server ; ln -sf ../../modeles/XMLIO_SERVER/lib/*.a . ; ln -sf ../../modeles/XMLIO_SERVER/inc/* . ; cd \$(BINDIR) ; ln -sf ../modeles/XMLIO_SERVER/bin/server.exe ioserver)
+	(cd ../../XMLIO_SERVER; ./configure -arch \$(FCM_ARCH); fcm build ; cd ../../lib/libxmlio_server ; ln -sf ../../modeles/XMLIO_SERVER/lib/*.a . ; ln -sf ../../modeles/XMLIO_SERVER/inc/* . ; cd ../../bin ; ln -sf ../modeles/XMLIO_SERVER/bin/server.exe ioserver)
 endif
 
@@ -294,5 +294,5 @@
 echo '# Some tests to define variables related to xmlioserver compilation'
 echo '# Please do not change '
-echo 'ifneq (,$(findstring key_ioserver,$(P_P)))'
+echo 'ifneq (,$(findstring key_iomput,$(P_P)))'
 echo 'IOSERVER=use'
 echo 'override USER_LIB += -L../../../lib/libxmlio_server -lioserver -lxmlio -lxmlf90'
