Skip to content

Commit

Permalink
Reduce parallelism for qpy tests (#13735)
Browse files Browse the repository at this point in the history
In #13506 the QPY backwards compatibility tests are failing because the
image is running out of disk space and github actions is killing the
runner. The qpy files themselves should be fairly small and will be
dwarfed by the virtual environments created to install old versions of
qiskit to generate old QPY payloads. We use GNU parallel to speed up the
testing, however by doing this we end up having multiple venvs at once
which increases the disk space usage. This commit attempts to reduce the
pressure on the disk space usage by decreasing the parallelism from N
cpus (which is currently 4 for linux runners according to [1]) to 2.
This will increase the runtime for this job but if we have insufficient
disk space on the image to generate new qpy files there isn't really
a choice.

[1] https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

(cherry picked from commit b718f06)
  • Loading branch information
mtreinish authored and mergify[bot] committed Jan 27, 2025
1 parent bc89695 commit 11c4480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/qpy_compat/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ python -m venv "$qiskit_venv"
"$qiskit_venv/bin/pip" install -c "$repo_root/constraints.txt" "$qiskit_dev_wheel" packaging

# Run all of the tests of cross-Qiskit-version compatibility.
"$qiskit_python" "$our_dir/get_versions.py" | parallel --colsep=" " bash "$our_dir/process_version.sh" -p "$qiskit_python"
"$qiskit_python" "$our_dir/get_versions.py" | parallel -j 2 --colsep=" " bash "$our_dir/process_version.sh" -p "$qiskit_python"

# Test dev compatibility with itself.
dev_version="$("$qiskit_python" -c 'import qiskit; print(qiskit.__version__)')"
Expand Down

0 comments on commit 11c4480

Please sign in to comment.