From 05ec2789f04776cdfdd34a31f4aa8ecee4a24fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <klinkjak@fjfi.cvut.cz> Date: Mon, 20 Feb 2017 17:31:06 +0100 Subject: [PATCH] Added missing synchronization to the mesh traverser --- src/TNL/Meshes/MeshDetails/Traverser_impl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/TNL/Meshes/MeshDetails/Traverser_impl.h b/src/TNL/Meshes/MeshDetails/Traverser_impl.h index 9d449c8751..88a11d1b78 100644 --- a/src/TNL/Meshes/MeshDetails/Traverser_impl.h +++ b/src/TNL/Meshes/MeshDetails/Traverser_impl.h @@ -173,6 +173,8 @@ processBoundaryEntities( const MeshPointer& meshPointer, ( &meshPointer.template getData< Devices::Cuda >(), &userDataPointer.template modifyData< Devices::Cuda >(), entitiesCount ); + cudaDeviceSynchronize(); + checkCudaDevice; #else CudaSupportMissingMessage; #endif @@ -203,6 +205,8 @@ processInteriorEntities( const MeshPointer& meshPointer, ( &meshPointer.template getData< Devices::Cuda >(), &userDataPointer.template modifyData< Devices::Cuda >(), entitiesCount ); + cudaDeviceSynchronize(); + checkCudaDevice; #else CudaSupportMissingMessage; #endif @@ -233,6 +237,8 @@ processAllEntities( const MeshPointer& meshPointer, ( &meshPointer.template getData< Devices::Cuda >(), &userDataPointer.template modifyData< Devices::Cuda >(), entitiesCount ); + cudaDeviceSynchronize(); + checkCudaDevice; #else CudaSupportMissingMessage; #endif -- GitLab