Skip to content

Commit

Permalink
Fix yml format
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentmr committed Oct 26, 2023
1 parent 933dbcf commit 60f7f71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests_linux_x86_mpi_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ jobs:
run: |
source /etc/profile.d/modules.sh && module use /opt/modules/ && module load ${{ matrix.mpilib }}
cat > runscript<<EOF
python -m pytest ./mpitests \
--cov=pennylane_lightning --no-flaky-report -p no:warnings --tb=native --cov-report=term-missing \
--cov-report=xml:./coverage-${{ github.job }}-lightning_gpu_${{ matrix.mpilib }}-\$OMPI_COMM_WORLD_RANK.xml
EOF
python -m pytest ./mpitests \
--cov=pennylane_lightning --no-flaky-report -p no:warnings --tb=native --cov-report=term-missing \
--cov-report=xml:./coverage-${{ github.job }}-lightning_gpu_${{ matrix.mpilib }}-\$OMPI_COMM_WORLD_RANK.xml
EOF
cat runscript
PL_DEVICE=lightning.gpu /opt/mpi/${{ matrix.mpilib }}/bin/mpirun -np 2 runscript
# mv coverage_lgpu_mpi.xml coverage-${{ github.job }}-lightning_gpu_${{ matrix.mpilib }}-main.xml
Expand Down
3 changes: 2 additions & 1 deletion mpitests/test_adjoint_jacobian.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,12 +1212,13 @@ def circuit_compare(params, excitations):

# np.random.seed(1337)
# params = 1.0e-3 * np.random.rand(len(doubles))
# comm = MPI.COMM_WORLD
comm = MPI.COMM_WORLD
# params = comm.bcast(params, root=0)
params = qml.numpy.array([0.0] * len(doubles), requires_grad=True)

jacs = jac_func(params, excitations=doubles)
jacs_comp = jac_func_comp(params, excitations=doubles)
comm.Barrier()

assert np.allclose(jacs, jacs_comp)

Expand Down

0 comments on commit 60f7f71

Please sign in to comment.