Ignore:
Timestamp:
08/29/23 17:24:04 (10 months ago)
Author:
ymipsl
Message:

Major update :

  • New method to lock and unlock one-sided windows (window_dynamic) to avoid network overhead
  • Introducing multithreading on server sided to manage more efficiently dead-lock occuring (similar to co-routine which will be available and implemented in futur c++ standard), based on c++ threads
  • Suprression of old "attached mode" which is replaced by online writer and reder filters

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/transport/one_sided_context_client.cpp

    r2399 r2547  
    2222    \param [in] intraComm_ communicator of group client 
    2323    \param [in] interComm_ communicator of group server 
    24     \cxtSer [in] cxtSer Pointer to context of server side. (It is only used in case of attached mode). 
     24    \cxtSer [in] cxtSer Pointer to context of server side. (It is only used in case of attached mode --> obsolete ). 
    2525    */ 
    2626    COneSidedContextClient::COneSidedContextClient(CContext* parent, MPI_Comm intraComm_, MPI_Comm interComm_, CContext* cxtSer) 
     
    3030       
    3131      pureOneSided=CXios::getin<bool>("pure_one_sided",false); // pure one sided communication (for test) 
    32       if (isAttachedModeEnabled()) pureOneSided=false ; // no one sided in attach mode 
    33  
    34       if (!isAttachedModeEnabled()) MPI_Intercomm_merge(interComm_,false, &interCommMerged_) ; 
     32 
     33      MPI_Intercomm_merge(interComm_,false, &interCommMerged_) ; 
    3534       
    3635      MPI_Comm_split(intraComm_,clientRank,clientRank, &commSelf_) ; // for windows 
    37  
     36      eventScheduler_ = parent->getEventScheduler() ;   
    3837      timeLine = 1; 
    3938    } 
     
    109108        { 
    110109          if (CTimer::get("Blocking time").isSuspended()) CTimer::get("Blocking time").resume() ; 
    111           callGlobalEventLoop() ; 
     110          yield() ; 
    112111        }  
    113112      } 
    114113      if (!CTimer::get("Blocking time").isSuspended()) CTimer::get("Blocking time").suspend() ; 
    115114 
    116       if (isAttachedModeEnabled()) // couldBuffer is always true in attached mode 
    117       { 
    118         while (checkBuffers(ranks)) callGlobalEventLoop() ; 
    119        
    120         CXios::getDaemonsManager()->scheduleContext(hashId_) ; 
    121         while (CXios::getDaemonsManager()->isScheduledContext(hashId_)) callGlobalEventLoop() ; 
    122       } 
     115 
     116      synchronize() ; 
    123117       
    124118      timeLine++; 
     
    137131     locked_=false ; 
    138132   } 
     133 
     134   void COneSidedContextClient::yield(void) 
     135   { 
     136     locked_=true ; 
     137     context_->yield() ; 
     138     locked_=false ; 
     139   } 
     140 
     141   void COneSidedContextClient::synchronize(void) 
     142   { 
     143     if (context_->getServiceType()!=CServicesManager::CLIENT) 
     144     { 
     145       locked_=true ; 
     146       context_->synchronize() ; 
     147       locked_=false ; 
     148     }     
     149   } 
     150 
    139151   /*! 
    140152   Make a new buffer for a certain connection to server with specific rank 
     
    271283  bool COneSidedContextClient::isNotifiedFinalized(void) 
    272284  { 
    273     if (isAttachedModeEnabled()) return true ; 
    274285 
    275286    bool finalized = true; 
Note: See TracChangeset for help on using the changeset viewer.