From 9d472b3c51cc04c4625fc32b624325ff9f16e137 Mon Sep 17 00:00:00 2001 From: Vincent Michaud-Rioux Date: Thu, 26 Oct 2023 14:42:10 +0000 Subject: [PATCH] Add barrier. --- .../core/src/simulators/lightning_gpu/utils/MPILinearAlg.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pennylane_lightning/core/src/simulators/lightning_gpu/utils/MPILinearAlg.hpp b/pennylane_lightning/core/src/simulators/lightning_gpu/utils/MPILinearAlg.hpp index cd2afd426b..9f0f3972a6 100644 --- a/pennylane_lightning/core/src/simulators/lightning_gpu/utils/MPILinearAlg.hpp +++ b/pennylane_lightning/core/src/simulators/lightning_gpu/utils/MPILinearAlg.hpp @@ -113,8 +113,9 @@ inline void SparseMV_cuSparseMPI( length_local, reduce_root_rank, "sum"); } + PL_CUDA_IS_SUCCESS(cudaDeviceSynchronize()); + mpi_manager.Barrier(); } - mpi_manager.Barrier(); } } // namespace Pennylane::LightningGPU::Util \ No newline at end of file