Changeset 1881


Ignore:
Timestamp:
05/15/20 16:42:10 (4 years ago)
Author:
ymipsl
Message:

XIOS coupling Branch

  • fix timestamp problem when receiving field from other coupling context
  • fix deadlock : when receiving index from coupling context, a collective communication was involved which is forbiden

YM

Location:
XIOS/dev/dev_ym/XIOS_COUPLING/src/node
Files:
3 edited

Legend:

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

    r1880 r1881  
    472472        } 
    473473 
    474         event.push(it->first, grid_->nbReadSenders_[client][it->first], msg); 
     474        event.push(it->first, grid_->getNbReadSenders(client)[it->first], msg); 
    475475      } 
    476476      client->sendEvent(event); 
     
    659659    do 
    660660    { 
    661       if (wasDataAlreadyReceivedFromServer) isDataLate = lastDataReceivedFromServer + freq_offset < currentDate ; 
     661      if (wasDataAlreadyReceivedFromServer) isDataLate = lastDataReceivedFromServer + freq_offset + freq_op <= currentDate ; 
    662662      else isDataLate = context->getCalendar()->getInitDate()+freq_offset <= currentDate ; 
    663663 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.cpp

    r1875 r1881  
    16821682      connectedDataSizeRead_[rank] = outIndex.numElements(); 
    16831683    } 
    1684  
     1684    // ym : displaced to avoid collective call at message reception 
     1685/*  
    16851686    nbReadSenders_[client] = CClientServerMappingDistributed::computeConnectedClients(client->serverSize, client->clientSize, 
    1686                                                                                       client->intraComm, ranks); 
     1687                                                                                     client->intraComm, ranks); 
     1688*/ 
    16871689  } 
    16881690  CATCH_DUMP_ATTR 
    16891691   
    1690  
     1692   
     1693  /*! 
     1694   * Compute the number of connected client for a given contextClient and insert it in the nbReadSenders map. 
     1695   * /param[in] client : the given contextClient 
     1696   */ 
     1697  void CGrid::computeNbReadSenders(CContextClient* client)  
     1698  TRY 
     1699   
     1700  {  
     1701    nbReadSenders_[client] = CClientServerMappingDistributed::computeConnectedClients(client->serverSize, client->clientSize, client->intraComm, connectedServerRankRead_); 
     1702  } 
     1703  CATCH_DUMP_ATTR 
     1704   
    16911705  void CGrid::computeServerDistribution(void) 
    16921706  TRY 
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp

    r1875 r1881  
    372372         std::map<int, std::map<int,int> > nbSenders_; 
    373373 
    374  
     374      private: 
    375375/** Maps storing the number of participating servers for data sent a specific client for a given contextClient. 
    376376  * Symetric of nbSenders_, but for server side which want to send data to client. 
    377377  * nbReadSender_[context_client_size] -> map the number of server sender by connected rank of clients 
    378   * nbReadSender_[context_client_size] [rank_client] -> the number of serverq participating to a send message for a client of rank "rank_client"  
     378  * nbReadSender_[context_client_size] [rank_client] -> the number of server participating to a send message for a client of rank "rank_client"  
    379379  * Usefull to indicate in a message the number of participant needed by the transfer protocol */ 
    380380         std::map<CContextClient*, std::map<int,int> > nbReadSenders_; 
    381  
     381      public: 
     382         std::map<int,int>& getNbReadSenders(CContextClient* client)  
     383         { if (nbReadSenders_.count(client)==0) computeNbReadSenders(client) ; return nbReadSenders_[client] ;} 
     384      private: 
     385         void computeNbReadSenders(CContextClient* client) ; 
     386      
    382387 
    383388// Manh Ha's comment: " A client receives global index from other clients (via recvIndex) 
Note: See TracChangeset for help on using the changeset viewer.