diff --git a/docs/sphinx/examples/solvers/python/gqe_h2.py b/docs/sphinx/examples/solvers/python/gqe_h2_mpi.py similarity index 100% rename from docs/sphinx/examples/solvers/python/gqe_h2.py rename to docs/sphinx/examples/solvers/python/gqe_h2_mpi.py diff --git a/scripts/ci/test_examples.sh b/scripts/ci/test_examples.sh index 84ac1462..f9886f65 100755 --- a/scripts/ci/test_examples.sh +++ b/scripts/ci/test_examples.sh @@ -81,6 +81,17 @@ if [[ "$LIB" == "solvers" || "$LIB" == "all" ]]; then for file in examples/solvers/python/*.py; do run_python_test "$file" done + + # Test python examples with MPI option + for file in examples/solvers/python/*.py; do + if echo "$file" | grep -qi "mpi"; then + echo "Running MPI example: $file" + # Run MPI using CUDAQ MPI + python3 "$file" --mpi + # Repeat using MPI Python API + PMIX_MCA_gds=hash mpiexec -np 1 --allow-run-as-root python3 $file --mpi + fi + done for file in examples/solvers/cpp/*.cpp; do run_cpp_test "$file" "-lcudaq-solvers"