Hi,
I have issues with using qiskit in NVIDIA cuQuantum Appliance container on an HPC cluster.
The cluster has 2x AMD EPYC Rome 7452 32c @2.35GHz and 4x NVIDIA Ampere 40GB HBM on each GPU node.
I loaded the required modules for python, coda, apptainer and openmpi. I tried both: cuquantum-appliance_23.03 and cuquantum-appliance_24.03-x86_64 with aptainer.
I tested qiskit_ghz.py available in the /home/cuquantum/examples with “python qiskit_ghz.py” in both. It gives errors below. In cuquantum-appliance_23.03, Line 2 is “from qiskit import Aer”. In cuquantum-appliance_24.03-x86_64, Line 2 is “from qiskit-aer import Aer”. I also tried replacing qiskit with qiskit-aer and vice versa in both.
So, I am getting either
“ImportError: cannot import name ‘Aer’ from” with “from qiskit import Aer”
or
“qiskit_aer.aererror.AerError: ‘Invalid option cusvaer_enable’” with “from qiskit-aer import Aer”
errors. Shouldn’t all required packages be available in the container? What could be causing issue?
Regards,
Buket
Hi @buket.gursoy. Thank you the question.
Would you be willing to share some additional details?
-
Can you tell us which cluster you were running on, specifically the intra/inter node configurations as well as the interconnect fabric + NICs
-
Can you provide the precise commands you used to load the modules you mentioned and the run commands under the appliance container you mention.
Hopefully, this will be enough to diagnose what is going on.
Thank you very much for your reply and sorry for writing back late.
-
The cluster has Interconnect InfiniBand HDR 200G Single or Dual-rail HDR in DragonFly+ High speed internal/external networks.
-
I loaded modules: CUDA 12.2.0, Apptainer 1.2.4, Python 3.11.3 and OpenMPI 4.1.5 with NVHPC-23.7 and CUDA-12.2.0 enabled.
I pulled cuquantum-appliance_24.03-x86_64 with apptainer and “apptainer run --nv cuquantum-appliance_24.03-x86_64.sif”. Then,
(As explained here: NVIDIA cuQuantum Appliance | NVIDIA NGC)
Apptainer> cd /home/cuquantum/examples/
Apptainer> unset OMPI_MCA_plm_rsh_agent
Apptainer> export OMPI_MCA_plm_rsh_agent=
Apptainer> mpirun -np 1 --mca pml ucx -x UCX_TLS=^cma --mca coll_hcoll_enable 0 -x OMPI_MCA_coll_hcoll_enable=0 python qiskit_ghz.py
This is the error I got:
Traceback (most recent call last):
File “/home/cuquantum/examples/qiskit_ghz.py”, line 42, in
run(args.nbits, args.precision, not args.disable_cusvaer)
File “/home/cuquantum/examples/qiskit_ghz.py”, line 21, in run
simulator.set_option(‘cusvaer_enable’, use_cusvaer)
File “/home/users/u101216/.local/lib/python3.10/site-packages/qiskit_aer/backends/aer_simulator.py”, line 935, in set_option
super().set_option(key, value)
File “/home/users/u101216/.local/lib/python3.10/site-packages/qiskit_aer/backends/aerbackend.py”, line 706, in set_option
raise AerError(f"Invalid option {key}")
qiskit_aer.aererror.AerError: ‘Invalid option cusvaer_enable’
Any suggestion would be useful. Thank you in advance.
Buket