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
72 changes: 72 additions & 0 deletions config/ompi_check_psm2.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2006 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006 QLogic Corp. All rights reserved.
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2014 Intel Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

# OMPI_CHECK_PSM2(prefix, [action-if-found], [action-if-not-found])
# --------------------------------------------------------
# check if PSM2 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_PSM2],[
AC_ARG_WITH([psm2],
[AC_HELP_STRING([--with-psm2(=DIR)],
[Build PSM2 (Intel PSM2) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
OPAL_CHECK_WITHDIR([psm2], [$with_psm2], [include/psm2.h])
AC_ARG_WITH([psm2-libdir],
[AC_HELP_STRING([--with-psm2-libdir=DIR],
[Search for PSM (Intel PSM2) libraries in DIR])])
OPAL_CHECK_WITHDIR([psm2-libdir], [$with_psm2_libdir], [libpsm2.*])

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

AS_IF([test "$with_psm2" != "no"],
[AS_IF([test ! -z "$with_psm2" -a "$with_psm2" != "yes"],
[ompi_check_psm2_dir="$with_psm2"])
AS_IF([test ! -z "$with_psm2_libdir" -a "$with_psm2_libdir" != "yes"],
[ompi_check_psm2_libdir="$with_psm2_libdir"])

OPAL_CHECK_PACKAGE([$1],
[psm2.h],
[psm2],
[psm_mq_irecv2],
[],
[$ompi_check_psm2_dir],
[$ompi_check_psm2_libdir],
[ompi_check_psm2_happy="yes"],
[ompi_check_psm2_happy="no"])],
[ompi_check_psm2_happy="no"])

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

AS_IF([test "$ompi_check_psm2_happy" = "yes" -a "$enable_progress_threads" = "yes"],
[AC_MSG_WARN([PSM2 driver does not currently support progress threads. Disabling MTL.])
ompi_check_psm2_happy="no"])

AS_IF([test "$ompi_check_psm2_happy" = "yes"],
[$2],
[AS_IF([test ! -z "$with_psm2" -a "$with_psm2" != "no"],
[AC_MSG_ERROR([PSM2 support requested but not found. Aborting])])
$3])
])
61 changes: 61 additions & 0 deletions ompi/mca/mtl/psm2/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2006 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2015 Intel, Inc. All rights reserved
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

EXTRA_DIST = post_configure.sh

AM_CPPFLAGS = $(mtl_psm2_CPPFLAGS)

dist_ompidata_DATA = help-mtl-psm.txt

mtl_psm2_sources = \
mtl_psm2.c \
mtl_psm2.h \
mtl_psm2_cancel.c \
mtl_psm2_component.c \
mtl_psm2_endpoint.c \
mtl_psm2_endpoint.h \
mtl_psm2_probe.c \
mtl_psm2_recv.c \
mtl_psm2_request.h \
mtl_psm2_send.c \
mtl_psm2_types.h

# 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).

if MCA_BUILD_ompi_mtl_psm2_DSO
component_noinst =
component_install = mca_mtl_psm2.la
else
component_noinst = libmca_mtl_psm2.la
component_install =
endif

mcacomponentdir = $(ompilibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_mtl_psm2_la_SOURCES = $(mtl_psm2_sources)
mca_mtl_psm2_la_LIBADD = $(mtl_psm2_LIBS)
mca_mtl_psm2_la_LDFLAGS = -module -avoid-version $(mtl_psm2_LDFLAGS)

noinst_LTLIBRARIES = $(component_noinst)
libmca_mtl_psm2_la_SOURCES = $(mtl_psm2_sources)
libmca_mtl_psm2_la_LIBADD = $(mtl_psm2_LIBS)
libmca_mtl_psm2_la_LDFLAGS = -module -avoid-version $(mtl_psm2_LDFLAGS)
49 changes: 49 additions & 0 deletions ompi/mca/mtl/psm2/configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2013 Sandia National Laboratories. All rights reserved.
# Copyright (c) 2014 Intel Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

# MCA_ompi_mtl_psm2_POST_CONFIG(will_build)
# ----------------------------------------
# Only require the tag if we're actually going to be built
AC_DEFUN([MCA_ompi_mtl_psm2_POST_CONFIG], [
AS_IF([test "$1" = "1"], [OMPI_REQUIRE_ENDPOINT_TAG([MTL])])
])dnl

# MCA_mtl_psm2_CONFIG([action-if-can-compile],
# [action-if-cant-compile])
# ------------------------------------------------
AC_DEFUN([MCA_ompi_mtl_psm2_CONFIG],[
AC_CONFIG_FILES([ompi/mca/mtl/psm2/Makefile])

OMPI_CHECK_PSM2([mtl_psm2],
[mtl_psm2_happy="yes"],
[mtl_psm2_happy="no"])

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

# substitute in the things needed to build psm2
AC_SUBST([mtl_psm2_CFLAGS])
AC_SUBST([mtl_psm2_CPPFLAGS])
AC_SUBST([mtl_psm2_LDFLAGS])
AC_SUBST([mtl_psm2_LIBS])
])dnl
43 changes: 43 additions & 0 deletions ompi/mca/mtl/psm2/help-mtl-psm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- text -*-
#
# Copyright (C) 2009. QLogic Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
[psm init]
Initialization of PSM library failed.

Error: %s
#
[debug level]
Unable to set PSM debug level.

Error: %s
#
[unable to open endpoint]
PSM was unable to open an endpoint. Please make sure that the network link is
active on the node and the hardware is functioning.

Error: %s
#
[no uuid present]
Error obtaining unique transport key from ORTE (orte_precondition_transports %s
the environment).

Local host: %s
#
[error polling network]
Error %s occurred in attempting to make network progress (psm_mq_ipeek).
#
[error posting receive]
Unable to post application receive buffer (psm_mq_irecv or psm_mq_imrecv).

Error: %s
Buffer: %p
Length: %d
#
[path query mechanism unknown]
Unknown path record query mechanism %s. Supported mechanisms are %s.
Loading