Ignore:
Timestamp:
06/21/17 09:09:59 (7 years ago)
Author:
yushan
Message:

save modif

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/extern/src_ep_dev/ep_message.cpp

    r1134 r1176  
    5050      } 
    5151      #elif _intelmpi 
    52       ::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status);  
     52      //#pragma omp critical (_mpi_call) 
     53      //::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status);  
     54      #pragma omp critical (_mpi_call) 
     55      { 
     56        ::MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, 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, mpi_comm, &message, &status); 
     63 
     64        } 
     65      } 
    5366      #endif 
    54  
     67       
    5568      if(flag) 
    5669      { 
     
    128141      } 
    129142      #elif _intelmpi 
    130       ::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status);        
     143      #pragma omp critical (_mpi_call) 
     144      { 
     145        ::MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &status); 
     146        if(flag) 
     147        { 
     148          Debug("find message in mpi comm \n"); 
     149          mpi_source = status.MPI_SOURCE; 
     150          int tag = status.MPI_TAG; 
     151          ::MPI_Mprobe(mpi_source, tag, mpi_comm, &message, &status); 
     152 
     153        } 
     154      } 
     155      //::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status);        
    131156      #endif 
    132157 
     
    183208      } 
    184209      #elif _intelmpi 
    185       ::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status);        
     210      #pragma omp critical (_mpi_call) 
     211      { 
     212        ::MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &status); 
     213        if(flag) 
     214        { 
     215          Debug("find message in mpi comm \n"); 
     216          mpi_source = status.MPI_SOURCE; 
     217          int tag = status.MPI_TAG; 
     218          ::MPI_Mprobe(mpi_source, tag, mpi_comm, &message, &status); 
     219 
     220        } 
     221      } 
     222      //::MPI_Improbe(MPI_ANY_SOURCE, MPI_ANY_TAG, mpi_comm, &flag, &message, &status);        
    186223      #endif 
    187224 
Note: See TracChangeset for help on using the changeset viewer.