Index: XMLIO_SERVER/trunk/bld.cfg
===================================================================
--- XMLIO_SERVER/trunk/bld.cfg	(revision 26)
+++ XMLIO_SERVER/trunk/bld.cfg	(revision 27)
@@ -39,4 +39,6 @@
 bld::excl_dep        inc::mpif.h
 bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_prism_get_comm
+bld::excl_dep        use::mod_prism_proto
 
 # Don't generate interface files
Index: XMLIO_SERVER/trunk/configure
===================================================================
--- XMLIO_SERVER/trunk/configure	(revision 26)
+++ XMLIO_SERVER/trunk/configure	(revision 27)
@@ -5,4 +5,5 @@
 set default_compile_flags  = "%PROD_FFLAGS"
 set has_use_vt             = FALSE
+set has_oasis              = FALSE
 
 top:
@@ -47,8 +48,13 @@
         set compile_flags="%DEBUG_FFLAGS"
         shift ; goto top
+
     case -use_vt
         set has_use_vt = TRUE
         shift ; goto top
         
+    case -oasis
+        set has_oasis = TRUE
+        shift ; goto top
+   
    default
         echo "unknown option "$1" , exiting..."
@@ -117,9 +123,15 @@
 set LIB="$LIB $NETCDF_LIBDIR $NETCDF_LIB"
 
+if ( $has_oasis == TRUE ) then
+  set INCDIR="$INCDIR $OASIS_INCDIR"
+  set LIB="$LIB $OASIS_LIBDIR $OASIS_LIB"
+endif
+
 if ( $has_use_vt == TRUE ) then
-set INCDIR="$INCDIR $VAMPIR_INCDIR"
-set LIB="$LIB $VAMPIR_LIBDIR $VAMPIR_LIB"
-set CPP_KEY="$CPP_KEY USE_VT"
+  set INCDIR="$INCDIR $VAMPIR_INCDIR"
+  set LIB="$LIB $VAMPIR_LIBDIR $VAMPIR_LIB"
+  set CPP_KEY="$CPP_KEY USE_VT"
 endif
+
 
 
Index: XMLIO_SERVER/trunk/src/IOSERVER/mod_ioclient.f90
===================================================================
--- XMLIO_SERVER/trunk/src/IOSERVER/mod_ioclient.f90	(revision 26)
+++ XMLIO_SERVER/trunk/src/IOSERVER/mod_ioclient.f90	(revision 27)
@@ -11,5 +11,4 @@
   USE mod_event_client
   USE iomanager
-
   IMPLICIT NONE
     INTEGER, INTENT(INOUT),OPTIONAL :: NEW_COMM
@@ -25,36 +24,30 @@
 
     IF (using_server) THEN
-      IF (using_oasis) THEN
-      ELSE
-        CALL Init_parallel
-        CALL Init_mpi_buffer
-        CALL Init_wait
+      CALL Init_parallel
+      CALL Init_mpi_buffer
+      CALL Init_wait
+      IF (PRESENT(NEW_COMM)) THEN
         NEW_COMM=intracomm
       ENDIF
     ELSE
-      IF (using_oasis) THEN
-      
+      CALL MPI_INITIALIZED(init,ierr)
+      IF (init) THEN
+        IF (.NOT. PRESENT(NEW_COMM)) THEN
+           Comm=MPI_COMM_WORLD
+        ELSE
+          Comm=New_Comm
+        ENDIF
       ELSE
-        CALL MPI_INITIALIZED(init,ierr)
-        IF (init) THEN
-          IF (.NOT. PRESENT(NEW_COMM)) THEN
-             Comm=MPI_COMM_WORLD
-          ELSE
-            Comm=New_Comm
-          ENDIF
-        ELSE
-          CALL MPI_INIT(ierr)
-          Comm=MPI_COMM_WORLD
-          
-          IF (PRESENT(NEW_COMM)) THEN
-            New_Comm=MPI_COMM_WORLD
-          ENDIF
-        ENDIF  
-        CALL MPI_COMM_SIZE(Comm,nb_server,ierr)     
-        CALL MPI_COMM_RANK(Comm,rank,ierr)
-        CALL iom__init(1,nb_server,rank)
-        CALL iom__set_current_rank(1)
+        CALL MPI_INIT(ierr)
+        Comm=MPI_COMM_WORLD
         
-      ENDIF
+        IF (PRESENT(NEW_COMM)) THEN
+          New_Comm=MPI_COMM_WORLD
+        ENDIF
+      ENDIF  
+      CALL MPI_COMM_SIZE(Comm,nb_server,ierr)     
+      CALL MPI_COMM_RANK(Comm,rank,ierr)
+      CALL iom__init(1,nb_server,rank)
+      CALL iom__set_current_rank(1)
     ENDIF
     
Index: XMLIO_SERVER/trunk/src/IOSERVER/mod_ioclient_para.f90
===================================================================
--- XMLIO_SERVER/trunk/src/IOSERVER/mod_ioclient_para.f90	(revision 26)
+++ XMLIO_SERVER/trunk/src/IOSERVER/mod_ioclient_para.f90	(revision 27)
@@ -12,4 +12,6 @@
   SUBROUTINE Init_parallel
   USE mpitrace
+  USE mod_ioserver_namelist
+  USE mod_prism_get_comm  
   IMPLICIT NONE
     INCLUDE 'mpif.h'
@@ -25,15 +27,23 @@
     INTEGER :: div,remain
     INTEGER :: group_color
+    INTEGER :: Comm_client_server
+    CHARACTER(LEN=6) :: oasis_server_id
     
-!    PRINT *, "on rentre dans MPI_INIT"
-    CALL MPI_INIT(ierr)
-    CALL MPI_COMM_RANK(MPI_COMM_WORLD,global_rank,ierr)
-    CALL MPI_COMM_SIZE(MPI_COMM_WORLD,global_size,ierr)
-    
-    PRINT *,"MPI_init Ok, --> mpi_comm_split"
-    CALL MPI_COMM_SPLIT(MPI_COMM_WORLD,color_client,global_rank,intracomm,ierr)
+    IF (using_oasis) THEN
+      oasis_server_id=server_id
+      PRINT *,'prism_get_intracomm'
+      CALL prism_get_intracomm(Comm_client_server,oasis_server_id,ierr)
+    ELSE
+      CALL MPI_INIT(ierr)
+      Comm_client_server=MPI_COMM_WORLD
+    ENDIF
+
+    CALL MPI_COMM_RANK(Comm_client_server,global_rank,ierr)
+    CALL MPI_COMM_SIZE(Comm_client_server,global_size,ierr)
+
+    CALL MPI_COMM_SPLIT(Comm_client_server,color_client,global_rank,intracomm,ierr)
     CALL MPI_COMM_SIZE(intracomm,mpi_size,ierr)
     CALL MPI_COMM_RANK(intracomm,mpi_rank,ierr)
-    PRINT *,"MPI_mpi_comm_split ok --> intracomm" 
+
     nb_server_io=global_size-mpi_size
     div=mpi_size/nb_server_io
@@ -45,14 +55,12 @@
       group_color=(nb_server_io-1)-(mpi_size-1-mpi_rank)/div
     ENDIF
-    PRINT *,'group_color',group_color
 
-    CALL MPI_COMM_SPLIT(MPI_COMM_WORLD,group_color,global_rank,iocomm,ierr)
+    CALL MPI_COMM_SPLIT(Comm_client_server,group_color,global_rank,iocomm,ierr)
     
     CALL MPI_COMM_SIZE(iocomm,iosize,ierr)
     CALL MPI_COMM_RANK(iocomm,iorank,ierr)
-    PRINT *,"io_size-> ",iosize,"iorank-> ",iorank
+
     ALLOCATE(proc_color(0:iosize-1))
     CALL MPI_ALLGATHER(color_client,1,MPI_INTEGER,proc_color,1,MPI_INTEGER,iocomm,ierr)
-    print *,"proc_color -> ",proc_color
     
     DO i=0,iosize-1
Index: XMLIO_SERVER/trunk/src/IOSERVER/mod_ioserver_para.f90
===================================================================
--- XMLIO_SERVER/trunk/src/IOSERVER/mod_ioserver_para.f90	(revision 26)
+++ XMLIO_SERVER/trunk/src/IOSERVER/mod_ioserver_para.f90	(revision 27)
@@ -20,4 +20,6 @@
   SUBROUTINE Init_parallel
   USE mpitrace
+  USE mod_ioserver_namelist
+  USE mod_prism_get_comm  
   IMPLICIT NONE
     INCLUDE 'mpif.h'
@@ -28,10 +30,22 @@
     INTEGER :: i
     INTEGER :: group_color
-    
-    CALL MPI_INIT(ierr)
-    CALL MPI_COMM_RANK(MPI_COMM_WORLD,global_rank,ierr)
-    CALL MPI_COMM_SIZE(MPI_COMM_WORLD,global_size,ierr)
-   
-    CALL MPI_COMM_SPLIT(MPI_COMM_WORLD,color_server,global_rank,intracomm,ierr)
+    INTEGER :: Comm_client_server
+    INTEGER :: comp_id
+    CHARACTER(LEN=6) :: oasis_server_id, oasis_client_id
+
+    IF (using_oasis) THEN
+       oasis_server_id=server_id
+       oasis_client_id=client_id
+       CALL prism_init_comp_proto (comp_id, oasis_server_id, ierr)
+       CALL prism_get_intracomm(Comm_client_server,oasis_client_id,ierr)
+    ELSE
+      CALL MPI_INIT(ierr)
+      Comm_client_server=MPI_COMM_WORLD
+    ENDIF
+        
+    CALL MPI_COMM_RANK(Comm_client_server,global_rank,ierr)
+    CALL MPI_COMM_SIZE(Comm_client_server,global_size,ierr)
+       
+    CALL MPI_COMM_SPLIT(Comm_client_server,color_server,global_rank,intracomm,ierr)
     CALL MPI_COMM_SIZE(intracomm,mpi_size,ierr)
     CALL MPI_COMM_RANK(intracomm,mpi_rank,ierr)
@@ -40,5 +54,5 @@
     PRINT *,'group_color',group_color
 
-    CALL MPI_COMM_SPLIT(MPI_COMM_WORLD,group_color,global_rank,iocomm,ierr)    
+    CALL MPI_COMM_SPLIT(Comm_client_server,group_color,global_rank,iocomm,ierr)    
     
     CALL MPI_COMM_SIZE(iocomm,iosize,ierr)
@@ -64,10 +78,16 @@
   
   SUBROUTINE Finalize_parallel
+  USE mod_ioserver_namelist
+  USE mod_prism_proto
   IMPLICIT NONE
     include 'mpif.h'
     INTEGER :: ierr
     
-    CALL MPI_FINALIZE(ierr)
-
+    IF (using_oasis) THEN
+      CALL prism_terminate_proto(ierr)
+    ELSE
+      CALL MPI_FINALIZE(ierr)
+    ENDIF
+    
   END SUBROUTINE Finalize_parallel
 
