Skip to content

Commit 9be9f3e

Browse files
committed
Add --oversubscribe to mpiexec command line if OpenMPI is used
1 parent d89957d commit 9be9f3e

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

darshan-runtime/configure.ac

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,11 @@ if test "x$enable_darshan_runtime" = xyes ; then
690690
#error OPENMPI FOUND
691691
#endif
692692
])],
693-
[],
694-
[AC_DEFINE(HAVE_OPEN_MPI, 1, Define if OpenMPI is being used)])
693+
[is_ompi=0], [is_ompi=1])
694+
695+
if test "x$is_ompi" = x1 ; then
696+
AC_DEFINE(HAVE_OPEN_MPI, 1, [Define if OpenMPI is being used])
697+
fi
695698

696699
# determine if the MPI library includes MPI-IO functions or not
697700
AC_MSG_CHECKING(for MPI-IO support in MPI)
@@ -883,6 +886,7 @@ else
883886
with_log_path=
884887
with_jobid_env=
885888
have_mpi_io_large_count_apis=no
889+
is_ompi=0
886890
fi
887891

888892
AC_SUBST(ENABLE_LD_PRELOAD, ["$enable_ld_preload"])
@@ -918,6 +922,7 @@ AC_SUBST(HDF5_PATH, ["$with_hdf5"])
918922
AC_SUBST(PNETCDF_PATH, ["$with_pnetcdf"])
919923
AC_SUBST(DAOS_PATH, ["$with_daos"])
920924
AC_SUBST(LDMS_PATH, ["$LDMS_HOME"])
925+
AC_SUBST(HAVE_OPEN_MPI, ["$is_ompi"])
921926

922927
AM_CONDITIONAL(ENABLE_MMAP_LOGS, [test "x$enable_mmap_logs" = xyes])
923928
AM_CONDITIONAL(ENABLE_LDPRELOAD, [test "x$enable_ld_preload" = xyes])

darshan-runtime/test/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ AM_TESTS_ENVIRONMENT += export TST_DARSHAN_LOG_PATH="$(__DARSHAN_LOG_PATH)";
1717
AM_TESTS_ENVIRONMENT += export DARSHAN_INSTALL_DIR="$(prefix)";
1818
AM_TESTS_ENVIRONMENT += export USERNAME_ENV="$(USERNAME_ENV)";
1919
AM_TESTS_ENVIRONMENT += export HAVE_MPI_LARGE_COUNT="$(HAVE_MPI_LARGE_COUNT)";
20+
AM_TESTS_ENVIRONMENT += export HAVE_OPEN_MPI="$(HAVE_OPEN_MPI)";
2021
AM_TESTS_ENVIRONMENT += export check_PROGRAMS="$(check_PROGRAMS)";
2122

2223
TESTS = tst_runs.sh

darshan-runtime/test/tst_runs.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ echo "DARSHAN_CONFIG=$DARSHAN_CONFIG"
3434

3535
$DARSHAN_CONFIG --all
3636

37-
# run NP number of MPI processes
38-
# Note when using OpenMPI, setting NP > 2 will fail.
37+
# run NP number of MPI processes, default 2
3938
if test "x$NP" = x ; then
4039
NP=2
4140
fi
4241

42+
if test "x$HAVE_OPEN_MPI" = x1 ; then
43+
TESTMPIRUN="$TESTMPIRUN --oversubscribe"
44+
fi
45+
4346
TEST_FILE=./testfile.dat
4447

4548
# tst_mpi_io.c takes the following command-line options.

0 commit comments

Comments
 (0)