Changeset 5861 for CONFIG_DEVT/IPSLCM6.5_work_ENSEMBLES/modeles/XIOS/src/interface/c/oasis_cinterface.cpp
- Timestamp:
- 06/24/21 11:14:28 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CONFIG_DEVT/IPSLCM6.5_work_ENSEMBLES/modeles/XIOS/src/interface/c/oasis_cinterface.cpp
r5501 r5861 1 1 #include "oasis_cinterface.hpp" 2 #include <oasis_c.h> 2 3 #include <string> 3 4 #include "mpi.hpp" 5 #include <cstring> 4 6 5 7 namespace xios … … 44 46 comm_client_server=MPI_Comm_f2c(f_comm) ; 45 47 } 48 49 void oasis_get_multi_intracomm(MPI_Comm& comm_clients_server,const std::vector<std::string>& codesId, std::vector<int> &rootRanks) 50 { 51 int size = codesId.size() ; 52 char** cdnam = new char*[size] ; 53 for(int i=0;i<size;i++) 54 { 55 cdnam[i]=new char[codesId[i].length()+1] ; 56 std::strcpy(cdnam[i], codesId[i].c_str()); 57 } 58 rootRanks.resize(size) ; 59 oasis_c_get_multi_intracomm(&comm_clients_server, size, cdnam, rootRanks.data()) ; 60 } 61 46 62 }
Note: See TracChangeset
for help on using the changeset viewer.