From f1b2f37fe2f34ea6f4afe44162d6e6c15a3a08b7 Mon Sep 17 00:00:00 2001 From: Gallo Alejandro Date: Mon, 12 Sep 2022 18:41:37 +0200 Subject: [PATCH] Check CUresult for mpi_data to device --- include/atrip/Slice.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/atrip/Slice.hpp b/include/atrip/Slice.hpp index 34a12bc..0990d42 100644 --- a/include/atrip/Slice.hpp +++ b/include/atrip/Slice.hpp @@ -21,6 +21,7 @@ #include #include +#include namespace atrip { @@ -458,7 +459,11 @@ void unwrapAndMarkReady() { #if defined(HAVE_CUDA) // copy the retrieved mpi data to the device WITH_CHRONO("cuda:memcpy", - cuMemcpyHtoD(data, (void*)mpi_data, sizeof(F) * size);) + _CHECK_CUDA_SUCCESS("copying mpi data to device", + cuMemcpyHtoD(data, + (void*)mpi_data, + sizeof(F) * size)); + ) std::free(mpi_data); #endif