Skip to content
Snippets Groups Projects
Commit 4f476f8c authored by Nicolas Tancogne-Dejean's avatar Nicolas Tancogne-Dejean
Browse files

Merge branch 'cufft_error_message' into 'develop'

Make cufft error message more verbose for allocation errors

See merge request !1655
parents d5f18804 a6b12568
No related branches found
No related tags found
1 merge request!1655Make cufft error message more verbose for allocation errors
Pipeline #498630645 passed
......@@ -35,13 +35,17 @@ typedef int CUdeviceptr;
typedef int cudaStream_t;
#endif
#define CUFFT_SAFE_CALL(x) \
do { \
cufftResult safe_call_result = x; \
if(safe_call_result != CUFFT_SUCCESS) { \
std::cerr << "\nerror: " #x " failed with error " << safe_call_result << std::endl; \
exit(1); \
} \
#define CUFFT_SAFE_CALL(x) \
do { \
cufftResult safe_call_result = x; \
if(safe_call_result != CUFFT_SUCCESS) { \
std::cerr << "\nerror: " #x " failed with error " << safe_call_result << std::endl; \
if(safe_call_result == CUFFT_ALLOC_FAILED) { \
std::cerr << "cuFFT failed to allocate GPU or CPU memory." << std::endl; \
std::cerr << "Please try to use more nodes for the parallelization." << std::endl; \
} \
exit(1); \
} \
} while(0)
extern "C" void FC_FUNC_(cuda_fft_plan3d, CUDA_FFT_PLAN3D)(cufftHandle **plan, fint * nx, fint * ny, fint * nz, fint * type, cudaStream_t ** stream){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment