@@ -145,6 +145,7 @@ ls -la "${TEST_BASEDIR}"
145145
146146NEST=" nest_serial"
147147HAVE_MPI=" $( sli -c ' statusdict/have_mpi :: =only' ) "
148+ HAVE_OPENMP=" $( sli -c ' is_threaded =only' ) "
148149
149150if test " ${HAVE_MPI} " = " true" ; then
150151 MPI_LAUNCHER=" $( sli -c ' statusdict/mpiexec :: =only' ) "
@@ -503,17 +504,28 @@ if test "${PYTHON}"; then
503504 PYNEST_TEST_DIR=" ${TEST_BASEDIR} /pytests"
504505 XUNIT_NAME=" 07_pynesttests"
505506
506- # Run all tests except those in the mpi* subdirectories because they cannot be run concurrently
507+ # Run all tests except those in the mpi* and sli2py_mpi subdirectories because they cannot be run concurrently
507508 XUNIT_FILE=" ${REPORTDIR} /${XUNIT_NAME} .xml"
508509 env
509510 set +e
510511 " ${PYTHON} " -m pytest --verbose --timeout $TIME_LIMIT --junit-xml=" ${XUNIT_FILE} " --numprocesses=1 \
511- --ignore=" ${PYNEST_TEST_DIR} /mpi" " ${PYNEST_TEST_DIR} " 2>&1 | tee -a " ${TEST_LOGFILE} "
512+ --ignore=" ${PYNEST_TEST_DIR} /mpi" --ignore= " ${PYNEST_TEST_DIR} /sli2py_mpi " " ${PYNEST_TEST_DIR} " 2>&1 | tee -a " ${TEST_LOGFILE} "
512513 set -e
513514
514- # Run tests in the mpi* subdirectories, grouped by number of processes
515+ # Run tests in the sli2py_mpi subdirectory. The must be run without loading conftest.py.
516+ if test " ${HAVE_MPI} " = " true" && test " ${HAVE_OPENMP} " = " true" ; then
517+ XUNIT_FILE=" ${REPORTDIR} /${XUNIT_NAME} _sli2py_mpi.xml"
518+ env
519+ set +e
520+ " ${PYTHON} " -m pytest --noconftest --verbose --timeout $TIME_LIMIT --junit-xml=" ${XUNIT_FILE} " --numprocesses=1 \
521+ " ${PYNEST_TEST_DIR} /sli2py_mpi" 2>&1 | tee -a " ${TEST_LOGFILE} "
522+ set -e
523+ fi
524+
525+ # Run tests in the mpi/* subdirectories, with one subdirectory per number of processes to use
515526 if test " ${HAVE_MPI} " = " true" ; then
516527 if test " ${MPI_LAUNCHER} " ; then
528+ # Loop over subdirectories whose names are the number of mpi procs to use
517529 for numproc in $( cd ${PYNEST_TEST_DIR} /mpi/; ls -d * / | tr -d ' /' ) ; do
518530 XUNIT_FILE=" ${REPORTDIR} /${XUNIT_NAME} _mpi_${numproc} .xml"
519531 PYTEST_ARGS=" --verbose --timeout $TIME_LIMIT --junit-xml=${XUNIT_FILE} ${PYNEST_TEST_DIR} /mpi/${numproc} "
0 commit comments