From 2eefedf6617d9e59e32435778498575b267ecc87 Mon Sep 17 00:00:00 2001 From: Tobias Meyer Andersen Date: Wed, 17 Apr 2024 13:46:49 +0200 Subject: [PATCH] remove error logging in std::cerr --- opm/simulators/linalg/cuistl/CuOwnerOverlapCopy.hpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/opm/simulators/linalg/cuistl/CuOwnerOverlapCopy.hpp b/opm/simulators/linalg/cuistl/CuOwnerOverlapCopy.hpp index 5754c343b..5190af999 100644 --- a/opm/simulators/linalg/cuistl/CuOwnerOverlapCopy.hpp +++ b/opm/simulators/linalg/cuistl/CuOwnerOverlapCopy.hpp @@ -76,7 +76,7 @@ public: const auto dotAtRank = x.dot(y, *m_indicesOwner); output = m_cpuOwnerOverlapCopy.communicator().sum(dotAtRank); } - + /** * @brief norm computes the l^2-norm of x across processes. * @@ -110,12 +110,12 @@ protected: * @tparam OwnerOverlapCopyCommunicationType is typically a Dune::LinearOperator::communication_type */ template -class GPUObliviousMPISender : public GPUSender +class GPUObliviousMPISender : public GPUSender { public: using X = CuVector; - GPUObliviousMPISender(const OwnerOverlapCopyCommunicationType& cpuOwnerOverlapCopy) + GPUObliviousMPISender(const OwnerOverlapCopyCommunicationType& cpuOwnerOverlapCopy) : GPUSender(cpuOwnerOverlapCopy) { } @@ -236,15 +236,13 @@ public: MPI_Waitany(m_messageInformation.size(), recvRequests.data(), &finished, &status); if(status.MPI_ERROR!=MPI_SUCCESS) { - std::cerr<< rank << ": MPI_Error occurred while receiving message from "<< processMap[finished] << std::endl; - OPM_THROW(std::runtime_error, "MPI_Error while receiving message"); + OPM_THROW(std::runtime_error, fmt::format("MPI_Error occurred while rank {} received a message from rank {}", rank, processMap[finished])); } } MPI_Status recvStatus; for(size_t i = 0; i < m_messageInformation.size(); i++) { if(MPI_SUCCESS!=MPI_Wait(&sendRequests[i], &recvStatus)) { - std::cerr << rank << ": MPI_Error occurred while sending message to " << processMap[finished] << std::endl; - OPM_THROW(std::runtime_error, "MPI_Error while sending message"); + OPM_THROW(std::runtime_error, fmt::format("MPI_Error occurred while rank {} sent a message from rank {}", rank, processMap[finished])); } } // ...End of MPI stuff