Changeset 1601 for XIOS/dev/dev_trunk_omp/src/interface/c/icdata.cpp
- Timestamp:
- 11/19/18 15:52:54 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/src/interface/c/icdata.cpp
r1587 r1601 9 9 #include <iostream> 10 10 11 11 #include "mpi_std.hpp" 12 12 #include "xios.hpp" 13 #include "oasis_cinterface.hpp"13 //#include "oasis_cinterface.hpp" 14 14 15 15 #include "attribute_template.hpp" … … 23 23 #include "context.hpp" 24 24 #include "context_client.hpp" 25 #include "mpi.hpp" 25 26 26 #include "timer.hpp" 27 27 #include "array_new.hpp" … … 55 55 { 56 56 std::string str; 57 MPI_Comm local_comm;58 MPI_Comm return_comm;57 ep_lib::MPI_Comm local_comm; 58 ep_lib::MPI_Comm return_comm; 59 59 60 60 if (!cstr2string(client_id, len_client_id, str)) return; … … 62 62 int initialized; 63 63 MPI_Initialized(&initialized); 64 #ifdef _usingMPI 64 65 if (initialized) local_comm=MPI_Comm_f2c(*f_local_comm); 65 66 else local_comm=MPI_COMM_NULL; 67 #elif _usingEP 68 ep_lib::fc_comm_map.clear(); 69 if (initialized) local_comm=ep_lib::EP_Comm_f2c((f_local_comm)); 70 else local_comm=MPI_COMM_NULL; 71 #endif 72 73 74 66 75 CXios::initClientSide(str, local_comm, return_comm); 76 #ifdef _usingMPI 67 77 *f_return_comm=MPI_Comm_c2f(return_comm); 78 #elif _usingEP 79 *f_return_comm=*static_cast<MPI_Fint*>(ep_lib::EP_Comm_c2f(return_comm)); 80 #endif 68 81 CTimer::get("XIOS init").suspend(); 69 82 CTimer::get("XIOS").suspend(); … … 73 86 { 74 87 std::string str; 75 MPI_Comm comm;88 ep_lib::MPI_Comm comm; 76 89 77 90 if (!cstr2string(context_id, len_context_id, str)) return; 78 91 CTimer::get("XIOS").resume(); 79 92 CTimer::get("XIOS init context").resume(); 93 #ifdef _usingMPI 80 94 comm=MPI_Comm_f2c(*f_comm); 95 #elif _usingEP 96 comm = ep_lib::EP_Comm_f2c(f_comm); 97 #endif 81 98 CClient::registerContext(str, comm); 82 99 CTimer::get("XIOS init context").suspend();
Note: See TracChangeset
for help on using the changeset viewer.