I installed cuda10.1 with the .run file in my $HOME to test it.
After installing cuda I tried to compile the samples but it errored out after a few samples (gcc 5.4.0)
simpleCudaGraphs.cu(286): error: identifier "cudaStreamCaptureModeGlobal" is undefined
simpleCudaGraphs.cu(286): error: too many arguments in function call
2 errors detected in the compilation of "/tmp/tmpxft_00002c32_00000000-14_simpleCudaGraphs.compute_75.cpp1.ii".
Makefile:288: recipe for target 'simpleCudaGraphs.o' failed
make[1]: *** [simpleCudaGraphs.o] Error 1
Only a handful of samples are compiled.
Turns out simpleCudaGraphs is the only culprit. After removing it from the samples folder the rest compiled without problem.
OS is Ubuntu 16.04.6. Graphic card is GTX1070, driver Nvidia 418.39
I sorted it. I am testing cuda 10.1 in my $HOME and use a script to preload the environmental variables such as $PATH, $LD_LIBRARY_PATH etc. But forgot to set $CUDA_PATH which is default to /usr/local in these samples’ make file (I don’t think $CUDA_PATH is used anywhere else) Since /usr/local/cuda is at version 10.0, hence the error. Now adding $CUDA_PATH to my script and pointing it to cuda 10.1 solves the problem.