From df33d42347dc65c4cf9fb2072c296ff93be76622 Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Mon, 27 Jan 2020 11:12:07 -0800 Subject: GpuSynchronize() to prevent cudaStreams over-writing shared arrays for positions --- Source/Particles/PhysicalParticleContainer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 7ac887b85..c0960b141 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1112,6 +1112,9 @@ PhysicalParticleContainer::FieldGather (int lev, costarr(i,j,k) += wt; }); } + // synchronize avoids cudaStreams from over-writing the temporary arrays used to + // store positions + Gpu::synchronize(); } } } -- cgit v1.2.3