Qiskit / qiskit-aer

Aer is a high performance simulator for quantum circuits that includes noise models
https://qiskit.github.io/qiskit-aer/
Apache License 2.0
470 stars 353 forks source link

Error with cuQuantum (cuStateVec support requires memory pool on GPU device) #1645

Closed DavidCastanoUMA closed 1 year ago

DavidCastanoUMA commented 1 year ago

Informations

Hi, I have a problem with the library cuQuantum. As you can see in a previous issue (Error compiling with CUDA #1636) downloaded qiskit-aer and compiled it with Cuda and the library cuQuantum, but it doesn't work. The error message I got is:

Simulation failed and returned the following error message: ERROR: [Experiment 0] cuStateVecChunkContainer : cuStateVec support requires memory pool on GPU device. invalid argument Traceback (most recent call last): File "/mnt/home/users/scbi_quantum_uma/davidcb/pruebas/1-My_Grover/Check_My_Grover/output_gpu/temp_gpu_20.py", line 151, in My_Grover_test(n = n, simulator_method = "statevector", single_thread=False, use_gpu=use_gpu) File "/mnt/home/users/scbi_quantum_uma/davidcb/pruebas/1-My_Grover/Check_My_Grover/output_gpu/temp_gpu_20.py", line 108, in My_Grover_test counts = result.get_counts() File "/mnt/home/soft/qiskit22/programs/x86_64/0.39.1_Cuda/lib/python3.9/site-packages/qiskit/result/result.py", line 269, in get_counts exp = self._get_experiment(key) File "/mnt/home/soft/qiskit22/programs/x86_64/0.39.1_Cuda/lib/python3.9/site-packages/qiskit/result/result.py", line 397, in _get_experiment raise QiskitError(result_status, ", ", exp_status) qiskit.exceptions.QiskitError: 'ERROR: [Experiment 0] cuStateVecChunkContainer : cuStateVec support requires memory pool on GPU device. invalid argument , ERROR: cuStateVecChunkContainer : cuStateVec support requires memory pool on GPU device. invalid argument'

As you can see, qiskit find the library (if you try to use cuStateVec_enable=True and you didn't compile qiskit-aer with Cuda an cuQuantum, the error says that you don't have cuQuantum support, and that is not the case).

I don't know what is happening.

Thanks.

doichanj commented 1 year ago

Which version of CUDA tool kit do your system have? Memory pool functionality used for cuQuantum requires CUDA 11.2 or later.

DavidCastanoUMA commented 1 year ago

I installed CUDA toolkit 11.8 in my Conda environment with Conda Install command.

doichanj commented 1 year ago

I think the latest CUDA driver is also required to use memory pool APIs. I do not know the driver can be installed via conda environment

DavidCastanoUMA commented 1 year ago

You are right, I was problem of the driver. It works well with the latest drivers. Thanks.