Skip to content

Commit 3e9659e

Browse files
committed
Skipping test if number of procs is not square for now
1 parent 7b76f96 commit 3e9659e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_matrixmult.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@
3030
@pytest.mark.mpi(min_size=1) # SUMMA should also work for 1 process.
3131
@pytest.mark.parametrize("M, K, N, dtype_str", test_params)
3232
def test_SUMMAMatrixMult(N, K, M, dtype_str):
33+
p_prime = math.isqrt(size)
34+
C = p_prime
35+
if p_prime * C != size:
36+
pytest.skip(f"Number of processes must be a square number, provided {size} instead...")
37+
3338
dtype = np.dtype(dtype_str)
3439

3540
cmplx = 1j if np.issubdtype(dtype, np.complexfloating) else 0
3641
base_float_dtype = np.float32 if dtype == np.complex64 else np.float64
3742

38-
p_prime = math.isqrt(size)
39-
C = p_prime
40-
assert p_prime * C == size, f"Number of processes must be a square number, provided {size} instead..."
41-
4243
my_group = rank % p_prime
4344
my_layer = rank // p_prime
4445

0 commit comments

Comments
 (0)