Skip to content

Commit f703199

Browse files
fixup
1 parent 3fe43a6 commit f703199

File tree

2 files changed

+17
-20
lines changed

2 files changed

+17
-20
lines changed

.github/workflows/CI.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -135,25 +135,18 @@ jobs:
135135
- name: Run tests
136136
run: |
137137
export PYTHONPATH="$PWD/build"
138-
export GCOV_PREFIX_STRIP=2
139-
COVDIR=/tmp/gcov-mpi
140-
mkdir -p $COVDIR
141-
142-
# Wrap mpirun calls so each rank writes to its own subdir
143-
run_mpi_pytest() {
144-
local np=$1
145-
shift
146-
mpirun -np $np ${{ matrix.MPIEXEC_PREFLAGS }} \
147-
bash -c 'export GCOV_PREFIX='"$COVDIR"'/${OMPI_COMM_WORLD_RANK}; \
148-
mkdir -p $GCOV_PREFIX; \
149-
python3 -m pytest "$@"' bash "$@"
150-
}
151-
152-
run_mpi_pytest 1 tests --ignore=tests/test_hmatrix.py --ignore=tests/test_logger.py
153-
run_mpi_pytest 2 tests --ignore=tests/test_hmatrix.py --ignore=tests/test_logger.py
154-
run_mpi_pytest 3 tests --ignore=tests/test_hmatrix.py --ignore=tests/test_logger.py
155-
run_mpi_pytest 4 tests --ignore=tests/test_hmatrix.py --ignore=tests/test_logger.py
156-
138+
mpirun -np 1 python3 -m pytest tests/test_cluster
139+
mpirun -np 2 python3 -m pytest tests/test_cluster
140+
mpirun -np 3 python3 -m pytest tests/test_cluster
141+
mpirun -np 4 python3 -m pytest tests/test_cluster
142+
mpirun -np 1 python3 -m pytest tests/test_distributed_operator
143+
mpirun -np 2 python3 -m pytest tests/test_distributed_operator
144+
mpirun -np 3 python3 -m pytest tests/test_distributed_operator
145+
mpirun -np 4 python3 -m pytest tests/test_distributed_operator
146+
mpirun -np 1 python3 -m pytest tests/test_ddm_solver
147+
mpirun -np 2 python3 -m pytest tests/test_ddm_solver
148+
mpirun -np 3 python3 -m pytest tests/test_ddm_solver
149+
mpirun -np 4 python3 -m pytest tests/test_ddm_solver
157150
python3 -m pytest tests/test_hmatrix.py
158151
python3 -m pytest tests/test_logger.py
159152
@@ -179,7 +172,6 @@ jobs:
179172
--capture \
180173
--base-directory ./ \
181174
--directory build \
182-
--directory $COVDIR \
183175
--output-file coverage.info
184176
185177
# Exclude third-party and system paths

tests/test_distributed_operator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ def test_distributed_operator(
9696
Y_2 = generator.mat_mat(X)
9797
assert np.linalg.norm(Y_1 - Y_2) / np.linalg.norm(Y_2) < epsilon
9898

99+
X = np.asfortranarray(np.random.rand(nb_cols, 1))
100+
Y_1 = distributed_operator @ X
101+
Y_2 = generator.mat_mat(X)
102+
assert np.linalg.norm(Y_1 - Y_2) / np.linalg.norm(Y_2) < epsilon
103+
99104
# Test sub matrix vector product
100105
test_offset = int(nb_cols / 10)
101106
test_size = int(nb_cols / 10)

0 commit comments

Comments
 (0)