[325] | 1 | #include "oasis_cinterface.hpp" |
---|
| 2 | #include <string> |
---|
[1646] | 3 | #ifdef _usingEP |
---|
[1601] | 4 | using namespace ep_lib; |
---|
[1646] | 5 | #endif |
---|
[325] | 6 | |
---|
[335] | 7 | namespace xios |
---|
[325] | 8 | { |
---|
| 9 | |
---|
| 10 | void oasis_init(const std::string& server_id) |
---|
| 11 | { |
---|
| 12 | fxios_oasis_init(server_id.data(),server_id.size()) ; |
---|
| 13 | } |
---|
| 14 | |
---|
| 15 | void oasis_finalize(void) |
---|
| 16 | { |
---|
| 17 | fxios_oasis_finalize() ; |
---|
| 18 | } |
---|
| 19 | |
---|
[475] | 20 | void oasis_enddef(void) |
---|
| 21 | { |
---|
| 22 | fxios_oasis_enddef() ; |
---|
| 23 | } |
---|
[1745] | 24 | #ifdef _usingEP |
---|
[325] | 25 | void oasis_get_localcomm(MPI_Comm& comm) |
---|
| 26 | { |
---|
[1650] | 27 | EP_Fint f_comm ; |
---|
[325] | 28 | |
---|
| 29 | fxios_oasis_get_localcomm(&f_comm) ; |
---|
[1601] | 30 | //comm=MPI_Comm_f2c(f_comm) ; |
---|
[325] | 31 | } |
---|
| 32 | |
---|
| 33 | void oasis_get_intracomm(MPI_Comm& comm_client_server,const std::string& server_id) |
---|
| 34 | { |
---|
[1650] | 35 | EP_Fint f_comm ; |
---|
[325] | 36 | |
---|
| 37 | fxios_oasis_get_intracomm(&f_comm,server_id.data(),server_id.size()) ; |
---|
[1601] | 38 | //comm_client_server=MPI_Comm_f2c(f_comm) ; |
---|
[325] | 39 | } |
---|
| 40 | |
---|
| 41 | void oasis_get_intercomm(MPI_Comm& comm_client_server,const std::string& server_id) |
---|
| 42 | { |
---|
[1650] | 43 | EP_Fint f_comm ; |
---|
[325] | 44 | |
---|
| 45 | fxios_oasis_get_intercomm(&f_comm,server_id.data(),server_id.size()) ; |
---|
[1601] | 46 | //comm_client_server=MPI_Comm_f2c(f_comm) ; |
---|
[325] | 47 | } |
---|
[1745] | 48 | |
---|
| 49 | #else |
---|
| 50 | |
---|
| 51 | void oasis_get_localcomm(MPI_Comm& comm) |
---|
| 52 | { |
---|
| 53 | MPI_Fint f_comm ; |
---|
| 54 | |
---|
| 55 | fxios_oasis_get_localcomm(&f_comm) ; |
---|
| 56 | //comm=MPI_Comm_f2c(f_comm) ; |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | void oasis_get_intracomm(MPI_Comm& comm_client_server,const std::string& server_id) |
---|
| 60 | { |
---|
| 61 | MPI_Fint f_comm ; |
---|
| 62 | |
---|
| 63 | fxios_oasis_get_intracomm(&f_comm,server_id.data(),server_id.size()) ; |
---|
| 64 | //comm_client_server=MPI_Comm_f2c(f_comm) ; |
---|
| 65 | } |
---|
| 66 | |
---|
| 67 | void oasis_get_intercomm(MPI_Comm& comm_client_server,const std::string& server_id) |
---|
| 68 | { |
---|
| 69 | MPI_Fint f_comm ; |
---|
| 70 | |
---|
| 71 | fxios_oasis_get_intercomm(&f_comm,server_id.data(),server_id.size()) ; |
---|
| 72 | //comm_client_server=MPI_Comm_f2c(f_comm) ; |
---|
| 73 | } |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | #endif |
---|
[325] | 78 | } |
---|