From d9d517cb50759fa6d618599181744ee2b16c2bda Mon Sep 17 00:00:00 2001 From: "Stefan K. Seritan" Date: Wed, 22 Jan 2025 09:39:47 -0800 Subject: [PATCH] Fix Mac tests (need oversubscribe for MPI). --- pygsti/extras/interpygate/core.py | 2 +- test/unit/mpi/test_mpi.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pygsti/extras/interpygate/core.py b/pygsti/extras/interpygate/core.py index 0682afbdc..5f25ab20e 100644 --- a/pygsti/extras/interpygate/core.py +++ b/pygsti/extras/interpygate/core.py @@ -655,7 +655,7 @@ def __call__(self, v): value = _np.zeros(self.qty_shape, dtype='d') for i, interpolator in enumerate(self.interpolators.flat): - value.flat[i] = interpolator(*v)[0] + value.flat[i] = interpolator(*v) return value def write(self, filename): diff --git a/test/unit/mpi/test_mpi.py b/test/unit/mpi/test_mpi.py index e4e285148..94794fb98 100644 --- a/test/unit/mpi/test_mpi.py +++ b/test/unit/mpi/test_mpi.py @@ -15,7 +15,8 @@ class MPITester: def test_all(self, capfd: pytest.LogCaptureFixture): current_filepath = Path(os.path.abspath(__file__)) to_run = current_filepath.parents[0] / Path('run_me_with_mpiexec.py') - subprocess_args = (f"mpiexec -np 4 python -W ignore {str(to_run)}").split(' ') + # Oversubscribe is needed because latest Mac runners have only 3 cores + subprocess_args = (f"mpiexec -np 4 -oversubscribe python -W ignore {str(to_run)}").split(' ') result = subprocess.run(subprocess_args, capture_output=False, text=True) out, err = capfd.readouterr()