Check CUDA return codes in fft_scalar.cuFFT
#325 (closed) indicates missing stopper when GPU out-of-memory happens.
The return code of EVERY CUDA call must be checked.
With this fix.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Error in routine fft_scalar_cuFFT: cfft3d_gpu (2):
cufftPlanMany failed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
stopping ...
Error code 2 returns
CUFFT_ALLOC_FAILED = 2, // cuFFT failed to allocate GPU or CPU memory
as documented in https://docs.nvidia.com/cuda/cufft/index.html#cufftresult