No device found for cuda version 10.1

Hi,

I compile and link my code with the PGI community version 19.4. I wrote a simple code to get the number of devices. Now, if I use cuda version 10.0 (-ta=tesla:“cuda10.0”) and link against the corresponding libraries in linux86-64-llvm/2019/cuda/10.0/lib64 everything works fine. But if I use cuda version 10.1 it does no longer work for direct cuda calls like “cudaGetDeviceCount”, no devices are recognized. On the other hand, if I use the open acc command “acc_get_num_devices” it still works fine. Is there maybe something wrong with our server setup, we have the following driver:
NVIDIA-SMI 410.73 Driver Version: 410.73 CUDA Version: 10.0

Many thanks,
Regards,
Reto

Reto,

Is this with C or Fortran? And are you getting a linking error or a compile-time error with finding the right symbols? If you have an example of what fails and the line you used to compile it?

Hi,

it is with C. It is neither a compile error nor a linking error. Compiling and linking works fine. It is rather a runtime issue. In my example code I try to get the number of available devices using the openACC call “acc_get_num_devices” and the cuda call “cudaGetDeviceCount”. For the openACC call I get the correct number of devices regardless of the cuda version I use to compile and link (10.0 and 10.1 both work fine). However, for the cuda call I get the correct number of devices if I use cuda version 10.0 but no devices are found if I use cuda version 10.1.

Thanks,
Reto

Hi Reto,

I’m thinking that you need to update your CUDA Driver. Looks like your using a CUDA 10.0 driver which may have issues running a CUDA 10.1 built binary. Typically drivers are backwards compatible but not forward compatible.

-Mat

Hi Mat,

the driver has been updated and now it works.
Thanks.

Reto

What version of the nvidia driver are you using with the CUDA 10.1?

I’m not sure what Reto is using, but I have 418.67. Though, it probably doesn’t matter what the specific driver version is, so long as when targeting CUDA 10.1 during compilation, the driver must also support 10.1.

-Mat