Changeset 1134 for XIOS/dev/branch_yushan_merged/src/interface/c/icdata.cpp
- Timestamp:
- 05/16/17 17:54:30 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan_merged/src/interface/c/icdata.cpp
r961 r1134 11 11 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 #include "mpi_std.hpp" 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 60 ep_lib::fc_comm_map.clear(); 59 61 60 62 if (!cstr2string(client_id, len_client_id, str)) return; … … 62 64 int initialized; 63 65 MPI_Initialized(&initialized); 66 67 #ifdef _usingEP 68 if (initialized) local_comm = ep_lib::EP_Comm_f2c(static_cast< int >(*f_local_comm)); 69 else local_comm = MPI_COMM_NULL; 70 #else 64 71 if (initialized) local_comm=MPI_Comm_f2c(*f_local_comm); 65 else local_comm=MPI_COMM_NULL; 72 else local_comm = MPI_COMM_NULL; 73 #endif 74 75 76 66 77 CXios::initClientSide(str, local_comm, return_comm); 67 *f_return_comm=MPI_Comm_c2f(return_comm); 78 79 #ifdef _usingEP 80 *f_return_comm = ep_lib::EP_Comm_c2f(return_comm); 81 #else 82 *f_return_comm = MPI_Comm_c2f(return_comm); 83 #endif 84 68 85 CTimer::get("XIOS init").suspend(); 69 86 CTimer::get("XIOS").suspend(); … … 73 90 { 74 91 std::string str; 75 MPI_Comm comm;92 ep_lib::MPI_Comm comm; 76 93 77 94 if (!cstr2string(context_id, len_context_id, str)) return; 78 95 CTimer::get("XIOS").resume(); 79 96 CTimer::get("XIOS init context").resume(); 80 comm=MPI_Comm_f2c(*f_comm); 81 CClient::registerContext(str, comm); 97 comm = ep_lib::EP_Comm_f2c(static_cast< int >(*f_comm)); 98 99 CClient::registerContext(str,comm); 100 82 101 CTimer::get("XIOS init context").suspend(); 83 102 CTimer::get("XIOS").suspend(); … … 100 119 CTimer::get("XIOS close definition").resume(); 101 120 CContext* context = CContext::getCurrent(); 121 102 122 context->closeDefinition(); 123 103 124 CTimer::get("XIOS close definition").suspend(); 104 125 CTimer::get("XIOS").suspend(); … … 109 130 CTimer::get("XIOS").resume(); 110 131 CTimer::get("XIOS context finalize").resume(); 132 133 134 111 135 CContext* context = CContext::getCurrent(); 112 136 context->finalize(); … … 429 453 CContext* context = CContext::getCurrent(); 430 454 if (!context->hasServer && !context->client->isAttachedModeEnabled()) 431 context->checkBuffersAndListen(); 455 { 456 context->checkBuffersAndListen(); 457 } 432 458 433 459 CArray<double, 3>data(data_k8, shape(data_Xsize, data_Ysize, data_Zsize), neverDeleteData);
Note: See TracChangeset
for help on using the changeset viewer.