Changeset 1377 for XIOS


Ignore:
Timestamp:
12/13/17 16:06:32 (6 years ago)
Author:
ymipsl
Message:
  • Add more debugging information at info_level 100
  • Enforce synchronisation check for event on client side, using parameter "check_event_sync" at true

YM

Location:
XIOS/dev/XIOS_DEV_CMIP6/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/context_client.cpp

    r1232 r1377  
    9696      list<int> ranks = event.getRanks(); 
    9797 
     98      if (CXios::checkEventSync) 
     99      { 
     100        int typeId, classId, typeId_in, classId_in, timeLine_out; 
     101        typeId_in=event.getTypeId() ; 
     102        classId_in=event.getClassId() ; 
     103        MPI_Allreduce(&timeLine,&timeLine_out, 1, MPI_UINT64_T, MPI_SUM, intraComm) ; 
     104        MPI_Allreduce(&typeId_in,&typeId, 1, MPI_INT, MPI_SUM, intraComm) ; 
     105        MPI_Allreduce(&classId_in,&classId, 1, MPI_INT, MPI_SUM, intraComm) ; 
     106        if (typeId/clientSize!=event.getTypeId() || classId/clientSize!=event.getClassId() || timeLine_out/clientSize!=timeLine) 
     107        { 
     108           ERROR("void CContextClient::sendEvent(CEventClient& event)", 
     109               << "Event are not coherent between client."); 
     110        } 
     111      } 
     112 
    98113      if (!event.isEmpty()) 
    99114      { 
     
    124139          for (list<int>::const_iterator it = sizes.begin(); it != sizes.end(); it++) 
    125140            tmpBufferedEvent.buffers.push_back(new CBufferOut(*it)); 
    126  
     141          info(100)<<"DEBUG : temporaly event created : timeline "<<timeLine<<endl ; 
    127142          event.send(timeLine, tmpBufferedEvent.sizes, tmpBufferedEvent.buffers); 
    128143        } 
     
    151166            (*itBuffer)->put((char*)(*it)->start(), (*it)->count()); 
    152167 
     168          info(100)<<"DEBUG : temporaly event sent "<<endl ; 
    153169          checkBuffers(tmpBufferedEvent.ranks); 
    154170 
     
    230246            for (int i = 0; i < context->serverPrimServer.size(); ++i) 
    231247              context->serverPrimServer[i]->listen(); 
     248//            CServer::contextEventLoop(false) ; // avoid dead-lock at finalize... 
    232249          } 
    233250 
     
    406423      const std::list<int>& ranks = getRanksServerLeader(); 
    407424      for (std::list<int>::const_iterator itRank = ranks.begin(), itRankEnd = ranks.end(); itRank != itRankEnd; ++itRank) 
     425      { 
     426        info(100)<<"DEBUG : Sent context Finalize event to rank "<<*itRank<<endl ; 
    408427        event.push(*itRank, 1, msg); 
     428      } 
    409429      sendEvent(event); 
    410430    } 
  • XIOS/dev/XIOS_DEV_CMIP6/src/cxios.cpp

    r1376 r1377  
    3737  CRegistry* CXios::globalRegistry = 0; 
    3838  double CXios::recvFieldTimeout = 300.0; 
     39  bool CXios::checkEventSync=false ; 
    3940  
    4041  //! Parse configuration file and create some objects from it 
     
    7778    if (recvFieldTimeout < 0.0) 
    7879      ERROR("CXios::parseXiosConfig()", "recv_field_timeout cannot be negative."); 
     80 
     81    checkEventSync = getin<bool>("check_event_sync", checkEventSync); 
    7982 
    8083    globalComm=MPI_COMM_WORLD ; 
  • XIOS/dev/XIOS_DEV_CMIP6/src/cxios.hpp

    r1243 r1377  
    5252     static CRegistry* globalRegistry ; //!< global registry which is wrote by the root process of the servers 
    5353     static double recvFieldTimeout; //!< Time to wait for data before issuing an error when receiving a field 
     54     static bool checkEventSync; //!< For debuuging, check if event are coherent and synchrone on client side 
    5455 
    5556    public: 
  • XIOS/dev/XIOS_DEV_CMIP6/src/event_client.cpp

    r814 r1377  
    55#include "type.hpp" 
    66#include "mpi.hpp" 
     7#include "cxios.hpp" 
    78 
    89namespace xios 
     
    4950     std::list<CMessage*>::iterator itMsg = messages.begin(); 
    5051 
     52     if (CXios::checkEventSync) info(100)<<"Send event "<<timeLine<<" classId : "<<classId<<"  typeId : "<<typeId<<endl ; 
    5153     for (; itBuff != buffers.end(); ++itBuff, ++itSizes, ++itSenders, ++itMsg) 
    5254     { 
  • XIOS/dev/XIOS_DEV_CMIP6/src/event_client.hpp

    r731 r1377  
    2121      std::list<int> getRanks(void); 
    2222      std::list<int> getSizes(void); 
    23  
     23      int getClassId(void) { return classId; } 
     24      int getTypeId(void) { return typeId; } 
     25       
    2426    private: 
    2527      int classId; 
  • XIOS/dev/XIOS_DEV_CMIP6/src/server.cpp

    r1352 r1377  
    734734     } 
    735735 
    736      void CServer::contextEventLoop(void) 
     736     void CServer::contextEventLoop(bool enableEventsProcessing /*= true*/) 
    737737     { 
    738738       bool isFinalized ; 
     
    748748         } 
    749749         else 
    750            it->second->checkBuffersAndListen(); 
     750           it->second->checkBuffersAndListen(enableEventsProcessing); 
    751751       } 
    752752     } 
Note: See TracChangeset for help on using the changeset viewer.