andyschwarzl / gpuNUFFT

gpuNUFFT - An Open-Source GPU Library for 3D Gridding with Direct Matlab and Python Interface
http://cai2r.net/resources/software/gpunufft-open-source-gpu-library-3d-gridding-direct-matlab-interface
Other
77 stars 32 forks source link

Matlab crashes when calling mex_gpuNUFFT_precomp_f() #70

Open lukasbrnst opened 5 years ago

lukasbrnst commented 5 years ago

Hi! I just used cmake to set up the .mex files as instructed in the read.me. But unfortunaltely I have issues using gpuNUFFT as Matlab crashes every time. Once I try to execute the demo script cgsense_brain32ch_recon_2D.m it starts executing the code so I guess the compiling process was successful, but Matlab crashes very rapidly without seeing any errors when executing mex_gpuNUFFT_precomp_f(...) which gets called within the function gpuNUFFT(...). It happens with any data, also with the demo script. When observing the behaviour of my machine in the task manager, I see no rise in ram or anything else. My machine uses 16GB ram, a Cuda 10, and Matlab 2018a. I experience the same problem using cloud computing, so I dont think its the limitations of my machine.

Can anybody help me?

Thank you Lukas

andyschwarzl commented 5 years ago

Hi,

it looks like any kind of mex kernel call causes the crash on your system. Unfortunately, these errors are hard to debug. Are you working on a Windows or Linux machine? And, what GPU do you utilize?

Maybe you will see some error messages if you start the Matlab process from the command line.

A further approach would be to also build the library tests with the CMake option (-DGEN_TESTS=ON). This requires the gtest framework to be installed, but lets you perform a quick check if the basic CUDA kernels work correctly.

Best, Andy

DBermudez0 commented 5 years ago

I am also having the same problem. MATLAB 2018b is crashing when calling the mex_gpuNUFFT_precomp_f(...) within the function gpuNUFFT(...). This is when I try to run demos scripts cgsense_brain32ch_recon_2D.m and cgsense_phantom_recon.m. I also try what you suggested to run the script from the terminal to see if it have me error messages on how to debug the problem, but it did not.

Thank you for your time, Dalton