Skip to content

Commit 95f672d

Browse files
committed
ParallelAdd: Buffer unpacking should respect the deterministic flag
1 parent 112b2d3 commit 95f672d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Src/Base/AMReX_FabArray.H

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ struct PCData {
145145
Vector<std::size_t> recv_size;
146146
Vector<MPI_Request> recv_reqs;
147147
Vector<MPI_Request> send_reqs;
148+
bool deterministic = false;
148149

149150
};
150151

Src/Base/AMReX_FabArrayCommI.H

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,7 @@ FabArray<FAB>::ParallelCopy_nowait (const FabArray<FAB>& src,
578578
pcd->src = &src;
579579
pcd->op = op;
580580
pcd->tag = tag;
581+
pcd->deterministic = deterministic;
581582

582583
NC = std::min(NCompLeft,FabArrayBase::MaxComp);
583584
const bool last_iter = (NCompLeft == NC);
@@ -708,7 +709,8 @@ FabArray<FAB>::ParallelCopy_finish ()
708709
if (Gpu::inLaunchRegion())
709710
{
710711
unpack_recv_buffer_gpu(*this, pcd->DC, pcd->NC, pcd->recv_data, pcd->recv_size,
711-
recv_cctc, pcd->op, is_thread_safe, thecpc->m_id, false);
712+
recv_cctc, pcd->op, is_thread_safe, thecpc->m_id,
713+
pcd->deterministic);
712714
}
713715
else
714716
#endif

0 commit comments

Comments
 (0)