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 From 4cca65a294c9a4e53c378c551d31c64d8ca4f135 Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Mon, 27 Jan 2020 11:19:42 -0800 Subject: EOL fix --- Source/Particles/PhysicalParticleContainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index c0960b141..d437a5b61 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1112,7 +1112,7 @@ PhysicalParticleContainer::FieldGather (int lev, costarr(i,j,k) += wt; }); } - // synchronize avoids cudaStreams from over-writing the temporary arrays used to + // synchronize avoids cudaStreams from over-writing the temporary arrays used to // store positions Gpu::synchronize(); } -- cgit v1.2.3