Changeset 1355


Ignore:
Timestamp:
12/05/17 16:24:42 (6 years ago)
Author:
yushan
Message:

unify MPI_Comm type

Location:
XIOS/dev/branch_openmp
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_openmp/extern/remap/src/mapper.hpp

    r1328 r1355  
    1818{ 
    1919public: 
    20        Mapper(ep_lib::MPI_Comm comm) : communicator(comm), verbose(SILENT), neighbourElements(NULL), sstree(comm) {} 
     20       //Mapper(ep_lib::MPI_Comm comm) : communicator(comm), verbose(SILENT), neighbourElements(NULL), sstree(comm) {} 
     21       Mapper(ep_lib::MPI_Comm comm) : verbose(SILENT), neighbourElements(NULL), sstree(comm)  
     22       { 
     23         ep_lib::MPI_Comm_dup(comm, &communicator); 
     24       } 
     25 
    2126       ~Mapper(); 
    2227       void setVerbosity(verbosity v) {verbose=v ;} 
  • XIOS/dev/branch_openmp/extern/remap/src/mpi_cascade.hpp

    r1328 r1355  
    1212{ 
    1313public: 
    14   CCascadeLevel(ep_lib::MPI_Comm comm) : comm(comm) 
     14  CCascadeLevel(ep_lib::MPI_Comm in_comm) : comm(in_comm) 
    1515  { 
     16    ep_lib::MPI_Comm_dup(in_comm, &comm); 
    1617    ep_lib::MPI_Comm_size(comm, &size); 
    1718    ep_lib::MPI_Comm_rank(comm, &rank); 
  • XIOS/dev/branch_openmp/extern/remap/src/parallel_tree.cpp

    r1335 r1355  
    121121} 
    122122 
    123 //CParallelTree::CParallelTree(MPI_Comm comm) : communicator(comm), cascade(MIN_NODE_SZ*MIN_NODE_SZ, comm) 
    124 CParallelTree::CParallelTree(MPI_Comm comm) : communicator(comm), cascade(MAX_NODE_SZ*MAX_NODE_SZ*2, comm) 
    125 { 
    126         treeCascade.reserve(cascade.num_levels); 
    127         for (int lev = 0; lev < cascade.num_levels; lev++) 
    128                 treeCascade.push_back(CSampleTree(cascade.level[lev].group_size, assignLevel)); 
     123//CParallelTree::CParallelTree(MPI_Comm comm) : communicator(comm), cascade(MIN_NODE_SZ*MIN_NODE_SZ*2, comm) 
     124CParallelTree::CParallelTree(MPI_Comm comm) : cascade(MAX_NODE_SZ*MAX_NODE_SZ*2, comm) 
     125{ 
     126  MPI_Comm_dup(comm, &communicator); 
     127  treeCascade.reserve(cascade.num_levels); 
     128  for (int lev = 0; lev < cascade.num_levels; lev++) 
     129    treeCascade.push_back(CSampleTree(cascade.level[lev].group_size, assignLevel)); 
    129130} 
    130131 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_create.cpp

    r1354 r1355  
    179179   
    180180   
    181   int MPI_Comm_create_endpoints(void* base_comm_ptr, int num_ep, MPI_Info info, MPI_Comm *& out_comm_hdls) 
     181  int MPI_Comm_create_endpoints(int* base_comm_ptr, int num_ep, MPI_Info info, MPI_Comm *& out_comm_hdls) 
    182182  { 
    183183 
     
    199199      out_comm_hdls[idx].is_ep = true; 
    200200      out_comm_hdls[idx].is_intercomm = false; 
    201       out_comm_hdls[idx].ep_comm_ptr = new ep_communicator; 
    202       out_comm_hdls[idx].mpi_comm = base_comm_ptr; 
     201      out_comm_hdls[idx].ep_comm_ptr = new ep_communicator;      
     202      *(out_comm_hdls[idx].mpi_comm) = *base_comm_ptr; 
    203203      out_comm_hdls[idx].ep_comm_ptr->comm_list = out_comm_hdls; 
    204204      out_comm_hdls[idx].ep_comm_ptr->comm_label = 0; 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_fortran.cpp

    r1354 r1355  
    1818    Debug("MPI_Comm_c2f"); 
    1919    int fint; 
    20     #ifdef _intelmpi 
     20    //#ifdef _intelmpi 
    2121    fint = (::MPI_Fint)(to_mpi_comm(comm.mpi_comm)); 
    22     #elif _openmpi 
    23     fint = ::MPI_Comm_c2f(to_mpi_comm(comm.mpi_comm)); 
    24     #endif 
     22    //#elif _openmpi 
     23    //fint = ::MPI_Comm_c2f(to_mpi_comm(comm.mpi_comm)); 
     24    //#endif 
    2525     
    2626    std::map<std::pair<int, int>, MPI_Comm > ::iterator it; 
     
    6060        
    6161       
    62     #ifdef _openmpi 
    63     ::MPI_Comm base_comm = ::MPI_Comm_f2c(comm); 
    64     #elif _intelmpi 
     62    //#ifdef _openmpi 
     63    //::MPI_Comm base_comm = ::MPI_Comm_f2c(comm); 
     64    //#elif _intelmpi 
    6565    ::MPI_Comm *base_comm = new ::MPI_Comm; 
    6666    *base_comm = (::MPI_Comm)(comm); 
    67     #endif 
     67    //#endif 
    6868 
    69     if(base_comm != static_cast< ::MPI_Comm* >(MPI_COMM_NULL.mpi_comm)) 
     69    if(*base_comm != to_mpi_comm(MPI_COMM_NULL.mpi_comm)) 
    7070    { 
    7171      if(omp_get_thread_num() == 0) 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_intercomm_world.cpp

    r1354 r1355  
    538538 
    539539  // #elif _intelmpi 
    540   int MPI_Intercomm_create_from_world(MPI_Comm local_comm, int local_leader, void* peer_comm_ptr, int mpi_remote_leader, int tag, MPI_Comm *newintercomm) 
     540  int MPI_Intercomm_create_from_world(MPI_Comm local_comm, int local_leader, int* peer_comm_ptr, int mpi_remote_leader, int tag, MPI_Comm *newintercomm) 
    541541  { 
    542542    int ep_rank, ep_rank_loc, mpi_rank; 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib.cpp

    r1354 r1355  
    246246} 
    247247 
    248 MPI_Comm to_mpi_comm(void* comm) 
     248MPI_Comm to_mpi_comm(int* comm) 
    249249{ 
    250   return *(static_cast< MPI_Comm* >(comm)); 
     250  return static_cast< MPI_Comm >(*comm); 
    251251 
    252252 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib.hpp

    r1354 r1355  
    1111namespace ep_lib 
    1212{ 
    13 #ifdef _intelmpi 
     13//#ifdef _intelmpi 
    1414  typedef int MPI_Datatype; 
    1515  typedef int MPI_Op; 
    16   #define EP_ANY_SOURCE -2  
    17   #define EP_ANY_TAG -1  
    18 #elif _openmpi 
    19   typedef void* MPI_Datatype; 
    20   typedef void* MPI_Op; 
    21   #define EP_ANY_SOURCE -1  
    22   #define EP_ANY_TAG -1  
    23 #endif 
     16//  #define EP_ANY_SOURCE -2  
     17//  #define EP_ANY_TAG -1  
     18//#elif _openmpi 
     19//  typedef void* MPI_Datatype; 
     20//  typedef void* MPI_Op; 
     21//  #define EP_ANY_SOURCE -1  
     22//  #define EP_ANY_TAG -1  
     23//#endif 
    2424 
    2525  int MPI_Init_thread(int* argc, char*** argv, int required, int*provided); 
     
    4949  // #endif 
    5050   
    51   int MPI_Comm_create_endpoints(void* base_comm_ptr, int num_ep, MPI_Info info, MPI_Comm *& out_comm_hdls); // from EP to create endpoints 
     51  int MPI_Comm_create_endpoints(int* base_comm_ptr, int num_ep, MPI_Info info, MPI_Comm *& out_comm_hdls); // from EP to create endpoints 
    5252 
    5353  int MPI_Send(void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm); 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_lib_intercomm.hpp

    r1354 r1355  
    4141  // #endif 
    4242 
    43   int MPI_Intercomm_create_from_world(MPI_Comm local_comm, int local_leader, void* peer_comm_ptr, int mpi_remote_leader, int tag, MPI_Comm *newintercomm); 
     43  int MPI_Intercomm_create_from_world(MPI_Comm local_comm, int local_leader, int* peer_comm_ptr, int mpi_remote_leader, int tag, MPI_Comm *newintercomm); 
    4444   
    4545  int MPI_Intercomm_create_unique_leader(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, int tag, MPI_Comm *newintercomm); 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_message.cpp

    r1347 r1355  
    3838       
    3939 
    40       #ifdef _openmpi 
     40      //#ifdef _openmpi 
    4141      #pragma omp critical (_mpi_call) 
    4242      { 
     
    5151        } 
    5252      } 
    53       #elif _intelmpi 
    54       #pragma omp critical (_mpi_call) 
    55       { 
    56         ::MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, to_mpi_comm(comm.mpi_comm), &flag, &status); 
    57         if(flag) 
    58         { 
    59           Debug("find message in mpi comm \n"); 
    60           mpi_source = status.MPI_SOURCE; 
    61           int tag = status.MPI_TAG; 
    62           ::MPI_Mprobe(mpi_source, tag, to_mpi_comm(comm.mpi_comm), &message, &status); 
    63  
    64         } 
    65       } 
    66       //::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, to_mpi_comm(comm.mpi_comm), &flag, &message, &status);  
    67       #endif 
     53      //#elif _intelmpi 
     54      //#pragma omp critical (_mpi_call) 
     55      //{ 
     56      //  ::MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, to_mpi_comm(comm.mpi_comm), &flag, &status); 
     57      //  if(flag) 
     58      //  { 
     59      //    Debug("find message in mpi comm \n"); 
     60      //    mpi_source = status.MPI_SOURCE; 
     61      //    int tag = status.MPI_TAG; 
     62      //    ::MPI_Mprobe(mpi_source, tag, to_mpi_comm(comm.mpi_comm), &message, &status); 
     63      //  } 
     64      //} 
     65      //#endif 
    6866       
    6967      if(flag) 
     
    118116      Debug("Message probing for intracomm\n"); 
    119117 
    120       #ifdef _openmpi 
     118      //#ifdef _openmpi 
    121119      #pragma omp critical (_mpi_call) 
    122120      { 
     
    131129        } 
    132130      } 
    133       #elif _intelmpi 
    134       #pragma omp critical (_mpi_call) 
    135       { 
    136         ::MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, to_mpi_comm(comm.ep_comm_ptr->intercomm->mpi_inter_comm), &flag, &status); 
    137         if(flag) 
    138         { 
    139           Debug("find message in mpi comm \n"); 
    140           mpi_source = status.MPI_SOURCE; 
    141           int tag = status.MPI_TAG; 
    142           ::MPI_Mprobe(mpi_source, tag, to_mpi_comm(comm.ep_comm_ptr->intercomm->mpi_inter_comm), &message, &status); 
    143  
    144         } 
    145       } 
    146       //::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, to_mpi_comm(comm.ep_comm_ptr->intercomm->mpi_inter_comm), &flag, &message, &status);        
    147       #endif 
     131       
    148132 
    149133      if(flag) 
     
    185169      Debug("Message probing for intracomm\n"); 
    186170      
    187       #ifdef _openmpi 
     171      //#ifdef _openmpi 
    188172      #pragma omp critical (_mpi_call) 
    189173      { 
     
    198182        } 
    199183      } 
    200       #elif _intelmpi 
    201       #pragma omp critical (_mpi_call) 
    202       { 
    203         ::MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, to_mpi_comm(comm.mpi_comm), &flag, &status); 
    204         if(flag) 
    205         { 
    206           Debug("find message in mpi comm \n"); 
    207           mpi_source = status.MPI_SOURCE; 
    208           int tag = status.MPI_TAG; 
    209           ::MPI_Mprobe(mpi_source, tag, to_mpi_comm(comm.mpi_comm), &message, &status); 
    210  
    211         } 
    212       } 
    213       //::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, to_mpi_comm(comm.mpi_comm), &flag, &message, &status);        
    214       #endif 
     184       
    215185 
    216186      if(flag) 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_mpi.hpp

    r1354 r1355  
    66MPI_Datatype to_mpi_type(ep_lib::MPI_Datatype type); 
    77MPI_Op       to_mpi_op(ep_lib::MPI_Op op); 
    8 MPI_Comm     to_mpi_comm(void* comm); 
     8MPI_Comm     to_mpi_comm(int* comm); 
    99 
    1010#endif // EP_MPI_HPP_INCLUDED 
  • XIOS/dev/branch_openmp/extern/src_ep_dev/ep_type.hpp

    r1354 r1355  
    5757    public: 
    5858 
    59       #ifdef _intelmpi 
    6059      int ep_datatype; 
    61       #elif _openmpi 
    62       void * ep_datatype; 
    63       #endif 
    64        
    6560      int ep_src; 
    6661      int ep_tag; 
    67  
    68        
    6962      void* mpi_status; 
    7063  }; 
     
    7467    public: 
    7568 
    76       #ifdef _intelmpi 
    7769      int mpi_message; 
    78       #elif _openmpi 
    79       void * mpi_message; 
    80       #endif 
    81  
    8270      int ep_src; 
    8371      int ep_tag; 
    84  
    8572      void* mpi_status; 
    8673 
    8774      MPI_Message() {} 
    88  
    89       #ifdef _intelmpi 
    9075      MPI_Message(int message): mpi_message(message) {} 
    91       #elif _openmpi 
    92       MPI_Message(void* message): mpi_message(message) {} 
    93       #endif 
    9476  }; 
    9577 
     
    152134    public: 
    153135 
    154  
    155     // #ifdef _intelmpi 
    156     // int mpi_inter_comm; 
    157     // #elif _openmpi 
    158     // void * mpi_inter_comm; 
    159     // #endif 
    160  
    161     void * mpi_inter_comm; 
     136    int *mpi_inter_comm; 
    162137 
    163138    RANK_MAP *intercomm_rank_map; 
     
    172147    int intercomm_tag; 
    173148 
    174     ep_intercomm() 
    175     { 
    176       intercomm_rank_map = NULL; 
    177       local_rank_map = NULL; 
    178       remote_rank_map = NULL; 
    179     } 
    180  
    181  
    182     bool operator == (ep_intercomm right) 
    183     { 
    184       bool a = intercomm_rank_map == right.intercomm_rank_map; 
    185       bool b = local_rank_map == right.local_rank_map; 
    186       bool c = remote_rank_map == right.remote_rank_map; 
    187       bool d = mpi_inter_comm == right.mpi_inter_comm; 
    188       bool e = size_rank_info == right.size_rank_info; 
    189       bool f = intercomm_tag == right.intercomm_tag; 
    190       return a&&b&&c&&d&&e&&f; 
    191     } 
    192  
    193     bool operator != (ep_intercomm right) 
    194     { 
    195       bool a = intercomm_rank_map != right.intercomm_rank_map; 
    196       bool b = local_rank_map != right.local_rank_map; 
    197       bool c = remote_rank_map != right.remote_rank_map; 
    198       bool d = mpi_inter_comm != right.mpi_inter_comm; 
    199       bool e = size_rank_info != right.size_rank_info; 
    200       bool f = intercomm_tag != right.intercomm_tag; 
    201       return a||b||c||d||e||f; 
    202     } 
     149    ep_intercomm(); 
     150    bool operator == (ep_intercomm right); 
     151    bool operator != (ep_intercomm right); 
     152     
    203153 
    204154 
     
    224174    ep_intercomm *intercomm; 
    225175 
    226     ep_communicator() 
    227     { 
    228       comm_list = NULL; 
    229       message_queue = NULL; 
    230       intercomm = NULL; 
    231     } 
    232  
    233     bool operator == (ep_communicator right) 
    234     { 
    235       bool a = size_rank_info == right.size_rank_info; 
    236       bool b = comm_label == right.comm_label; 
    237       bool c = intercomm == right.intercomm; 
    238       return a&&b&&c; 
    239     } 
    240  
    241     bool operator != (ep_communicator right) 
    242     { 
    243       bool a = size_rank_info != right.size_rank_info; 
    244       bool b = comm_label != right.comm_label; 
    245       bool c = intercomm != right.intercomm; 
    246       return a||b||c; 
    247     } 
    248  
     176    ep_communicator(); 
     177    bool operator == (ep_communicator right); 
     178    bool operator != (ep_communicator right); 
     179     
    249180  }; 
    250181 
     
    259190  { 
    260191    public: 
    261  
    262     // #ifdef _intelmpi 
    263     // int mpi_comm; 
    264     // #elif _openmpi 
    265     // void * mpi_comm; 
    266     // #endif 
    267  
    268     void * mpi_comm; 
    269192 
    270193    bool is_ep; 
     
    274197    OMPbarrier *ep_barrier; 
    275198    RANK_MAP   *rank_map; 
    276  
     199    int* mpi_comm; 
    277200    EP_Comm ep_comm_ptr; 
    278  
    279201    MPI_Comm *mem_bridge; 
    280  
    281  
    282     // #ifdef _intelmpi 
    283     // int mpi_bridge; 
    284     // #elif _openmpi 
    285     // void * mpi_bridge; 
    286     // #endif 
    287  
    288     void * mpi_bridge; 
    289  
    290     MPI_Comm() 
    291     { 
    292       is_ep = true; 
    293       is_intercomm = false; 
    294       my_buffer = NULL; 
    295       ep_barrier = NULL; 
    296       rank_map = NULL; 
    297       ep_comm_ptr = NULL; 
    298       mem_bridge = NULL; 
    299       mpi_bridge = NULL; 
    300     } 
    301  
    302     // #ifdef _intelmpi 
    303     // MPI_Comm(int comm) 
    304     // { 
    305     //   is_ep = false; 
    306     //   is_intercomm = false; 
    307     //   my_buffer = NULL; 
    308     //   ep_barrier = NULL; 
    309     //   rank_map = NULL; 
    310     //   ep_comm_ptr = NULL; 
    311     //   mem_bridge = NULL; 
    312     //   mpi_bridge = NULL; 
    313     //   mpi_comm = comm; 
    314     // } 
    315  
    316     // #elif _openmpi 
    317  
    318     // MPI_Comm(void* comm) 
    319     // { 
    320     //   is_ep = false; 
    321     //   is_intercomm = false; 
    322     //   my_buffer = NULL; 
    323     //   ep_barrier = NULL; 
    324     //   rank_map = NULL; 
    325     //   ep_comm_ptr = NULL; 
    326     //   mem_bridge = NULL; 
    327     //   mpi_bridge = NULL; 
    328     //   mpi_comm = comm; 
    329     // } 
    330     // #endif 
    331      
    332     MPI_Comm(void* comm) 
    333     { 
    334       is_ep = false; 
    335       is_intercomm = false; 
    336       my_buffer = NULL; 
    337       ep_barrier = NULL; 
    338       rank_map = NULL; 
    339       ep_comm_ptr = NULL; 
    340       mem_bridge = NULL; 
    341       mpi_bridge = NULL; 
    342       mpi_comm = comm; 
    343     } 
    344  
    345     bool operator == (MPI_Comm right) 
    346     { 
    347       bool a = is_ep == right.is_ep; 
    348       bool b = is_intercomm == right.is_intercomm; 
    349       bool c = mpi_comm == right.mpi_comm; 
    350       bool d = is_ep ? ep_comm_ptr == right.ep_comm_ptr : true; 
    351       return a&&b&&c&&d; 
    352     } 
    353  
    354     bool operator != (MPI_Comm right) 
    355     { 
    356       bool a = is_ep != right.is_ep; 
    357       bool b = is_intercomm != right.is_intercomm; 
    358       bool c = mpi_comm != right.mpi_comm; 
    359       bool d = is_ep ? ep_comm_ptr != right.ep_comm_ptr : true; 
    360  
    361       return a||b||c||d; 
    362     } 
    363  
     202    int* mpi_bridge; 
     203 
     204    MPI_Comm();   
     205    //MPI_Comm(const MPI_Comm &comm); 
     206    MPI_Comm(int* comm); 
     207 
     208 
     209    bool operator == (MPI_Comm right); 
     210    bool operator != (MPI_Comm right); 
    364211    bool is_null(); 
    365212 
     
    371218    public: 
    372219 
    373       #ifdef _intelmpi 
    374220      int mpi_info; 
    375       #elif _openmpi 
    376       void * mpi_info; 
    377       #endif 
    378221 
    379222      MPI_Info(){ } 
    380        
    381       #ifdef _intelmpi 
    382223      MPI_Info(int info): mpi_info(info) {} 
    383       #elif _openmpi 
    384       MPI_Info(void* info): mpi_info(info) {} 
    385       #endif 
    386224  }; 
    387225 
     
    391229    public: 
    392230 
    393       #ifdef _intelmpi 
    394231      int mpi_request; 
    395       #elif _openmpi 
    396       void * mpi_request; 
    397       #endif 
    398232 
    399233      int type; //! type of the non-blocking communication. 1: Isend; 2:Irecv; 3:Imrecv; 4:Issend 
     
    402236      int ep_src; 
    403237      int ep_tag; 
    404       #ifdef _intelmpi 
    405238      int ep_datatype; 
    406       #elif _openmpi 
    407       void * ep_datatype; 
    408       #endif 
    409239 
    410240      MPI_Comm comm;    //! EP communicator related to the communication 
    411241 
    412242      MPI_Request() {} 
    413  
    414       #ifdef _intelmpi 
    415243      MPI_Request(int request): mpi_request(request) {} 
    416       #elif _openmpi 
    417       MPI_Request(void* request): mpi_request(request) {} 
    418       #endif 
    419  
    420  
    421     bool operator == (MPI_Request right) 
    422     { 
    423       //bool a = mpi_request == right.mpi_request; 
    424       bool b = type == right.type; 
    425       bool c = buf == right.buf; 
    426       bool d = ep_src == right.ep_src; 
    427       bool e = ep_tag == right.ep_tag; 
    428       bool f = ep_datatype == right.ep_datatype; 
    429       return b&&c&&d&&e&&f; 
    430     } 
     244      bool operator == (MPI_Request right); 
     245 
    431246  }; 
    432247 
  • XIOS/dev/branch_openmp/src/buffer_client.cpp

    r1342 r1355  
    1515  size_t CClientBuffer::maxRequestSize = 0; 
    1616 
    17   CClientBuffer::CClientBuffer(MPI_Comm interComm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents) 
    18     : interComm(interComm) 
    19     , serverRank(serverRank) 
     17  CClientBuffer::CClientBuffer(MPI_Comm in_interComm, int serverRank, StdSize bufferSize, StdSize estimatedMaxEventSize, StdSize maxBufferedEvents):  
     18    //interComm(interComm) 
     19    serverRank(serverRank) 
    2020    , bufferSize(bufferSize) 
    2121    , estimatedMaxEventSize(estimatedMaxEventSize) 
     
    2727    , pending(false) 
    2828  { 
     29    interComm = in_interComm; 
     30    *(interComm.mpi_comm) = *(in_interComm.mpi_comm); 
     31    *(interComm.ep_comm_ptr->intercomm->mpi_inter_comm) = *(in_interComm.ep_comm_ptr->intercomm->mpi_inter_comm); 
    2932    buffer[0] = new char[bufferSize]; // transform it with MPI_ALLOC_MEM later 
    3033    buffer[1] = new char[bufferSize]; 
  • XIOS/dev/branch_openmp/src/buffer_client.hpp

    r1331 r1355  
    4040 
    4141      CBufferOut* retBuffer; 
    42       const ep_lib::MPI_Comm interComm; 
     42      ep_lib::MPI_Comm interComm; 
    4343  }; 
    4444} 
  • XIOS/dev/branch_openmp/src/context_client.cpp

    r1338 r1355  
    2727      intraComm = intraComm_; 
    2828      interComm = interComm_; 
     29      *(intraComm.mpi_comm) = *(intraComm_.mpi_comm); 
     30      *(interComm.mpi_comm) = *(interComm_.mpi_comm); 
     31      *(interComm.ep_comm_ptr->intercomm->mpi_inter_comm) = *(interComm_.ep_comm_ptr->intercomm->mpi_inter_comm); 
     32      //MPI_Comm_dup(intraComm_, &intraComm); 
     33      //MPI_Comm_dup(interComm_, &interComm); 
    2934      MPI_Comm_rank(intraComm, &clientRank); 
    3035      MPI_Comm_size(intraComm, &clientSize); 
  • XIOS/dev/branch_openmp/src/cxios.cpp

    r1342 r1355  
    9393    { 
    9494      MPI_Comm *ep_comm; 
    95       MPI_Comm_create_endpoints(MPI_COMM_WORLD, num_ep, info, ep_comm);  // servers should reach here too. 
     95      MPI_Comm_create_endpoints(MPI_COMM_WORLD.mpi_comm, num_ep, info, ep_comm);  // servers should reach here too. 
    9696      passage = ep_comm;   
    9797    } 
  • XIOS/dev/branch_openmp/src/io/inetcdf4.cpp

    r1328 r1355  
    2323    // even if Parallel NetCDF ends up being used. 
    2424    if (mpi) 
    25       //CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *comm, info_null, this->ncidp); 
    26       CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, static_cast<MPI_Comm>(comm->mpi_comm), info_null.mpi_info, this->ncidp); 
     25      CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, static_cast<MPI_Comm>(*(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
     26      //CNetCdfInterface::openPar(filename, NC_NOWRITE | NC_MPIIO, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
    2727    else 
    2828      CNetCdfInterface::open(filename, NC_NOWRITE, this->ncidp); 
  • XIOS/dev/branch_openmp/src/io/onetcdf4.cpp

    r1328 r1355  
    5858            CTimer::get("Files : create").resume(); 
    5959            if (wmpi) 
    60                CNetCdfInterface::createPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), info_null.mpi_info, this->ncidp); 
     60               CNetCdfInterface::createPar(filename, mode, static_cast<MPI_Comm>(*(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
     61               //CNetCdfInterface::createPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
    6162            else 
    6263               CNetCdfInterface::create(filename, mode, this->ncidp); 
     
    7071            CTimer::get("Files : open").resume(); 
    7172            if (wmpi) 
    72                CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(comm->mpi_comm), info_null.mpi_info, this->ncidp); 
     73               CNetCdfInterface::openPar(filename, mode, static_cast<MPI_Comm>(*(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
     74               //CNetCdfInterface::openPar(filename, mode, *(static_cast<MPI_Comm*>(comm->mpi_comm)), info_null.mpi_info, this->ncidp); 
    7375            else 
    7476               CNetCdfInterface::open(filename, mode, this->ncidp); 
Note: See TracChangeset for help on using the changeset viewer.