-
Notifications
You must be signed in to change notification settings - Fork 936
UCX support for ompi and oshmem #1008
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
Changes from all commits
8fa1438
bd3f4c8
b020b62
f2b501a
502dc8a
a313588
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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]) | ||
| ]) | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 */ | ||
| /* --- cacheline 6 boundary (384 bytes) --- */ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) --- */ | ||
|
|
||
| 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 | ||
|
|
| 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]) | ||
| ]) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.