Commit bdc8f29e authored by Peter Eastman's avatar Peter Eastman
Browse files

If temp directory does not exist, use runtime compiler

parent 3e974a97
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include <set> #include <set>
#include <sstream> #include <sstream>
#include <typeinfo> #include <typeinfo>
#include <sys/stat.h>
#include <cudaProfiler.h> #include <cudaProfiler.h>
#ifndef WIN32 #ifndef WIN32
#include <unistd.h> #include <unistd.h>
...@@ -127,7 +128,8 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking ...@@ -127,7 +128,8 @@ CudaContext::CudaContext(const System& system, int deviceIndex, bool useBlocking
string testCompilerCommand = this->compiler+" --version > /dev/null 2> /dev/null"; string testCompilerCommand = this->compiler+" --version > /dev/null 2> /dev/null";
int res = std::system(testCompilerCommand.c_str()); int res = std::system(testCompilerCommand.c_str());
#endif #endif
isNvccAvailable = (res == 0); struct stat info;
isNvccAvailable = (res == 0 && stat(tempDir.c_str(), &info) == 0);
static bool hasShownNvccWarning = false; static bool hasShownNvccWarning = false;
if (hasCompilerKernel && !isNvccAvailable && !hasShownNvccWarning) { if (hasCompilerKernel && !isNvccAvailable && !hasShownNvccWarning) {
hasShownNvccWarning = true; hasShownNvccWarning = true;
......
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