"ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "4e50d72141b60a7a37ce6f2ef94d49d85a1529b1"
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) { ...@@ -328,7 +328,15 @@ static bool compileInWindows(const string &command) {
return -1; return -1;
} }
WaitForSingleObject(pi.hProcess, INFINITE); 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 #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