From a231c0b818d4da394b53a273ccb264586a984c11 Mon Sep 17 00:00:00 2001 From: Felix Moessbauer Date: Thu, 19 Jan 2017 17:51:35 +0100 Subject: [PATCH] Bug 226 matrix (#242) fixed local viewspec of matrix --- dash/include/dash/matrix/internal/Matrix-inl.h | 2 +- dash/test/MatrixTest.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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