Skip to content
Merged
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
80 changes: 80 additions & 0 deletions config/ompi_check_ucx.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# -*- shell-script -*-
#
# Copyright (C) Mellanox Technologies Ltd. 2015. ALL RIGHTS RESERVED.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

# OMPI_CHECK_UCX(prefix, [action-if-found], [action-if-not-found])
# --------------------------------------------------------
# check if UCX support can be found. sets prefix_{CPPFLAGS,
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
# support, otherwise executes action-if-not-found
AC_DEFUN([OMPI_CHECK_UCX],[
AC_ARG_WITH([ucx],
[AC_HELP_STRING([--with-ucx(=DIR)],
[Build with Unified Communication X library support])])
OPAL_CHECK_WITHDIR([ucx], [$with_ucx], [include/ucp/api/ucp.h])
AC_ARG_WITH([ucx-libdir],
[AC_HELP_STRING([--with-ucx-libdir=DIR],
[Search for Unified Communication X libraries in DIR])])
OPAL_CHECK_WITHDIR([ucx-libdir], [$with_ucx_libdir], [libucp.*])

ompi_check_ucx_$1_save_CPPFLAGS="$CPPFLAGS"
ompi_check_ucx_$1_save_LDFLAGS="$LDFLAGS"
ompi_check_ucx_$1_save_LIBS="$LIBS"

AS_IF([test "$with_ucx" != "no"],
[AS_IF([test ! -z "$with_ucx" -a "$with_ucx" != "yes"],
[
ompi_check_ucx_dir="$with_ucx"
ompi_check_ucx_libdir="$with_ucx/lib"
])
AS_IF([test ! -z "$with_ucx_libdir" -a "$with_ucx_libdir" != "yes"],
[ompi_check_ucx_libdir="$with_ucx_libdir"])

ompi_check_ucx_extra_libs="-L$ompi_check_ucx_libdir"

OPAL_CHECK_PACKAGE([$1],
[ucp/api/ucp.h],
[ucp],
[ucp_cleanup],
[$ompi_check_ucx_extra_libs],
[$ompi_check_ucx_dir],
[$ompi_check_ucx_libdir],
[ompi_check_ucx_happy="yes"],
[ompi_check_ucx_happy="no"])],
[ompi_check_ucx_happy="no"])



CPPFLAGS="$ompi_check_ucx_$1_save_CPPFLAGS"
LDFLAGS="$ompi_check_ucx_$1_save_LDFLAGS"
LIBS="$ompi_check_ucx_$1_save_LIBS"

AC_MSG_CHECKING(for UCX version compatibility)
AC_REQUIRE_CPP
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I$ompi_check_ucx_dir/include"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <uct/api/version.h>]],
[[
]])],
[ompi_ucx_version_ok="yes"],
[ompi_ucx_version_ok="no"])

AC_MSG_RESULT([$ompi_ucx_version_ok])
CFLAGS=$old_CFLAGS

AS_IF([test "$ompi_ucx_version_ok" = "no"], [ompi_check_ucx_happy="no"])

AS_IF([test "$ompi_check_ucx_happy" = "yes"],
[$2],
[AS_IF([test ! -z "$with_ucx" -a "$with_ucx" != "no"],
[AC_MSG_ERROR([UCX support requested but not found. Aborting])])
$3])
])

1 change: 1 addition & 0 deletions ompi/datatype/ompi_datatype.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ struct ompi_datatype_t {

void* args; /**< Data description for the user */
void* packed_description; /**< Packed description of the datatype */
uint64_t pml_data; /**< PML-specific information */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bosilca Are you ok with adding this member to the ompi_datatype_t?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addition only affects the OMPI datatypes, everything below (and the real datatype engine is down in OPAL) remains unaffected.

/* --- cacheline 6 boundary (384 bytes) --- */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you just added a uint64_t right above this, is this comment (cacheline boundary) still correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahem ... it was not correct before. I'll update it once this gets in.

char name[MPI_MAX_OBJECT_NAME];/**< Externally visible name */
/* --- cacheline 7 boundary (448 bytes) --- */
Expand Down
1 change: 1 addition & 0 deletions ompi/datatype/ompi_datatype_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ static void __ompi_datatype_allocate( ompi_datatype_t* datatype )
datatype->d_keyhash = NULL;
datatype->name[0] = '\0';
datatype->packed_description = NULL;
datatype->pml_data = 0;
}

static void __ompi_datatype_release(ompi_datatype_t * datatype)
Expand Down
45 changes: 45 additions & 0 deletions ompi/mca/pml/ucx/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#


# Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
# (for static builds).

AM_CPPFLAGS = $(pml_ucx_CPPFLAGS)

local_sources = \
pml_ucx.h \
pml_ucx.c \
pml_ucx_request.h \
pml_ucx_request.c \
pml_ucx_datatype.h \
pml_ucx_datatype.c \
pml_ucx_freelist.h \
pml_ucx_component.c

if MCA_BUILD_ompi_pml_ucx_DSO
component_noinst =
component_install = mca_pml_ucx.la
else
component_noinst = libmca_pml_ucx.la
component_install =
endif

mcacomponentdir = $(ompilibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_pml_ucx_la_SOURCES = $(local_sources)
mca_pml_ucx_la_LIBADD = $(pml_ucx_LIBS)
mca_pml_ucx_la_LDFLAGS = -module -avoid-version

noinst_LTLIBRARIES = $(component_noinst)
libmca_pml_ucx_la_SOURCES = $(local_sources)
libmca_pml_ucx_la_LIBADD = $(pml_ucx_LIBS)
libmca_pml_ucx_la_LDFLAGS = -module -avoid-version

30 changes: 30 additions & 0 deletions ompi/mca/pml/ucx/configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2015. ALL RIGHTS RESERVED.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#


AC_DEFUN([MCA_ompi_pml_ucx_POST_CONFIG], [
AS_IF([test "$1" = "1"], [OMPI_REQUIRE_ENDPOINT_TAG([PML])])
])

AC_DEFUN([MCA_ompi_pml_ucx_CONFIG], [
AC_CONFIG_FILES([ompi/mca/pml/ucx/Makefile])

OMPI_CHECK_UCX([pml_ucx],
[pml_ucx_happy="yes"],
[pml_ucx_happy="no"])

AS_IF([test "$pml_ucx_happy" = "yes"],
[$1],
[$2])

# substitute in the things needed to build ucx
AC_SUBST([pml_ucx_CPPFLAGS])
AC_SUBST([pml_ucx_LDFLAGS])
AC_SUBST([pml_ucx_LIBS])
])
Loading