Ignore:
Timestamp:
06/24/21 11:14:28 (3 years ago)
Author:
ymipsl
Message:
  • Adapt XIOS sources to manage ensemble runs, using new version of oasis

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CONFIG_DEVT/IPSLCM6.5_work_ENSEMBLES/modeles/XIOS/src/interface/c/oasis_cinterface.cpp

    r5501 r5861  
    11#include "oasis_cinterface.hpp" 
     2#include <oasis_c.h> 
    23#include <string> 
    34#include "mpi.hpp" 
     5#include <cstring> 
    46 
    57namespace xios 
     
    4446    comm_client_server=MPI_Comm_f2c(f_comm) ; 
    4547  } 
     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 
    4662} 
Note: See TracChangeset for help on using the changeset viewer.