2
$\begingroup$

I have NVIDIA GeForce GT740 Graphics card installed on my host machine with Windows 10 OS. I have to simulate a cluster environment in order to run qiskit codes in parallel fashion. Before actual Clustering, as POC I have created three ubuntu 20.04 VMs (one head and two compute nodes) on my host machine since qiskit-aer-gpu can be easily installed on Linux. I have used VMWare Workstation Pro for the purpose.

Now on my head node I have created a venv and installed qiskit-aer-gpu along with CUDA

  • python version: 3.8.10

  • qiskit-aer-gpu version: 0.11.2

  • nvcc version: Cuda compilation tools, release 10.1, V10.1.243

I am running following code as an example just to verify cuda installation on my VM but it generates error

from qiskit import *
from qiskit.circuit.library import *
from qiskit.providers.aer import *
sim = AerSimulator(method= 'statevector', device='GPU')
shots = 100
depth=10
qubits = 25
circuit = transpile(QuantumVolume(qubits, depth, seed=0), backend=sim, optimization_level=0)
circuit.measure_all()
result = execute(circuit,sim,shots=shots,seed_simulator=12345).result()

Error is

Simulation failed and returned the following error message:
ERROR: Failed to load qobj: No CUDA device available!

Ubuntu VM sees host GPU like sudo lshw -C display

-display                 
   description: VGA compatible controller
   product: SVGA II Adapter
   vendor: VMware
   physical id: f
   bus info: pci@0000:00:0f.0
   version: 00
   width: 32 bits
   clock: 33MHz
   capabilities: vga_controller bus_master cap_list rom
   configuration: driver=vmwgfx latency=64
   resources: irq:16 ioport:1070(size=16) 
   memory:e8000000-efffffff memory:fe000000-fe7fffff 
   memory:c0000-dffff

I have seen some article in which VM doesnot have direct access to host GPU 1 and 2. Am I getting this no device error due to this reason?

Any help will be appreciated.

$\endgroup$

2 Answers 2

2
$\begingroup$

This might be an issue beyond qiskit-aer-gpu. To confirm or discard that, my to-go tool is PyTorch. Install pip install torch and run in a console:

from torch.cuda import is_available
is_available()

If True, submit an issue to https://github.com/Qiskit/qiskit-aer because it is, indeed, an Aer issue. If False, the problem is related to your environment and StackOverflow is probably a good place to ask.

$\endgroup$
1
$\begingroup$

i am not sure , but dont you have to install cuQuantum first ? note:i cant comment due to my reputation number

$\endgroup$
1
  • $\begingroup$ Do i really have to? As cuQuantum is separate library from Nvidia and nothing to do with qiskit-aer-gpu. I have followed requirements from its github page $\endgroup$
    – aneela
    May 15, 2023 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.