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

unify MPI_Comm type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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) 
Note: See TracChangeset for help on using the changeset viewer.