Ignore:
Timestamp:
11/19/18 15:52:54 (5 years ago)
Author:
yushan
Message:

branch_openmp merged with trunk r1597

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_omp/src/interface/c/icdata.cpp

    r1587 r1601  
    99#include <iostream> 
    1010 
    11  
     11#include "mpi_std.hpp" 
    1212#include "xios.hpp" 
    13 #include "oasis_cinterface.hpp" 
     13//#include "oasis_cinterface.hpp" 
    1414 
    1515#include "attribute_template.hpp" 
     
    2323#include "context.hpp" 
    2424#include "context_client.hpp" 
    25 #include "mpi.hpp" 
     25 
    2626#include "timer.hpp" 
    2727#include "array_new.hpp" 
     
    5555   { 
    5656      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; 
    5959 
    6060      if (!cstr2string(client_id, len_client_id, str)) return; 
     
    6262      int initialized; 
    6363      MPI_Initialized(&initialized); 
     64      #ifdef _usingMPI 
    6465      if (initialized) local_comm=MPI_Comm_f2c(*f_local_comm); 
    6566      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 
    6675      CXios::initClientSide(str, local_comm, return_comm); 
     76      #ifdef _usingMPI 
    6777      *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 
    6881      CTimer::get("XIOS init").suspend(); 
    6982      CTimer::get("XIOS").suspend(); 
     
    7386   { 
    7487     std::string str; 
    75      MPI_Comm comm; 
     88     ep_lib::MPI_Comm comm; 
    7689 
    7790     if (!cstr2string(context_id, len_context_id, str)) return; 
    7891     CTimer::get("XIOS").resume(); 
    7992     CTimer::get("XIOS init context").resume(); 
     93     #ifdef _usingMPI 
    8094     comm=MPI_Comm_f2c(*f_comm); 
     95     #elif _usingEP 
     96     comm = ep_lib::EP_Comm_f2c(f_comm); 
     97     #endif 
    8198     CClient::registerContext(str, comm); 
    8299     CTimer::get("XIOS init context").suspend(); 
Note: See TracChangeset for help on using the changeset viewer.