Add help text in case of error

This commit is contained in:
Laurent Clouet
2015-06-25 00:42:46 +01:00
parent 0927682365
commit be4b8969ba

View File

@@ -57,6 +57,11 @@ public class GPU {
result = cudalib.cuInit(0); result = cudalib.cuInit(0);
if (result != CUresult.CUDA_SUCCESS) { if (result != CUresult.CUDA_SUCCESS) {
System.out.println("GPU::generate cuInit failed (ret: " + result + ")"); System.out.println("GPU::generate cuInit failed (ret: " + result + ")");
if (result == CUresult.CUDA_ERROR_UNKNOWN) {
System.out.println("If you are running Linux, this error is usually due to nvidia kernel module 'nvidia_uvm' not loaded.");
System.out.println("Relaunch the application as root or load the module.");
System.out.println("Most of time it does fix the issue.");
}
return false; return false;
} }