Ignore:
Timestamp:
06/12/23 11:52:10 (13 months ago)
Author:
ymipsl
Message:

New way to manage locks in window manager. Windows is locked with MPI_Win_lock_all at creation (shared mode), and lock is manage by software way in the class (using MPI_swap_and_compare and MPI_Fetch_op). We get in this case a better control of lock, with controled latency between each attemp of lock.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/manager/pool_ressource.cpp

    r2494 r2517  
    2727     
    2828    notifyType_=NOTIFY_NOTHING; 
    29     winNotify_->lockWindow(commRank,0) ; 
    30     winNotify_->updateToWindow(commRank, this, &CPoolRessource::notificationsDumpOut) ; 
    31     winNotify_->unlockWindow(commRank,0) ;        
     29    winNotify_->updateToExclusiveWindow(commRank, this, &CPoolRessource::notificationsDumpOut) ; 
    3230    MPI_Barrier(poolComm_) ; 
    3331  } 
     
    104102  void CPoolRessource::sendNotification(int rank) 
    105103  { 
    106     winNotify_->lockWindowExclusive(rank) ; 
    107     winNotify_->pushToLockedWindow(rank, this, &CPoolRessource::notificationsDumpOut) ; 
    108     winNotify_->unlockWindow(rank) ; 
     104    winNotify_->pushToExclusiveWindow(rank, this, &CPoolRessource::notificationsDumpOut) ; 
    109105  } 
    110106 
     
    113109    int commRank ; 
    114110    MPI_Comm_rank(poolComm_, &commRank) ; 
    115     winNotify_->lockWindowExclusive(commRank) ; 
    116     winNotify_->popFromLockedWindow(commRank, this, &CPoolRessource::notificationsDumpIn) ; 
    117     winNotify_->unlockWindow(commRank) ; 
     111    winNotify_->popFromExclusiveWindow(commRank, this, &CPoolRessource::notificationsDumpIn) ; 
    118112    if (notifyType_==NOTIFY_CREATE_SERVICE) createService() ; 
    119113    else if (notifyType_==NOTIFY_CREATE_SERVICE_ONTO) createServiceOnto() ; 
Note: See TracChangeset for help on using the changeset viewer.