Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt Lulesh to DASH v0.3.0 release #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lulesh/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(DASH_DART_IMPL "MPI")
file(GLOB SOURCES *.cc)

set(CXX_FLAGS "-O3 -Ofast -DUSE_DASH")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)

## Do not edit below this line unless you know what you are doing

Expand Down
7 changes: 3 additions & 4 deletions lulesh/lulesh-comm-dash.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,15 @@ Int_t DASHComm::offset(Int_t desc)
return offs;
}

dash::GlobIter<Real_t, dash::Pattern<1>>
DASHComm::global_iterator
DASHComm::dest(Int_t rank, Int_t desc)
{
auto& pat = m_commDataRecv->pattern();

auto offs = offset(desc);

dash::GlobIter<Real_t, dash::Pattern<1> > it
= m_commDataRecv->begin() + pat.global_index(dash::team_unit_t(rank),
{offs});
auto it = m_commDataRecv->begin()
+ pat.global_index( dash::team_unit_t{rank}, {offs} );

return it;
}
Expand Down
9 changes: 5 additions & 4 deletions lulesh/lulesh-comm-dash.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ class DASHComm
dash::Array<Real_t> *m_commDataRecv;

public:
typedef dash::Array<Real_t> array_type;
typedef dash::Array<Real_t> array_type;
typedef array_type::iterator global_iterator;

public:
DASHComm(Domain& dom);
Expand Down Expand Up @@ -94,12 +95,12 @@ class DASHComm

// determine global destination pointer for a target unit rank and
// location descriptor
dash::GlobIter<Real_t, dash::Pattern<1>>
global_iterator
dest( Int_t rank, Int_t desc );

// 26 = 6 faces + 12 edges + 8 corners
dash::Future<array_type::iterator> recvRequest[26];
dash::Future<array_type::iterator> sendRequest[26];
dash::Future<global_iterator> recvRequest[26];
dash::Future<global_iterator> sendRequest[26];

double wtime();
template<typename T> T allreduce_min(T val);
Expand Down