I have recently installed version10.7 of the HPC SDK on my 64-bit Ubuntu 20.04 system with TITAN X GPU. When I try to compile a simple C++17 test program, I get a message such as “Error-CUDA version 10.2 is not available in this installation . Please read documentation for CUDA_HOME to solve this issue”. My system has the nvidia-driver-440 and nvidia-cuda-toolkit packages installed. I note that nvcc is located in the /usr/bin
directory; and reports 10.1 as the release number.
https://docs.nvidia.com/hpc-sdk/index.html
https://docs.nvidia.com/hpc-sdk/compilers/c+±parallel-algorithms/index.html
https://docs.nvidia.com/hpc-sdk/compilers/hpc-compilers-user-guide/index.html#cuda-toolkit-versions
I began by following the blog post “Accelerating Standard C++ with GPUs Using stdpar”; and then worked through some suggestions via the three links above. I can only ever get the message to indicate that it is another version of CUDA that it can’t find. The command I start with is:
/opt/nvidia/hpc_sdk/Linux_x86_64/20.7/compilers/bin/nvc++ -stdpar help.cpp
I began by adding -gpu=cuda10.1
and/or -gpu=cc60
(Pascal). I also tried setting CUDA_HOME
to /usr/bin
. Recognising that there are a few CUDA versions included with the SDK I also tried first with the environment commands below, and then tried a few other -gpu=CUDAX.Y
options.
NVARCH=`uname -s`_`uname -m`; export NVARCH
NVCOMPILERS=/opt/nvidia/hpc_sdk; export NVCOMPILERS
MANPATH=$MANPATH:$NVCOMPILERS/$NVARCH/20.7/compilers/man; export MANPATH
PATH=$NVCOMPILERS/$NVARCH/20.7/compilers/bin:$PATH; export PATH
nvaccelinfo
reports the CUDA Driver Version as 10020.
Here is one C++ program which can trigger the error:
#include <algorithm>
#include <iostream>
#include <vector>
#include <execution>
int main()
{
std::vector<int> v = {5,100,3,6,6,109,64,234,656,25,7,44,6,232,2};
std::sort(std::execution::par_unseq, v.begin(), v.end());
std::cout << v[0] << '\n';
return 0;
}
Any help would be much appreciated.
Paul