From 03e9a67224d70fcbdba583509035ad3f88a17297 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Sat, 25 Jan 2025 17:00:45 -0500 Subject: [PATCH] Reduce parallelism for qpy tests 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 --- test/qpy_compat/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/qpy_compat/run_tests.sh b/test/qpy_compat/run_tests.sh index a6ff67b14a94..f1c770809c77 100755 --- a/test/qpy_compat/run_tests.sh +++ b/test/qpy_compat/run_tests.sh @@ -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__)')"