Ignore:
Timestamp:
05/20/19 13:14:51 (5 years ago)
Author:
yushan
Message:

MARK: branch merged with trunk @1660. Add option --omp to enable multithreading.

File:
1 edited

Legend:

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

    r1646 r1665  
    6767      int initialized; 
    6868      MPI_Initialized(&initialized); 
    69       #ifdef _usingMPI 
    70       if (initialized) local_comm=MPI_Comm_f2c(*f_local_comm); 
    71       else local_comm=MPI_COMM_NULL; 
    72       #elif _usingEP 
     69       
     70      #ifdef _usingEP 
    7371      ep_lib::fc_comm_map.clear(); 
    7472      if (initialized) local_comm=EP_Comm_f2c((f_local_comm)); 
    7573      else local_comm=MPI_COMM_NULL; 
     74      #else 
     75      if (initialized) local_comm=MPI_Comm_f2c(*f_local_comm); 
     76      else local_comm=MPI_COMM_NULL; 
    7677      #endif 
    7778       
     
    7980 
    8081      CXios::initClientSide(str, local_comm, return_comm); 
    81       #ifdef _usingMPI 
     82       
     83      #ifdef _usingEP 
     84      *f_return_comm=*static_cast<MPI_Fint*>(EP_Comm_c2f(return_comm)); 
     85      #else 
    8286      *f_return_comm=MPI_Comm_c2f(return_comm); 
    83       #elif _usingEP 
    84       *f_return_comm=*static_cast<MPI_Fint*>(EP_Comm_c2f(return_comm)); 
    8587      #endif 
    8688      CTimer::get("XIOS init").suspend(); 
     
    98100     CTimer::get("XIOS").resume(); 
    99101     CTimer::get("XIOS init context").resume(); 
    100      #ifdef _usingMPI 
     102      
     103     #ifdef _usingEP 
     104     comm = EP_Comm_f2c(f_comm); 
     105     #else 
    101106     comm=MPI_Comm_f2c(*f_comm); 
    102      #elif _usingEP 
    103      comm = EP_Comm_f2c(f_comm); 
    104107     #endif 
    105108     CClient::registerContext(str, comm); 
Note: See TracChangeset for help on using the changeset viewer.