diff --git a/dash/include/dash/matrix/internal/Matrix-inl.h b/dash/include/dash/matrix/internal/Matrix-inl.h index 0612106c6..1b62b6f19 100644 --- a/dash/include/dash/matrix/internal/Matrix-inl.h +++ b/dash/include/dash/matrix/internal/Matrix-inl.h @@ -152,7 +152,7 @@ ::allocate( DASH_LOG_TRACE_VAR("Matrix.allocate", _lsize); DASH_LOG_TRACE_VAR("Matrix.allocate", _lcapacity); // Allocate and initialize memory - _glob_mem = new GlobMem_t(_lcapacity, _pattern.team()); + _glob_mem = new GlobMem_t(_lsize, _pattern.team()); _begin = GlobIter_t(_glob_mem, _pattern); _lbegin = _glob_mem->lbegin(); _lend = _glob_mem->lend(); diff --git a/dash/test/MatrixTest.cc b/dash/test/MatrixTest.cc index c36c00c0f..3ab57e085 100644 --- a/dash/test/MatrixTest.cc +++ b/dash/test/MatrixTest.cc @@ -184,7 +184,7 @@ TEST_F(MatrixTest, Distribute1DimBlockcyclicY) team_spec); LOG_MESSAGE("Matrix initialized, wait for barrier ..."); - dash::Team::All().barrier(); + matrix.barrier(); LOG_MESSAGE("Team barrier passed"); size_t matrix_size = extent_cols * extent_rows; @@ -204,7 +204,7 @@ TEST_F(MatrixTest, Distribute1DimBlockcyclicY) } // Units waiting for value initialization LOG_MESSAGE("Values assigned, wait for barrier ..."); - dash::Team::All().barrier(); + matrix.barrier(); LOG_MESSAGE("Team barrier passed"); // Read and assert values in matrix