Changeset 2570


Ignore:
Timestamp:
09/18/23 11:12:40 (8 months ago)
Author:
jderouillat
Message:

Memory cleaning of the EventScheduler? hierarchy triggered by the PoolRessource? cleaning through freeRessourceEventScheduler_. Cleaning of MPI_Window associated to services operated through the MpiGarbageCollector?.

Location:
XIOS3/trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • XIOS3/trunk/src/event_scheduler.cpp

    r2569 r2570  
    9292      checkEvent_() ; 
    9393    }  
    94     cleanSplitSchedulers(); 
    9594  } 
    9695     
  • XIOS3/trunk/src/event_scheduler.hpp

    r2569 r2570  
    6161       void setChildScheduler(shared_ptr<CEventScheduler> childScheduler) { childScheduler_ = childScheduler ;} 
    6262       void splitScheduler(const MPI_Comm& splittedComm, shared_ptr<CEventScheduler>& parent, shared_ptr<CEventScheduler>& child) ; 
     63       void cleanSplitSchedulers(); 
    6364 
    6465       //! Public interface to give the hand to the instance to check pending or incoming message. 
     
    7172       private: 
    7273         void initialize(const MPI_Comm& comm) ; 
    73          void cleanSplitSchedulers(); 
    7474        
    7575       //! Send an event to the parent of level `lev+1` 
  • XIOS3/trunk/src/manager/pool_ressource.cpp

    r2547 r2570  
    429429  CPoolRessource::~CPoolRessource() 
    430430  { 
     431    freeRessourceEventScheduler_->cleanSplitSchedulers(); 
    431432    delete winNotify_ ; 
    432433    for(auto& service : services_) delete service.second ; 
  • XIOS3/trunk/src/manager/window_base.cpp

    r2517 r2570  
    11#include "window_base.hpp" 
     2#include "cxios.hpp" 
    23 
    34namespace xios 
    45{ 
     6    CWindowBase::CWindowBase(MPI_Comm winComm, size_t bufferSize) 
     7    { 
     8      bufferSize_ = bufferSize ; 
     9      windowSize_ = bufferSize_ + OFFSET_BUFFER ; 
     10      MPI_Win_allocate(windowSize_, 1, MPI_INFO_NULL, winComm, &winBuffer_, &window_) ; 
     11      CXios::getMpiGarbageCollector().registerWindow(window_) ; 
     12      MPI_Aint& lock = *((MPI_Aint*)((char*)winBuffer_+OFFSET_LOCK)) ; 
     13      lock=0 ; 
     14      MPI_Win_lock_all(0, window_) ; 
     15      MPI_Barrier(winComm) ; 
     16    } 
    517   
    618   
  • XIOS3/trunk/src/manager/window_base.hpp

    r2547 r2570  
    2424    public : 
    2525 
    26     CWindowBase(MPI_Comm winComm, size_t bufferSize) 
    27     { 
    28       bufferSize_ = bufferSize ; 
    29       windowSize_ = bufferSize_ + OFFSET_BUFFER ; 
    30       MPI_Win_allocate(windowSize_, 1, MPI_INFO_NULL, winComm, &winBuffer_, &window_) ; 
    31       MPI_Aint& lock = *((MPI_Aint*)((char*)winBuffer_+OFFSET_LOCK)) ; 
    32       lock=0 ; 
    33       MPI_Win_lock_all(0, window_) ; 
    34       MPI_Barrier(winComm) ; 
    35     } 
     26    CWindowBase(MPI_Comm winComm, size_t bufferSize); 
    3627 
    3728    bool tryLockExclusive(int rank) 
     
    152143    { 
    153144      MPI_Win_unlock_all(window_); 
    154       MPI_Win_free(&window_) ; 
    155145    } 
    156146 
Note: See TracChangeset for help on using the changeset viewer.