Changeset 2229


Ignore:
Timestamp:
09/14/21 15:15:15 (2 months ago)
Author:
ymipsl
Message:

When checkEvent is set, add a new diagnoistic :
Check if every server receive the event.
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/context_client.cpp

    r2222 r2229  
    5050      computeLeader(clientRank, clientSize, serverSize, ranksServerLeader, ranksServerNotLeader); 
    5151 
    52       if (flag) MPI_Intercomm_merge(interComm_,false,&interCommMerged) ; 
     52      if (flag)  
     53      { 
     54        MPI_Intercomm_merge(interComm_,false, &interCommMerged) ; 
     55        int interCommMergedRank; 
     56        MPI_Comm_rank(interComm_, &interCommMergedRank); 
     57        MPI_Comm_rank(interCommMerged, &interCommMergedRank); 
     58        MPI_Comm_rank(intraComm, &interCommMergedRank); 
     59      } 
    5360       
    5461      if (!isAttachedModeEnabled()) 
     
    151158        { 
    152159           ERROR("void CContextClient::sendEvent(CEventClient& event)", 
    153                << "Event are not coherent between client."); 
    154         } 
     160               << "Event are not coherent between client for timeline = "<<timeLine); 
     161        } 
     162         
     163        vector<int> servers(serverSize,0) ; 
     164        auto ranks=event.getRanks() ; 
     165        for(auto& rank : ranks) servers[rank]=1 ; 
     166        MPI_Allreduce(MPI_IN_PLACE, servers.data(), serverSize,MPI_INT,MPI_SUM,intraComm) ; 
     167        ostringstream osstr ; 
     168        for(int i=0;i<serverSize;i++)  if (servers[i]==0) osstr<<i<<" , " ; 
     169        if (!osstr.str().empty()) 
     170        { 
     171          ERROR("void CContextClient::sendEvent(CEventClient& event)", 
     172                 <<" Some servers will not receive the message for timeline = "<<timeLine<<endl 
     173                 <<"Servers are : "<<osstr.str()) ; 
     174        } 
     175 
     176 
    155177      } 
    156178 
Note: See TracChangeset for help on using the changeset viewer.