Commit abf9bd6b authored by Yutong Zhao's avatar Yutong Zhao
Browse files

Explicitly check for the return code of nvcc in CUDA JIT compilation.

parent 4f911c7a
......@@ -328,7 +328,15 @@ static bool compileInWindows(const string &command) {
return -1;
}
WaitForSingleObject(pi.hProcess, INFINITE);
return 0;
DWORD exitCode = -1;
if(!GetExitCodeProcess(pi.hProcess, &exitCode)) {
throw(OpenMMException("Could not get nvcc.exe's exit code\n"));
} else {
if(exitCode == 0)
return 0;
else
return -1;
}
}
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment