Closed intelligi123 closed 6 months ago
pip install qiskit-aer-gpu
does not support MPI parallelization, but Aer should be built from source to add support for MPI parallel execution.
Thank you, Is there any link to guide for its build with all per-requisites?
Thank you, I started that but I am getting Error at the very last step while building
Command I am running:
python3 ./setup.py bdist_wheel -- -DAER_THRUST_BACKEND=CUDA -DAER_MPI=True
Error is:
/home/dell/.local/lib/python3.11/site-packages/pybind11/include/pybind11/detail/../cast.h: In function ‘typename pybind11::detail::type_caster<typename pybind11::detail::intrinsic_type<T>::type>::cast_op_type<T> pybind11::detail::cast_op(make_caster<T>&)’:
/home/dell/.local/lib/python3.11/site-packages/pybind11/include/pybind11/detail/../cast.h:45:120: error: expected template-name before ‘<’ token
45 | return caster.operator typename make_caster<T>::template cast_op_type<T>();
| ^
/home/dell/.local/lib/python3.11/site-packages/pybind11/include/pybind11/detail/../cast.h:45:120: error: expected identifier before ‘<’ token
/home/dell/.local/lib/python3.11/site-packages/pybind11/include/pybind11/detail/../cast.h:45:123: error: expected primary-expression before ‘>’ token
45 | return caster.operator typename make_caster<T>::template cast_op_type<T>();
| ^
/home/dell/.local/lib/python3.11/site-packages/pybind11/include/pybind11/detail/../cast.h:45:126: error: expected primary-expression before ‘)’ token
45 | return caster.operator typename make_caster<T>::template cast_op_type<T>();
| ^
gmake[2]: *** [qiskit_aer/backends/wrappers/CMakeFiles/controller_wrappers.dir/build.make:77: qiskit_aer/backends/wrappers/CMakeFiles/controller_wrappers.dir/bindings.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:854: qiskit_aer/backends/wrappers/CMakeFiles/controller_wrappers.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
Traceback (most recent call last):
File "/home/dell/.local/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 674, in setup
cmkr.make(make_args, install_target=cmake_install_target, env=env)
File "/home/dell/.local/lib/python3.11/site-packages/skbuild/cmaker.py", line 697, in make
self.make_impl(clargs=clargs, config=config, source_dir=source_dir, install_target=install_target, env=env)
File "/home/dell/.local/lib/python3.11/site-packages/skbuild/cmaker.py", line 742, in make_impl
raise SKBuildError(msg)
An error occurred while building with CMake.
Command:
/home/dell/.local/lib/python3.11/site-packages/cmake/data/bin/cmake --build . --target install --config Release --
Install target:
install
Source directory:
/home/dell/qiskit-aer-main
Working directory:
/home/dell/qiskit-aer-main/_skbuild/linux-x86_64-3.11/cmake-build
Please check the install target is valid and see CMake's output for more information.
Should I need to install any particular version of pybind11?
Yes pybind11 is required to be installed on the system
Informations
What is the current behavior?
I have installed qiskit-aer-gpu and MPI4PY using pip3 in order to run qiskit code on multiple nodes. My code is currently running on two nodes but independently. Below is the code I am running:
And the command is:
mpirun -np 3 -machinefile machinefile.txt python3 demo.py
I am getting following output as result:
All processes have rank=0 and num_mpi_processes=1. My goal is to share GPU resources of two nodes in order to run computation.
Steps to reproduce the problem
Installation of MPI4PY and qiskit-aer-gpu
What is the expected behavior?
My expectation is that output should show num_mpi_processes=3 (for this particular command) and mpi_rank should be assigned according to process number and computation share the resources (CPU+GPU) of both nodes.
Suggested solutions
I cannot suggest any solution but I am concerned about installation of qiskit-aer-gpu? Is it come with support for MPI and GPU itself when installed it with pip3 or I have to build it separately with particular flags as mentioned in CONTIBUTING.md installation instructions