Hello!
I have a problem with running the testing the library of lightning.gpu. I need to compile it and run the test to further use it in a QML model. I followed the instructions on Lightning-GPU installation — Lightning 0.42.0-dev29 documentation and was reading another post that was made in January 9, that suggested to install manually also the library of pennylane.
The main issue i am facing is that after installing everything it wont run the tests, I am getting the following error
$ mpirun -np 2 python -m pytest mpitests --tb=shorthort
================== test session starts =============
platform linux -- Python 3.10.18, pytest-8.4.0, pluggy-1.6.0
================== test session starts =============
platform linux -- Python 3.10.18, pytest-8.4.0, pluggy-1.6.0
rootdir: /home/jlopez126/qmlp-malware/pennylane-lightning
configfile: pyproject.toml
plugins: flaky-3.8.1, xdist-3.7.0, mock-3.14.1, cov-6.1.1
collecting ... rootdir: /home/jlopez126/qmlp-malware/pennylane-lightning
configfile: pyproject.toml
plugins: flaky-3.8.1, xdist-3.7.0, mock-3.14.1, cov-6.1.1
collected 3551 items
collected 3551 items
--------------------------------------------------------------------------
prterun detected that one or more processes exited with non-zero status, thus
causing the job to be terminated. The first process to do so was:
Process name: [prterun-IQSeC-3258155@1,1]
Exit code: 14
--------------------------------------------------------------------------
This is a update, I went back and try it in a clean enviroment in python 3.10. Currently i am using Miniconda to manage my enviroments in the server. I followed the following guide Trouble installing lightning-gpu with mpi support under Python3.10 - #11 by CatalinaAlbornoz
So i ran the following for the pennylane gpu:
RUN git clone https://github.com/PennyLaneAI/pennylane-lightning.git && \
cd pennylane-lightning && \
pip install -r requirements.txt --upgrade && \
python -m pip install . && \
PL_BACKEND="lightning_gpu" python scripts/configure_pyproject_toml.py && \
CMAKE_ARGS="-DENABLE_MPI=ON" python -m pip install . -vv
I also installed by hand pennylane and just did
# Copy first pennylane from git
cd pennylane/
pip install .
The thing is that when running the tests:

only 9 tests pass
Hi @NotSamus
I talked to someone from the team and they had the following requests and suggestions:
- Could you run a simple circuit with
"default.qubit"
and "lightning.qubit"
to validate the installation of PL and Lightning-Qubit on your machine?
- Could you install and test LGPU without MPI on your machine? Note that for both LGPU and LGPU-MPI, you need to set the
CUQUANTUM_SDK
envvar following the installation guideline.
- Could you run
make test-cpp-mpi
from ./pennylane-lightning
to check the installation of the core routines and libraries (e.g., custatevec
, mpi
, …)?
- There aren’t any Makefile commands to check LGPU-MPI python tests. You need to run the following to check these tests:
python -m pip install mpi4py
and PL_DEVICE=lightning.gpu mpirun -np 2 python -m pytest mpitests --tb=short -x
I hope this is helpful.