Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7aa0a00
Merge branch 'master' into mpi_testing
nicolossus Dec 1, 2023
f766cb3
WIP: MPI testing framework
nicolossus Dec 1, 2023
413a6ce
First working version of mpi test decorator
heplesser Dec 2, 2023
3691d35
Merge branch 'master' of github.com:nest/nest-simulator into nic_mtest
heplesser Feb 9, 2024
a314bcb
Remove no longer pertinent file from development
heplesser Feb 9, 2024
75fd473
Tidy up mpi_wrapper for tests
heplesser Feb 9, 2024
cc91a33
Remove non-working approach
heplesser Feb 9, 2024
d2121d2
Move files for python-based mpi tests to proper place
heplesser Feb 9, 2024
5b11879
Remove unused imports
heplesser Feb 9, 2024
150af4e
Add decorator to requirements for testing
heplesser Feb 9, 2024
45c4594
Fix running of sli2py mpitests
heplesser Feb 9, 2024
bcd6055
Add debugging support to MPI test
heplesser Feb 10, 2024
5ab0f45
Fix debug mode for Py < 3.12
heplesser Feb 10, 2024
ea17b48
Improve MPI test setup further
heplesser Feb 11, 2024
25ce2a6
Rename test file and minor touch-ups
heplesser Feb 11, 2024
0c7f807
Generalize MPI test setup further and add two more tests
heplesser Feb 11, 2024
4092e64
Fix flake8 errors
heplesser Feb 11, 2024
2369d96
Apply suggestions from code review fixing small sloppy errors
heplesser Feb 15, 2024
2c42660
Merge branch 'master' of github.com:nest/nest-simulator into nic_mtest
heplesser Feb 28, 2024
bb529d6
Remove dependency on external decorator package, use functools.wrap i…
heplesser Feb 28, 2024
72dc9a6
Improve comments
heplesser Feb 28, 2024
3d67a2b
Filtering of decorators and imports based on AST now
heplesser Feb 28, 2024
b451861
Parametrize test over number of nodes to demonstrate that it is possi…
heplesser Feb 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions testsuite/do_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ ls -la "${TEST_BASEDIR}"

NEST="nest_serial"
HAVE_MPI="$(sli -c 'statusdict/have_mpi :: =only')"
HAVE_OPENMP="$(sli -c 'is_threaded =only')"

if test "${HAVE_MPI}" = "true"; then
MPI_LAUNCHER="$(sli -c 'statusdict/mpiexec :: =only')"
Expand Down Expand Up @@ -503,17 +504,28 @@ if test "${PYTHON}"; then
PYNEST_TEST_DIR="${TEST_BASEDIR}/pytests"
XUNIT_NAME="07_pynesttests"

# Run all tests except those in the mpi* subdirectories because they cannot be run concurrently
# Run all tests except those in the mpi* and sli2py_mpi subdirectories because they cannot be run concurrently
XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}.xml"
env
set +e
"${PYTHON}" -m pytest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" --numprocesses=1 \
--ignore="${PYNEST_TEST_DIR}/mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
--ignore="${PYNEST_TEST_DIR}/mpi" --ignore="${PYNEST_TEST_DIR}/sli2py_mpi" "${PYNEST_TEST_DIR}" 2>&1 | tee -a "${TEST_LOGFILE}"
set -e

# Run tests in the mpi* subdirectories, grouped by number of processes
# Run tests in the sli2py_mpi subdirectory. The must be run without loading conftest.py.
if test "${HAVE_MPI}" = "true" && test "${HAVE_OPENMP}" = "true" ; then
XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_sli2py_mpi.xml"
env
set +e
"${PYTHON}" -m pytest --noconftest --verbose --timeout $TIME_LIMIT --junit-xml="${XUNIT_FILE}" --numprocesses=1 \
"${PYNEST_TEST_DIR}/sli2py_mpi" 2>&1 | tee -a "${TEST_LOGFILE}"
set -e
fi

# Run tests in the mpi/* subdirectories, with one subdirectory per number of processes to use
if test "${HAVE_MPI}" = "true"; then
if test "${MPI_LAUNCHER}"; then
# Loop over subdirectories whose names are the number of mpi procs to use
for numproc in $(cd ${PYNEST_TEST_DIR}/mpi/; ls -d */ | tr -d '/'); do
XUNIT_FILE="${REPORTDIR}/${XUNIT_NAME}_mpi_${numproc}.xml"
PYTEST_ARGS="--verbose --timeout $TIME_LIMIT --junit-xml=${XUNIT_FILE} ${PYNEST_TEST_DIR}/mpi/${numproc}"
Expand Down
51 changes: 0 additions & 51 deletions testsuite/mpitests/issue-1957.sli

This file was deleted.

50 changes: 0 additions & 50 deletions testsuite/mpitests/test_all_to_all.sli

This file was deleted.

195 changes: 0 additions & 195 deletions testsuite/mpitests/test_mini_brunel_ps.sli

This file was deleted.

5 changes: 5 additions & 0 deletions testsuite/pytests/sli2py_mpi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# MPI tests

Test in this directory run NEST with different numbers of MPI ranks and compare results.

See documentation in mpi_test_wrappe.py for details.
Loading