source: XIOS3/trunk/src/manager/window_base.cpp @ 2570

Last change on this file since 2570 was 2570, checked in by jderouillat, 10 months ago

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

  • Property svn:executable set to *
File size: 558 bytes
Line 
1#include "window_base.hpp"
2#include "cxios.hpp"
3
4namespace xios
5{
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    }
17 
18 
19}
Note: See TracBrowser for help on using the repository browser.