Last change
on this file since 2606 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
|
Rev | Line | |
---|
[2517] | 1 | #include "window_base.hpp" |
---|
[2570] | 2 | #include "cxios.hpp" |
---|
[2517] | 3 | |
---|
| 4 | namespace xios |
---|
| 5 | { |
---|
[2580] | 6 | CWindowBase::CWindowBase(MPI_Comm winComm, size_t bufferSize, const string name) : name_(name) |
---|
[2570] | 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_) ; |
---|
[2580] | 15 | info(100)<<"CWindowBase constructor : "<<name_<<endl ; |
---|
[2570] | 16 | MPI_Barrier(winComm) ; |
---|
| 17 | } |
---|
[2517] | 18 | |
---|
| 19 | |
---|
| 20 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.