Changeset 1601 for XIOS/dev/dev_trunk_omp/src/interface
- Timestamp:
- 11/19/18 15:52:54 (6 years ago)
- Location:
- XIOS/dev/dev_trunk_omp/src/interface/c
- Files:
-
- 3 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(); -
XIOS/dev/dev_trunk_omp/src/interface/c/oasis_cinterface.cpp
r501 r1601 1 1 #include "oasis_cinterface.hpp" 2 2 #include <string> 3 #include "mpi.hpp" 3 using namespace ep_lib; 4 4 5 5 namespace xios … … 26 26 27 27 fxios_oasis_get_localcomm(&f_comm) ; 28 comm=MPI_Comm_f2c(f_comm) ;28 //comm=MPI_Comm_f2c(f_comm) ; 29 29 } 30 30 … … 34 34 35 35 fxios_oasis_get_intracomm(&f_comm,server_id.data(),server_id.size()) ; 36 comm_client_server=MPI_Comm_f2c(f_comm) ;36 //comm_client_server=MPI_Comm_f2c(f_comm) ; 37 37 } 38 38 … … 42 42 43 43 fxios_oasis_get_intercomm(&f_comm,server_id.data(),server_id.size()) ; 44 comm_client_server=MPI_Comm_f2c(f_comm) ;44 //comm_client_server=MPI_Comm_f2c(f_comm) ; 45 45 } 46 46 } -
XIOS/dev/dev_trunk_omp/src/interface/c/oasis_cinterface.hpp
r501 r1601 10 10 void fxios_oasis_enddef(void) ; 11 11 void fxios_oasis_finalize(void) ; 12 void fxios_oasis_get_localcomm( MPI_Fint* f_comm) ;13 void fxios_oasis_get_intracomm( MPI_Fint* f_comm_client_server,const char* client_id,int str_len) ;14 void fxios_oasis_get_intercomm( MPI_Fint* f_comm_client_server,const char* client_id,int str_len) ;12 void fxios_oasis_get_localcomm(ep_lib::MPI_Fint* f_comm) ; 13 void fxios_oasis_get_intracomm(ep_lib::MPI_Fint* f_comm_client_server,const char* client_id,int str_len) ; 14 void fxios_oasis_get_intercomm(ep_lib::MPI_Fint* f_comm_client_server,const char* client_id,int str_len) ; 15 15 } 16 16 … … 20 20 void oasis_enddef(void) ; 21 21 void oasis_finalize(void) ; 22 void oasis_get_localcomm( MPI_Comm& comm) ;23 void oasis_get_intracomm( MPI_Comm& comm_client_server,const std::string& server_id) ;24 void oasis_get_intercomm( MPI_Comm& comm_client_server,const std::string& server_id) ;22 void oasis_get_localcomm(ep_lib::MPI_Comm& comm) ; 23 void oasis_get_intracomm(ep_lib::MPI_Comm& comm_client_server,const std::string& server_id) ; 24 void oasis_get_intercomm(ep_lib::MPI_Comm& comm_client_server,const std::string& server_id) ; 25 25 } 26 26 #endif
Note: See TracChangeset
for help on using the changeset viewer.