From 1c6f1bf24513b4e56f640eea402fa8223ea1c667 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Mon, 1 May 2023 18:25:01 +0200 Subject: Use WARPX_ABORT_WITH_MESSAGE("msg") instead of amrex::Abort(Utils::TextMsg::Err("msg")) (#3879) * use WARPX_ABORT_WITH_MSG instead of amrex::Abort(Utils::TextMsg::Err(msg)) [WIP] * use WARPX_ABORT_WITH_MESSAGE * fix typo * fix missing parenthesis * remove spaces to prevent automatic text wrapping * remove wrong parenthesis --- Source/FieldSolver/SpectralSolver/WrapCuFFT.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Source/FieldSolver/SpectralSolver/WrapCuFFT.cpp') diff --git a/Source/FieldSolver/SpectralSolver/WrapCuFFT.cpp b/Source/FieldSolver/SpectralSolver/WrapCuFFT.cpp index 030efcd4b..59b200a32 100644 --- a/Source/FieldSolver/SpectralSolver/WrapCuFFT.cpp +++ b/Source/FieldSolver/SpectralSolver/WrapCuFFT.cpp @@ -37,7 +37,7 @@ namespace AnyFFT result = cufftPlan2d( &(fft_plan.m_plan), real_size[1], real_size[0], VendorR2C); } else { - amrex::Abort(Utils::TextMsg::Err("only dim=2 and dim=3 have been implemented")); + WARPX_ABORT_WITH_MESSAGE("only dim=2 and dim=3 have been implemented"); } } else { if (dim == 3) { @@ -47,7 +47,7 @@ namespace AnyFFT result = cufftPlan2d( &(fft_plan.m_plan), real_size[1], real_size[0], VendorC2R); } else { - amrex::Abort(Utils::TextMsg::Err("only dim=2 and dim=3 have been implemented")); + WARPX_ABORT_WITH_MESSAGE("only dim=2 and dim=3 have been implemented"); } } @@ -89,11 +89,11 @@ namespace AnyFFT result = cufftExecZ2D(fft_plan.m_plan, fft_plan.m_complex_array, fft_plan.m_real_array); #endif } else { - amrex::Abort(Utils::TextMsg::Err( - "direction must be AnyFFT::direction::R2C or AnyFFT::direction::C2R")); + WARPX_ABORT_WITH_MESSAGE( + "direction must be AnyFFT::direction::R2C or AnyFFT::direction::C2R"); } if ( result != CUFFT_SUCCESS ) { - amrex::Print() << Utils::TextMsg::Err( + WARPX_ABORT_WITH_MESSAGE( "forward transform using cufftExec failed ! Error: " +cufftErrorToString(result)); } -- cgit v1.2.3