Compiling and Executing OpenACC on TESLA and GEFORCE

Hope you are doing well.
Can you kindly help me understand why my Fortran OpenACC code could not detect a Tesla K40c GPU and a Geforce GTX Titan X at the same time? (They are both on the same desktop/pc - running windows 10)
I understand that the flags to run OpenACC code on both is -ta=tesla:cc35 and -ta=tesla:cc50 respectively. However, I had the Titan X working well with my code and cc50, but when I run with cc35, the K40c is not even visible when I try to search for it with openacc functions.
Is it possible that I cannot run a single code that can make use of both GPUs (or even making use of Multi-GPU) depending on user choice? I would like to let the person who executes to choose between them.
I had a workaround, that is hefty. I downloaded these two drivers by NVIDIA:

  1. 416.16-desktop-win10-64bit-international-whql (for the Titan X)
  2. 398.75-tesla-desktop-win10-64bit-international (for the K40c)
    When I install one of them, I am able to run my OpenACC code with the respective GPU.
    Could you kindly inform me of the problem here?
    Thank you for your time

Hi Ahmad,

This sound more like a CUDA driver issue. Since the Titan X is a gaming card, it will be using the WDDM driver while the K40c would use the TCC driver. Granted, this is out of my area of expertise, but I don’t think you can mix the two types of CUDA device drivers on the same system.

If they were both the same type of cards (Tesla vs GeoForce) or you were using Linux (which only uses TCC), then you can mix the compute capability by using “-ta=tesla:cc35,cc50” when compiling the application.