Index: XIOS/dev/branch_openmp/extern/ep_dev/ep_type.hpp
===================================================================
--- XIOS/dev/branch_openmp/extern/ep_dev/ep_type.hpp	(revision 1503)
+++ XIOS/dev/branch_openmp/extern/ep_dev/ep_type.hpp	(revision 1511)
@@ -42,11 +42,4 @@
 
 
-//typedef std::pair< int, int > SIZE_RANK_INFO; // < rank, size>
-
-//typedef std::vector< std::pair<int, int> > RANK_MAP;  // at(ep_rank) = <ep_rank_local, mpi_rank>
-//typedef std::map<int, std::pair<int, int> > EP_RANK_MAP;  // key(ep_rank) = <ep_rank_local, mpi_rank>
-
-//typedef std::vector<std::pair< std::pair<int, int>, std::pair<int, int> > > INTERCOMM_RANK_MAP;
-
 
 namespace ep_lib
@@ -55,202 +48,5 @@
   class ep_communicator;
   class ep_intercomm;
-  class OMPbarrier;
-  typedef ep_communicator* EP_Comm;
-  //class MPI_Comm;
 
-/*
-  class MPI_Status
-  {
-    public:
-
-      void* ep_datatype;
-      int ep_src;
-      int ep_tag;
-      void* mpi_status;
-  };
-
-  class MPI_Message
-  {
-    public:
-
-      void* mpi_message;
-      int ep_src;
-      int ep_tag;
-      void* mpi_status;
-
-      MPI_Message() {}
-      MPI_Message(void* message);
-  };
-
-  typedef std::list<MPI_Message > Message_list;
-*/
-
-  class OMPbarrier
-  {
-    private:
-      int nbThreads;          //<The number of threads for this barrier
-      int currentNbThread;    //<The current number of threads waiting
-      bool sense;             //<Direct barrier feedback protection
-      omp_lock_t mutex;       //<To have an atomic int
-
-      OMPbarrier(OMPbarrier&){}
-      OMPbarrier& operator=(OMPbarrier&){return *this;}
-
-    public:
-      /** Constructor with the number of threads */
-      explicit OMPbarrier(const int inNbThreads)
-          : nbThreads(inNbThreads), currentNbThread(0), sense(false) {
-          omp_init_lock( &mutex );
-      }
-
-      /** Destructor, release the omp lock */
-      ~OMPbarrier(){
-          omp_destroy_lock( &mutex );
-      }
-
-      /** Perform a barrier */
-      void wait(){
-          const bool mySense = sense;
-          omp_set_lock( &mutex );
-          const int nbThreadsArrived = (++currentNbThread);
-          omp_unset_lock( &mutex );
-
-          if(nbThreadsArrived == nbThreads) {
-              currentNbThread = 0;
-              sense = !sense;
-              #pragma omp flush
-          }
-          else {
-              volatile const bool* const ptSense = &sense;
-              while( (*ptSense) == mySense){
-              }
-          }
-      }
-
-
-      /** Change the number of threads */
-      void setNbThreads(const int inNbThread){
-          omp_set_lock( &mutex );
-          nbThreads = inNbThread;
-          omp_unset_lock( &mutex );
-      }
-  };
-
-  /*
-  class ep_intercomm
-  {
-    public:
-
-    void *mpi_inter_comm;
-
-    RANK_MAP *intercomm_rank_map;
-    RANK_MAP *local_rank_map;
-    RANK_MAP *remote_rank_map;
-
-
-    SIZE_RANK_INFO size_rank_info[3];
-
-
-    MPI_Comm *local_comm;
-    int intercomm_tag;
-
-    ep_intercomm();
-    //~ep_intercomm(){delete mpi_inter_comm;}
-    bool operator == (ep_intercomm right);
-    bool operator != (ep_intercomm right);
-    
-  };
-
-  class ep_communicator
-  {
-    public:
-
-    SIZE_RANK_INFO size_rank_info[3]; // 0: ep_rank,     ep_size
-                                      // 1: ep_rank_loc, num_ep
-                                      // 2: mpi_rank,    mpi_size
-
-
-    MPI_Comm *comm_list;
-
-    Message_list *message_queue;
-
-
-    int comm_label;
-
-    ep_intercomm *intercomm;
-
-    ep_communicator();
-    bool operator == (ep_communicator right);
-    bool operator != (ep_communicator right);
-    
-  };
-
-
-  struct BUFFER
-  {
-    void * void_buffer[12];
-  };
-
-
-  class MPI_Comm
-  {
-    public:
-
-    bool is_ep;
-    bool is_intercomm;
-
-    BUFFER     *my_buffer;
-    OMPbarrier *ep_barrier;
-    RANK_MAP   *rank_map;
-    void* mpi_comm;
-    EP_Comm ep_comm_ptr;
-    MPI_Comm *mem_bridge;
-    void* mpi_bridge;
-
-    MPI_Comm();  
-    MPI_Comm(void* comm);
-    //~MPI_Comm(){delete mpi_comm;}
-
-
-    bool operator == (MPI_Comm right);
-    bool operator != (MPI_Comm right);
-    bool is_null();
-
-  };
-
-
-  class MPI_Info
-  {
-    public:
-
-      void* mpi_info;
-
-      MPI_Info();
-      MPI_Info(void* info);
-  };
-
-
-  class MPI_Request
-  {
-    public:
-
-      void* mpi_request;
-
-      int type;	//! type of the non-blocking communication. 1: Isend; 2:Irecv; 3:Imrecv; 4:Issend
-      void* buf;
-
-      int ep_src;
-      int ep_tag;
-      void* ep_datatype;
-
-      MPI_Comm comm;	//! EP communicator related to the communication
-
-      MPI_Request() {}
-      MPI_Request(void* request);
-      bool operator == (MPI_Request right);
-
-  };
-
-*/  
 
   class MPI_Aint
@@ -264,5 +60,4 @@
     MPI_Aint(int aint);
     MPI_Aint operator=(int a);
-    //MPI_Aint(int a): mpi_aint(a) {}
   };
 
@@ -275,5 +70,4 @@
     MPI_Fint() {}
     MPI_Fint(void* fint);
-    //MPI_Fint(int f): mpi_fint(f) {}
                                  
   };
@@ -288,9 +82,8 @@
   static std::list<std::pair<std::pair<int, int>, MPI_Comm * > > tag_list;
 
+  static std::list< std::pair<std::pair<int, int> , std::pair<MPI_Comm * , std::pair<int, int> > > > intercomm_list;
+
   static std::map<std::pair<int, int>, MPI_Comm >  fc_comm_map;
 
-//  static std::map<std::pair<int, int>, MPI_Comm >  *fc_comm_map_ptr;
-//  #pragma omp threadprivate(fc_comm_map_ptr)
-//            //    <MPI_Fint,thread_num>   EP_Comm
 
 }
