I’ve noticed that after running one CUDA program before another CUDA program can cause the latter program to crash or not function correctly.
Is there any way to reset the GPU or reset whatever the first program did? I noticed this issue when the first program doesn’t end cleanly, CUDA programs I run afterward tend to fail as well.
This is definitely not supposed to happen. Do you see any unusual messages appear in dmesg when you run the first program?
Well I believe the program crashed because I gave it a large amount of data (thru MATLAB) which did not fit into the device memory. After that program crashed, I ran another CUDA program (called thru MATLAB) which returned results of 0.
Perhaps, but trying to use too much memory (or even making a pointer error in device code) should not cause later programs to fail. Can you give some more detail about operating system and NVIDIA driver version? Maybe some one has seen this bug.