Commit d3aaafbe authored by Francois Tessier's avatar Francois Tessier

NVR on Cooley: blocking writes from the aggregators

parent f45670e2
......@@ -119,6 +119,7 @@ void Memory::memFree ( ) {
if ( this->masterRank_ ) {
printMsg ( DEBUG, "Close file %s on HDD (%s:%d)\n", this->fileName_, __FILE__, __LINE__ );
}
//MPI_File_sync ( this->fileHandle_ );
MPI_File_close ( &this->fileHandle_ );
break;
case NVR:
......@@ -165,7 +166,8 @@ int Memory::memWrite ( void* srcBuffer, int64_t srcSize, int64_t offset, int des
printMsg ( ERROR, "Error while writing data (mem = %s)\n", this->memName () );
break;
case HDD:
err = MPI_File_iwrite_at ( this->fileHandle_, offset, srcBuffer, srcSize, MPI_BYTE, &this->request_ );
//err = MPI_File_iwrite_at ( this->fileHandle_, offset, srcBuffer, srcSize, MPI_BYTE, &this->request_ );
err = MPI_File_write_at ( this->fileHandle_, offset, srcBuffer, srcSize, MPI_BYTE, &status );
if ( err != MPI_SUCCESS) {
MPI_Error_string ( err, estring, &len );
printMsg ( ERROR, "Error while writing data (mem = %s): %s\n", this->memName (), estring );
......@@ -225,6 +227,7 @@ int Memory::memFlush ( ) {
case HDD:
if ( this->request_ != NULL )
MPI_Wait ( &this->request_, &status );
MPI_File_sync ( this->fileHandle_ );
break;
case NVR:
err = MPI_Win_fence ( 0, this->RMAWin_ );
......@@ -240,7 +243,8 @@ int Memory::memFlush ( ) {
MPI_Abort ( MPI_COMM_WORLD, -1 );
}
}
err = MPI_Win_fence ( 0, this->RMAWin_ );
break;
default:
printMsg ( ERROR, "Error while flushing data (mem = %s)\n", this->memName () );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment