Index: XIOS/dev/dev_trunk_omp/extern/ep_dev/Makefile
===================================================================
--- XIOS/dev/dev_trunk_omp/extern/ep_dev/Makefile	(revision 1605)
+++ XIOS/dev/dev_trunk_omp/extern/ep_dev/Makefile	(revision 1605)
@@ -0,0 +1,28 @@
+appname := EP_test
+
+CXX := mpiicc -D_intelmpi -D_noMemory_check -D_nocheck_sum -D_noshowinfo -qopenmp 
+CXXFLAGS := -std=c++11  -g
+
+srcfiles := $(shell find . -name "*.cpp")
+headfiles := $(shell find . -name "*.hpp")
+objects  := $(patsubst %.cpp, %.o, $(srcfiles))
+
+all: $(appname)
+
+$(appname): $(objects) $(headfiles)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(appname) $(objects) $(LDLIBS)
+
+depend: .depend
+
+.depend: $(srcfiles) 
+	rm -f ./.depend
+	$(CXX) $(CXXFLAGS) -MM $^>>./.depend;
+
+clean:
+	rm -f $(objects) $(appname)
+
+dist-clean: clean
+	rm -f *~ .depend
+
+include .depend
+
Index: XIOS/dev/dev_trunk_omp/extern/ep_dev/ep_create.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/extern/ep_dev/ep_create.cpp	(revision 1604)
+++ XIOS/dev/dev_trunk_omp/extern/ep_dev/ep_create.cpp	(revision 1605)
@@ -124,5 +124,6 @@
       for(int j=0; j<recv_num_ep[i]; j++)
       {
-        out_comm_hdls[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(ind, j, i));
+        //out_comm_hdls[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(ind, j, i));
+        (*(out_comm_hdls[0]->ep_rank_map))[ind] = std::make_pair(j, i);
         ind++;
       }
Index: XIOS/dev/dev_trunk_omp/extern/ep_dev/ep_split.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/extern/ep_dev/ep_split.cpp	(revision 1604)
+++ XIOS/dev/dev_trunk_omp/extern/ep_dev/ep_split.cpp	(revision 1605)
@@ -286,5 +286,6 @@
           for(int i=0; i<new_ep_size; i++)
           {
-            (*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(my_triple_vector_recv[3*i], my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2]));
+            //(*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(my_triple_vector_recv[3*i], my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2]));
+            (*((*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map))[my_triple_vector_recv[3*i]] = std::make_pair( my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2]);
           }
           
Index: XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_create.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_create.cpp	(revision 1604)
+++ XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_create.cpp	(revision 1605)
@@ -124,5 +124,6 @@
       for(int j=0; j<recv_num_ep[i]; j++)
       {
-        out_comm_hdls[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(ind, j, i));
+        //out_comm_hdls[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(ind, j, i));
+        (*(out_comm_hdls[0]->ep_rank_map))[ind] = std::make_pair(j,i);//->insert(std::pair< int, std::pair<int,int> >(ind, j, i));
         ind++;
       }
Index: XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_fortran.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_fortran.cpp	(revision 1604)
+++ XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_fortran.cpp	(revision 1605)
@@ -8,26 +8,26 @@
 
 
-namespace ep_lib
-{
+//namespace ep_lib
+//{
 
-  void* EP_Comm_c2f(MPI_Comm comm)
+  void* EP_Comm_c2f(ep_lib::MPI_Comm comm)
   {
     Debug("MPI_Comm_c2f");
-    void* fint = new ::MPI_Fint;
+    void* fint = new MPI_Fint;
     #ifdef _intelmpi
     *static_cast< ::MPI_Fint*>(fint) = (::MPI_Fint)(to_mpi_comm(comm->mpi_comm));
     #elif _openmpi
-    *static_cast< ::MPI_Fint*>(fint) = MPI_Comm_c2f(to_mpi_comm(comm->mpi_comm));
+    *static_cast< MPI_Fint*>(fint) = MPI_Comm_c2f(to_mpi_comm(comm->mpi_comm));
     #endif
     
-    std::map<std::pair< ::MPI_Fint, int>, MPI_Comm > ::iterator it;
+    std::map<std::pair< MPI_Fint, int>, ep_lib::MPI_Comm > ::iterator it;
     
     #pragma omp critical (fc_comm_map)
     {
-      it = fc_comm_map.find(std::make_pair(*static_cast< ::MPI_Fint*>(fint), omp_get_thread_num()));
-      if(it == fc_comm_map.end())
+      it = ep_lib::fc_comm_map.find(std::make_pair(*static_cast< MPI_Fint*>(fint), omp_get_thread_num()));
+      if(it == ep_lib::fc_comm_map.end())
       {
-        fc_comm_map.insert(std::make_pair( std::make_pair( *static_cast< ::MPI_Fint*>(fint), omp_get_thread_num()) , comm));
-        printf("EP_Comm_c2f : MAP %p insert: %d, %d, %p\n", &fc_comm_map, *static_cast< ::MPI_Fint*>(fint), omp_get_thread_num(), comm->ep_comm_ptr);
+        ep_lib::fc_comm_map.insert(std::make_pair( std::make_pair( *static_cast< MPI_Fint*>(fint), omp_get_thread_num()) , comm));
+        printf("EP_Comm_c2f : MAP %p insert: %d, %d, %p\n", &(ep_lib::fc_comm_map), *static_cast< MPI_Fint*>(fint), omp_get_thread_num(), comm->ep_comm_ptr);
       }
     }
@@ -38,19 +38,19 @@
   }
 
-  MPI_Comm EP_Comm_f2c(void* comm)
+  ep_lib::MPI_Comm EP_Comm_f2c(void* comm)
   {
     Debug("MPI_Comm_f2c");
     
     
-    std::map<std::pair< ::MPI_Fint, int>, MPI_Comm > ::iterator it;
+    std::map<std::pair< MPI_Fint, int>, ep_lib::MPI_Comm > ::iterator it;
     
     #pragma omp critical (fc_comm_map)
-    it = fc_comm_map.find(std::make_pair(*static_cast< ::MPI_Fint*>(comm), omp_get_thread_num()));
+    it = ep_lib::fc_comm_map.find(std::make_pair(*static_cast< MPI_Fint*>(comm), omp_get_thread_num()));
     
-    if(it != fc_comm_map.end())
+    if(it != ep_lib::fc_comm_map.end())
     {
-      MPI_Comm comm_ptr;
+      ep_lib::MPI_Comm comm_ptr;
       comm_ptr = it->second;
-      printf("EP_Comm_f2c : MAP %p find: %d, %d, %p\n", &fc_comm_map, it->first.first, it->first.second, comm_ptr->ep_comm_ptr);
+      printf("EP_Comm_f2c : MAP %p find: %d, %d, %p\n", &(ep_lib::fc_comm_map), it->first.first, it->first.second, comm_ptr->ep_comm_ptr);
       return  comm_ptr;
     }
@@ -58,9 +58,9 @@
       
     
+    MPI_Comm *base_comm = new MPI_Comm;
     #ifdef _intelmpi
-    ::MPI_Comm *base_comm = new ::MPI_Comm;
-    *base_comm = (::MPI_Comm)(*static_cast< ::MPI_Fint*>(comm));
+    *base_comm = (MPI_Comm)(*static_cast< MPI_Fint*>(comm));
     #elif _openmpi
-    ::MPI_Comm *base_comm = ::MPI_Comm_f2c(*static_cast< ::MPI_Fint*>(comm));
+    *base_comm = MPI_Comm_f2c(*static_cast< MPI_Fint*>(comm));
     #endif
 
@@ -70,12 +70,12 @@
       {
         int num_ep = omp_get_num_threads();
-        MPI_Comm *new_comm;
-        MPI_Info info;
-        MPI_Comm_create_endpoints(base_comm, num_ep, info, new_comm);
-        passage = new_comm;
+        ep_lib::MPI_Comm *new_comm;
+        ep_lib::MPI_Info info;
+        ep_lib::MPI_Comm_create_endpoints(base_comm, num_ep, info, new_comm);
+        ep_lib::passage = new_comm;
       }
       #pragma omp barrier
 
-      MPI_Comm return_comm = passage[omp_get_thread_num()];
+      ep_lib::MPI_Comm return_comm = ep_lib::passage[omp_get_thread_num()];
       return return_comm;
         
@@ -85,5 +85,5 @@
   }
 
-}
+//}
 
 
Index: XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_lib_fortran.hpp
===================================================================
--- XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_lib_fortran.hpp	(revision 1604)
+++ XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_lib_fortran.hpp	(revision 1605)
@@ -4,10 +4,10 @@
 #include "ep_type.hpp"
 
-namespace ep_lib
-{
+//namespace ep_lib
+//{
 
-  void* EP_Comm_c2f(MPI_Comm comm);
-  MPI_Comm EP_Comm_f2c(void* comm);
-}
+  void* EP_Comm_c2f(ep_lib::MPI_Comm comm);
+  ep_lib::MPI_Comm EP_Comm_f2c(void* comm);
+//}
 
 
Index: XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_split.cpp
===================================================================
--- XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_split.cpp	(revision 1604)
+++ XIOS/dev/dev_trunk_omp/extern/src_ep_dev/ep_split.cpp	(revision 1605)
@@ -286,5 +286,6 @@
           for(int i=0; i<new_ep_size; i++)
           {
-            (*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(my_triple_vector_recv[3*i], my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2]));
+            //(*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map->insert(std::pair< int, std::pair<int,int> >(my_triple_vector_recv[3*i], my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2]));
+            (*((*newcomm)->ep_comm_ptr->comm_list[0]->ep_rank_map)) [ my_triple_vector_recv[3*i] ] = std::make_pair(my_triple_vector_recv[3*i+1], my_triple_vector_recv[3*i+2]);
           }
           
