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 ( ) { ...@@ -119,6 +119,7 @@ void Memory::memFree ( ) {
if ( this->masterRank_ ) { if ( this->masterRank_ ) {
printMsg ( DEBUG, "Close file %s on HDD (%s:%d)\n", this->fileName_, __FILE__, __LINE__ ); printMsg ( DEBUG, "Close file %s on HDD (%s:%d)\n", this->fileName_, __FILE__, __LINE__ );
} }
//MPI_File_sync ( this->fileHandle_ );
MPI_File_close ( &this->fileHandle_ ); MPI_File_close ( &this->fileHandle_ );
break; break;
case NVR: case NVR:
...@@ -165,7 +166,8 @@ int Memory::memWrite ( void* srcBuffer, int64_t srcSize, int64_t offset, int des ...@@ -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 () ); printMsg ( ERROR, "Error while writing data (mem = %s)\n", this->memName () );
break; break;
case HDD: 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) { if ( err != MPI_SUCCESS) {
MPI_Error_string ( err, estring, &len ); MPI_Error_string ( err, estring, &len );
printMsg ( ERROR, "Error while writing data (mem = %s): %s\n", this->memName (), estring ); printMsg ( ERROR, "Error while writing data (mem = %s): %s\n", this->memName (), estring );
...@@ -225,6 +227,7 @@ int Memory::memFlush ( ) { ...@@ -225,6 +227,7 @@ int Memory::memFlush ( ) {
case HDD: case HDD:
if ( this->request_ != NULL ) if ( this->request_ != NULL )
MPI_Wait ( &this->request_, &status ); MPI_Wait ( &this->request_, &status );
MPI_File_sync ( this->fileHandle_ );
break; break;
case NVR: case NVR:
err = MPI_Win_fence ( 0, this->RMAWin_ ); err = MPI_Win_fence ( 0, this->RMAWin_ );
...@@ -240,7 +243,8 @@ int Memory::memFlush ( ) { ...@@ -240,7 +243,8 @@ int Memory::memFlush ( ) {
MPI_Abort ( MPI_COMM_WORLD, -1 ); MPI_Abort ( MPI_COMM_WORLD, -1 );
} }
} }
err = MPI_Win_fence ( 0, this->RMAWin_ );
break; break;
default: default:
printMsg ( ERROR, "Error while flushing data (mem = %s)\n", this->memName () ); 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