Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial MPI 4.0 features #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ endif
${C_TARGET}:: ${OBJS}
${AR} ruv $@ ${OBJS}
${RANLIB} $@
rm -f pc_lookup.o

${FORTRAN_TARGET}:: ${FOBJS}
${AR} ruv $@ ${FOBJS}
Expand Down
115 changes: 113 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,9 @@ MPIP_INTERNAL_STACK_DEPTH
MPIP_CALLSITE_REPORT_STACK_DEPTH_MAX
ENABLE_FORTRAN_WEAK_SYMS
ENABLE_FORTRAN_XLATE
ENABLE_MPI_PARTITIONED
ENABLE_MPI_ISENDRECV
ENABLE_MPI_PERSISTENTCOLLECTIVES
ENABLE_MPI_NONBLOCKINGCOLLECTIVES
ENABLE_MPI_RMA
ENABLE_MPI_IO
Expand Down Expand Up @@ -729,7 +732,10 @@ SHELL'
ac_subst_files='FORTRAN_GETARG
HAVE_MPI_IO
HAVE_MPI_RMA
HAVE_MPI_NONBLOCKINGCOLLECTIVES'
HAVE_MPI_NONBLOCKINGCOLLECTIVES
HAVE_MPI_PERSISTENTCOLLECTIVES
HAVE_MPI_ISENDRECV
HAVE_MPI_PARTITIONED'
ac_user_opts='
enable_option_checking
with_cc
Expand All @@ -752,6 +758,9 @@ enable_api_only
enable_mpi_io
enable_mpi_rma
enable_mpi_nbc
enable_mpi_pcoll
enable_mpi_isendrecv
enable_mpi_partitioned
enable_bfd
enable_libunwind
enable_so_lookup
Expand Down Expand Up @@ -1397,6 +1406,10 @@ Optional Features:
--disable-mpi-io Disable MPI-I/O reporting.
--disable-mpi-rma Disable MPI RMA reporting.
--disable-mpi-nbc Disable MPI NONBLOCKINGCOLLECTIVES reporting.
--disable-mpi-pcoll Disable MPI PERSISTENTCOLLECTIVES reporting.
--disable-mpi-isendrecv Disable MPI ISENDRECV reporting.
--disable-mpi-partitioned
Disable MPI PARTITIONED reporting.
--disable-bfd Do not use GNU binutils libbfd for source lookup.
--disable-libunwind Do not use libunwind to generate stack traces.
--disable-so-lookup Disable functionality to attempt to find source info
Expand Down Expand Up @@ -3007,6 +3020,44 @@ if test "${enable_mpi_nbc+set}" = set; then :
fi



ENABLE_MPI_PERSISTENTCOLLECTIVES=yes
# Check whether --enable-mpi-pcoll was given.
if test "${enable_mpi_pcoll+set}" = set; then :
enableval=$enable_mpi_pcoll; if test x"$enableval" = xno ; then
ENABLE_MPI_PERSISTENTCOLLECTIVES=no
echo Profiling of MPI PERSISTENTCOLLECTIVES has been disabled.
fi

fi




ENABLE_MPI_ISENDRECV=yes
# Check whether --enable-mpi-isendrecv was given.
if test "${enable_mpi_isendrecv+set}" = set; then :
enableval=$enable_mpi_isendrecv; if test x"$enableval" = xno ; then
ENABLE_MPI_ISENDRECV=no
echo Profiling of MPI ISENDRECV has been disabled.
fi

fi



ENABLE_MPI_PARTITIONED=yes
# Check whether --enable-mpi-partitioned was given.
if test "${enable_mpi_partitioned+set}" = set; then :
enableval=$enable_mpi_partitioned; if test x"$enableval" = xno ; then
ENABLE_MPI_PARTITIONED=no
echo Profiling of MPI PARTITIONED has been disabled.
fi

fi



fi

ENABLE_BFD=yes
Expand Down Expand Up @@ -5835,6 +5886,60 @@ else
HAVE_MPI_NONBLOCKINGCOLLECTIVES=/dev/null
fi

if test "x$ENABLE_API_ONLY" = xno && test "x$ENABLE_MPI_PERSISTENTCOLLECTIVES" = xyes ; then
ac_fn_c_check_func "$LINENO" "MPI_Barrier_init" "ac_cv_func_MPI_Barrier_init"
if test "x$ac_cv_func_MPI_Barrier_init" = xyes; then :

$as_echo "#define HAVE_MPI_PERSISTENTCOLLECTIVES 1" >>confdefs.h
HAVE_MPI_PERSISTENTCOLLECTIVES=mpi.pcoll.protos.txt
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MPI PERSISTENTCOLLECTIVES symbols not found. MPI PERSISTENTCOLLECTIVES reporting deactivated." >&5
$as_echo "MPI PERSISTENTCOLLECTIVES symbols not found. MPI PERSISTENTCOLLECTIVES reporting deactivated." >&6; }
HAVE_MPI_PERSISTENTCOLLECTIVES=/dev/null
ENABLE_MPI_PERSISTENTCOLLECTIVES=no

fi

else
HAVE_MPI_PERSISTENTCOLLECTIVES=/dev/null
fi

if test "x$ENABLE_API_ONLY" = xno && test "x$ENABLE_MPI_ISENDRECV" = xyes ; then
ac_fn_c_check_func "$LINENO" "MPI_Isendrecv" "ac_cv_func_MPI_Isendrecv"
if test "x$ac_cv_func_MPI_Isendrecv" = xyes; then :

$as_echo "#define HAVE_MPI_ISENDRECV 1" >>confdefs.h
HAVE_MPI_ISENDRECV=mpi.isendrecv.protos.txt
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MPI ISENDRECV symbols not found. MPI ISENDRECV reporting deactivated." >&5
$as_echo "MPI ISENDRECV symbols not found. MPI ISENDRECV reporting deactivated." >&6; }
HAVE_MPI_ISENDRECV=/dev/null
ENABLE_MPI_ISENDRECV=no

fi

else
HAVE_MPI_ISENDRECV=/dev/null
fi

if test "x$ENABLE_API_ONLY" = xno && test "x$ENABLE_MPI_PARTITIONED" = xyes ; then
ac_fn_c_check_func "$LINENO" "MPI_Psend_init" "ac_cv_func_MPI_Psend_init"
if test "x$ac_cv_func_MPI_Psend_init" = xyes; then :

$as_echo "#define HAVE_MPI_PARTITIONED 1" >>confdefs.h
HAVE_MPI_PARTITIONED=mpi.partitioned.protos.txt
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MPI PARTITIONED symbols not found. MPI PARTITIONED reporting deactivated." >&5
$as_echo "MPI PARTITIONED symbols not found. MPI PARTITIONED reporting deactivated." >&6; }
HAVE_MPI_PARTITIONED=/dev/null
ENABLE_MPI_PARTITIONED=no

fi

else
HAVE_MPI_PARTITIONED=/dev/null
fi

if test "x$DISABLE_SO_LOOKUP" = "xno" && test "x$ENABLE_BFD" = xyes; then
SO_LOOKUP=no
# Check for /proc/self/maps, can't use AC_CHECK_FILES since cross compiling
Expand Down Expand Up @@ -6216,7 +6321,7 @@ $as_echo "Failed to compile fortran test object. Example error follows:" >&6; }
$as_echo "$as_me: $F77_OBJ_OUT" >&6;}
as_fn_error $? "giving up" "$LINENO" 5
fi
echo "main(){ FF(); return 0; }" > flink.c
echo "extern void FF(); int main(){ FF(); return 0; }" > flink.c
if $CC -o flink -DFF=f_fun flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: same as C" >&5
$as_echo "same as C" >&6; }
Expand Down Expand Up @@ -6352,6 +6457,9 @@ ENABLE_BFD=$ENABLE_BFD






if test "x${slibdir}" = x ; then
slibdir=$libdir
fi
Expand Down Expand Up @@ -7619,4 +7727,7 @@ echo
echo " MPI-I/O support : ${ENABLE_MPI_IO}"
echo " MPI-RMA support : ${ENABLE_MPI_RMA}"
echo " MPI-NBC support : ${ENABLE_MPI_NONBLOCKINGCOLLECTIVES}"
echo " MPI-PC support : ${ENABLE_MPI_PERSISTENTCOLLECTIVES}"
echo " MPI-Isendrecv support : ${ENABLE_MPI_ISENDRECV}"
echo " MPI-Partitioned support : ${ENABLE_MPI_PARTITIONED}"
echo "********************************************************************************"
77 changes: 76 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,42 @@ AC_ARG_ENABLE(mpi-nbc,
,
)
AC_SUBST(ENABLE_MPI_NONBLOCKINGCOLLECTIVES)

ENABLE_MPI_PERSISTENTCOLLECTIVES=yes
AC_ARG_ENABLE(mpi-pcoll,
AS_HELP_STRING(--disable-mpi-pcoll,[Disable MPI PERSISTENTCOLLECTIVES reporting.]),
if test x"$enableval" = xno ; then
ENABLE_MPI_PERSISTENTCOLLECTIVES=no
echo Profiling of MPI PERSISTENTCOLLECTIVES has been disabled.
fi
,
)
AC_SUBST(ENABLE_MPI_PERSISTENTCOLLECTIVES)


ENABLE_MPI_ISENDRECV=yes
AC_ARG_ENABLE(mpi-isendrecv,
AS_HELP_STRING(--disable-mpi-isendrecv,[Disable MPI ISENDRECV reporting.]),
if test x"$enableval" = xno ; then
ENABLE_MPI_ISENDRECV=no
echo Profiling of MPI ISENDRECV has been disabled.
fi
,
)
AC_SUBST(ENABLE_MPI_ISENDRECV)

ENABLE_MPI_PARTITIONED=yes
AC_ARG_ENABLE(mpi-partitioned,
AS_HELP_STRING(--disable-mpi-partitioned,[Disable MPI PARTITIONED reporting.]),
if test x"$enableval" = xno ; then
ENABLE_MPI_PARTITIONED=no
echo Profiling of MPI PARTITIONED has been disabled.
fi
,
)
AC_SUBST(ENABLE_MPI_PARTITIONED)

dnl end of API conditional
fi

ENABLE_BFD=yes
Expand Down Expand Up @@ -609,6 +645,39 @@ else
HAVE_MPI_NONBLOCKINGCOLLECTIVES=/dev/null
fi

if test "x$ENABLE_API_ONLY" = xno && test "x$ENABLE_MPI_PERSISTENTCOLLECTIVES" = xyes ; then
AC_CHECK_FUNC(MPI_Barrier_init,
AC_DEFINE([HAVE_MPI_PERSISTENTCOLLECTIVES],[1],[Have MPI persistent collectives]) HAVE_MPI_PERSISTENTCOLLECTIVES=mpi.pcoll.protos.txt,
AC_MSG_RESULT([MPI PERSISTENTCOLLECTIVES symbols not found. MPI PERSISTENTCOLLECTIVES reporting deactivated.])
HAVE_MPI_PERSISTENTCOLLECTIVES=/dev/null
ENABLE_MPI_PERSISTENTCOLLECTIVES=no
)
else
HAVE_MPI_PERSISTENTCOLLECTIVES=/dev/null
fi

if test "x$ENABLE_API_ONLY" = xno && test "x$ENABLE_MPI_ISENDRECV" = xyes ; then
AC_CHECK_FUNC(MPI_Isendrecv,
AC_DEFINE([HAVE_MPI_ISENDRECV],[1],[Have MPI Isendrecv]) HAVE_MPI_ISENDRECV=mpi.isendrecv.protos.txt,
AC_MSG_RESULT([MPI ISENDRECV symbols not found. MPI ISENDRECV reporting deactivated.])
HAVE_MPI_ISENDRECV=/dev/null
ENABLE_MPI_ISENDRECV=no
)
else
HAVE_MPI_ISENDRECV=/dev/null
fi

if test "x$ENABLE_API_ONLY" = xno && test "x$ENABLE_MPI_PARTITIONED" = xyes ; then
AC_CHECK_FUNC(MPI_Psend_init,
AC_DEFINE([HAVE_MPI_PARTITIONED],[1],[Have MPI Psend_init]) HAVE_MPI_PARTITIONED=mpi.partitioned.protos.txt,
AC_MSG_RESULT([MPI PARTITIONED symbols not found. MPI PARTITIONED reporting deactivated.])
HAVE_MPI_PARTITIONED=/dev/null
ENABLE_MPI_PARTITIONED=no
)
else
HAVE_MPI_PARTITIONED=/dev/null
fi

if test "x$DISABLE_SO_LOOKUP" = "xno" && test "x$ENABLE_BFD" = xyes; then
SO_LOOKUP=no
# Check for /proc/self/maps, can't use AC_CHECK_FILES since cross compiling
Expand Down Expand Up @@ -703,7 +772,7 @@ if test -n "$F77" -a "$F77" != no ; then
AC_MSG_NOTICE($F77_OBJ_OUT)
AC_MSG_ERROR([giving up])
fi
echo "main(){ FF(); return 0; }" > flink.c
echo "extern void FF(); int main(){ FF(); return 0; }" > flink.c
if $CC -o flink -DFF=f_fun flink.c ffunc.o $LDFLAGS $LIBS 1>/dev/null 2>/dev/null; then
AC_MSG_RESULT(same as C)
F77_SYMBOLS=symbol
Expand Down Expand Up @@ -817,6 +886,9 @@ AC_SUBST(MPIP_COPIED_ARGS_MAX)
AC_SUBST_FILE(HAVE_MPI_IO)
AC_SUBST_FILE(HAVE_MPI_RMA)
AC_SUBST_FILE(HAVE_MPI_NONBLOCKINGCOLLECTIVES)
AC_SUBST_FILE(HAVE_MPI_PERSISTENTCOLLECTIVES)
AC_SUBST_FILE(HAVE_MPI_ISENDRECV)
AC_SUBST_FILE(HAVE_MPI_PARTITIONED)
AC_SUBST_FILE(FORTRAN_GETARG)

if test "x${slibdir}" = x ; then
Expand Down Expand Up @@ -847,4 +919,7 @@ echo
echo " MPI-I/O support : ${ENABLE_MPI_IO}"
echo " MPI-RMA support : ${ENABLE_MPI_RMA}"
echo " MPI-NBC support : ${ENABLE_MPI_NONBLOCKINGCOLLECTIVES}"
echo " MPI-PC support : ${ENABLE_MPI_PERSISTENTCOLLECTIVES}"
echo " MPI-Isendrecv support : ${ENABLE_MPI_ISENDRECV}"
echo " MPI-Partitioned support : ${ENABLE_MPI_PARTITIONED}"
echo "********************************************************************************"
Loading