Skip to content
Draft
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
39 changes: 38 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,13 @@ AC_ARG_ENABLE([shr-atomics],
AS_IF([test "$enable_shr_atomics" = "yes"],
[AC_DEFINE([USE_SHR_ATOMICS], [1], [If defined, the shared memory layer will perform processor atomics.])])

AC_ARG_ENABLE([hierarchical-barrier],
[AS_HELP_STRING([--enable-hierarchical-barrier],
[Enable the hierarchical barrier: intranode phase uses CPU atomics,
internode phase uses NIC puts. Requires an on-node transport (XPMEM
or CMA) and a network transport (OFI, Portals4, or UCX).
(default: disabled)])])

AC_ARG_ENABLE([manpages],
[AS_HELP_STRING([--enable-manpages],
[Include man pages in the installation (default:disabled)])])
Expand Down Expand Up @@ -537,7 +544,6 @@ AM_CONDITIONAL([USE_CMA], [test "$transport_cma" = "yes"])

AS_IF([test "$transport_xpmem" = "yes" -o "$transport_cma" = "yes"],
[AC_DEFINE([USE_ON_NODE_COMMS], [1], [Define if any on-node comm transport is available])
AC_DEFINE([ENABLE_HARD_POLLING], [1], [Enable hard polling])
])

if test "$enable_shr_atomics" = "yes"; then
Expand All @@ -551,6 +557,36 @@ if test "$enable_shr_atomics" != "no" -a "$transport_xpmem" = "yes" -a "$transpo
AC_DEFINE([USE_SHR_ATOMICS], [1], [If defined, the shared memory layer will perform processor atomics.])
fi

dnl Hierarchical barrier: only when explicitly requested. Validate that an
dnl on-node transport (XPMEM or CMA) and a network transport are both present;
dnl error if dependencies are missing.
transport_hierarchical_barrier="no"
if test "$enable_hierarchical_barrier" = "yes"; then
dnl Check on-node transport dependency
if test "$transport_xpmem" != "yes" -a "$transport_cma" != "yes"; then
AC_MSG_ERROR([--enable-hierarchical-barrier requires an on-node transport; configure with --with-xpmem or --with-cma])
dnl Check network transport dependency
elif test "$transport_ofi" != "yes" -a "$transport_portals4" != "yes" -a "$transport_ucx" != "yes"; then
AC_MSG_ERROR([--enable-hierarchical-barrier requires a network transport; configure with --with-ofi, --with-portals4, or --with-ucx])
else
transport_hierarchical_barrier="yes"
fi
fi
if test "$transport_hierarchical_barrier" = "yes"; then
AC_DEFINE([USE_HIERARCHICAL_BARRIER], [1],
[If defined, enables the hierarchical barrier: intranode CPU atomics + internode NIC puts.])
dnl The hierarchical barrier uses shared-memory puts/gets (XPMEM/CMA) for
dnl intranode data movement. USE_SHR_ATOMICS is defined so that the
dnl shmem_shr_transport_atomic() function bodies are compiled; the routing
dnl logic in shmem_shr_transport_use_atomic() gates them behind a runtime
dnl check (shr_size == num_pes), so user-visible AMOs only go through CPU
dnl atomics when all PEs are on one node. In the multi-node case they
dnl always use the NIC, preserving the single-coherency-domain invariant.
AC_DEFINE([USE_SHR_ATOMICS], [1],
[If defined, the shared memory layer will perform processor atomics.])
transport_shr_atomics="yes"
fi

AC_ARG_ENABLE([pmi-simple], [AS_HELP_STRING([--enable-pmi-simple],
[Use MPICH simple PMI-1 library for process management])])
AC_ARG_ENABLE([pmi-mpi], [AS_HELP_STRING([--enable-pmi-mpi],
Expand Down Expand Up @@ -1050,6 +1086,7 @@ echo " XPMEM: $transport_xpmem"
echo " CMA: $transport_cma"
echo " memcpy (self): $transport_memcpy"
echo " Shr. atomics: $transport_shr_atomics"
echo " Hier. barrier: $transport_hierarchical_barrier"
echo ""
echo "Global Options:"
if test "$enable_remote_virtual_addressing" = "yes"; then
Expand Down
Loading
Loading