aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/PhysicalParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar RevathiJambunathan <revanathan@gmail.com> 2020-01-27 11:12:07 -0800
committerGravatar RevathiJambunathan <revanathan@gmail.com> 2020-01-27 11:12:07 -0800
commitdf33d42347dc65c4cf9fb2072c296ff93be76622 (patch)
tree18f586b50a0d9cf02482adb38ff41ad08b9e53f8 /Source/Particles/PhysicalParticleContainer.cpp
parent1080fc43778ac92174a2ed94750a3b14673b14a3 (diff)
downloadWarpX-df33d42347dc65c4cf9fb2072c296ff93be76622.tar.gz
WarpX-df33d42347dc65c4cf9fb2072c296ff93be76622.tar.zst
WarpX-df33d42347dc65c4cf9fb2072c296ff93be76622.zip
GpuSynchronize() to prevent cudaStreams over-writing shared arrays for positions
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp3
1 files changed, 3 insertions, 0 deletions
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();
}
}
}