Skip to content

Commit b451861

Browse files
committed
Parametrize test over number of nodes to demonstrate that it is possible.
1 parent 3d67a2b commit b451861

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

testsuite/pytests/sli2py_mpi/test_all_to_all.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,16 @@
1919
# You should have received a copy of the GNU General Public License
2020
# along with NEST. If not, see <http://www.gnu.org/licenses/>.
2121

22-
22+
import numpy as np
23+
import pandas
24+
import pytest
2325
from mpi_test_wrapper import MPITestAssertEqual
2426

2527

28+
# Parametrization over the number of nodes here only so show hat it works
29+
@pytest.mark.parametrize("N", [4, 7])
2630
@MPITestAssertEqual([1, 4], debug=False)
27-
def test_all_to_all():
31+
def test_all_to_all(N):
2832
"""
2933
Confirm that all-to-all connections created correctly for more targets than local nodes.
3034
"""
@@ -34,7 +38,7 @@ def test_all_to_all():
3438

3539
nest.ResetKernel()
3640

37-
nrns = nest.Create("parrot_neuron", n=4)
41+
nrns = nest.Create("parrot_neuron", n=N)
3842
nest.Connect(nrns, nrns, "all_to_all")
3943

4044
conns = nest.GetConnections().get(output="pandas").drop(labels=["target_thread", "port"], axis=1)

0 commit comments

Comments
 (0)