Last change
on this file since 2588 was
2580,
checked in by ymipsl, 10 months ago
|
Tracking unfree MPI windows and communicators.
YM
|
-
Property svn:executable set to
*
|
File size:
654 bytes
|
Line | |
---|
1 | #include "window_base.hpp" |
---|
2 | #include "cxios.hpp" |
---|
3 | |
---|
4 | namespace xios |
---|
5 | { |
---|
6 | CWindowBase::CWindowBase(MPI_Comm winComm, size_t bufferSize, const string name) : name_(name) |
---|
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 | info(100)<<"CWindowBase constructor : "<<name_<<endl ; |
---|
16 | MPI_Barrier(winComm) ; |
---|
17 | } |
---|
18 | |
---|
19 | |
---|
20 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.