Skip to content

Commit a5cfbdd

Browse files
Merge pull request #650 from afriedle-intel/afriedle-psm2-mtl
Add new PSM2 MTL.
2 parents 74cf969 + 2c9be59 commit a5cfbdd

17 files changed

+1707
-0
lines changed

config/ompi_check_psm2.m4

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# -*- shell-script -*-
2+
#
3+
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4+
# University Research and Technology
5+
# Corporation. All rights reserved.
6+
# Copyright (c) 2004-2005 The University of Tennessee and The University
7+
# of Tennessee Research Foundation. All rights
8+
# reserved.
9+
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10+
# University of Stuttgart. All rights reserved.
11+
# Copyright (c) 2004-2006 The Regents of the University of California.
12+
# All rights reserved.
13+
# Copyright (c) 2006 QLogic Corp. All rights reserved.
14+
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
15+
# Copyright (c) 2014 Intel Corporation. All rights reserved.
16+
# $COPYRIGHT$
17+
#
18+
# Additional copyrights may follow
19+
#
20+
# $HEADER$
21+
#
22+
23+
# OMPI_CHECK_PSM2(prefix, [action-if-found], [action-if-not-found])
24+
# --------------------------------------------------------
25+
# check if PSM2 support can be found. sets prefix_{CPPFLAGS,
26+
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
27+
# support, otherwise executes action-if-not-found
28+
AC_DEFUN([OMPI_CHECK_PSM2],[
29+
AC_ARG_WITH([psm2],
30+
[AC_HELP_STRING([--with-psm2(=DIR)],
31+
[Build PSM2 (Intel PSM2) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
32+
OPAL_CHECK_WITHDIR([psm2], [$with_psm2], [include/psm2.h])
33+
AC_ARG_WITH([psm2-libdir],
34+
[AC_HELP_STRING([--with-psm2-libdir=DIR],
35+
[Search for PSM (Intel PSM2) libraries in DIR])])
36+
OPAL_CHECK_WITHDIR([psm2-libdir], [$with_psm2_libdir], [libpsm2.*])
37+
38+
ompi_check_psm2_$1_save_CPPFLAGS="$CPPFLAGS"
39+
ompi_check_psm2_$1_save_LDFLAGS="$LDFLAGS"
40+
ompi_check_psm2_$1_save_LIBS="$LIBS"
41+
42+
AS_IF([test "$with_psm2" != "no"],
43+
[AS_IF([test ! -z "$with_psm2" -a "$with_psm2" != "yes"],
44+
[ompi_check_psm2_dir="$with_psm2"])
45+
AS_IF([test ! -z "$with_psm2_libdir" -a "$with_psm2_libdir" != "yes"],
46+
[ompi_check_psm2_libdir="$with_psm2_libdir"])
47+
48+
OPAL_CHECK_PACKAGE([$1],
49+
[psm2.h],
50+
[psm2],
51+
[psm_mq_irecv2],
52+
[],
53+
[$ompi_check_psm2_dir],
54+
[$ompi_check_psm2_libdir],
55+
[ompi_check_psm2_happy="yes"],
56+
[ompi_check_psm2_happy="no"])],
57+
[ompi_check_psm2_happy="no"])
58+
59+
CPPFLAGS="$ompi_check_psm2_$1_save_CPPFLAGS"
60+
LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS"
61+
LIBS="$ompi_check_psm2_$1_save_LIBS"
62+
63+
AS_IF([test "$ompi_check_psm2_happy" = "yes" -a "$enable_progress_threads" = "yes"],
64+
[AC_MSG_WARN([PSM2 driver does not currently support progress threads. Disabling MTL.])
65+
ompi_check_psm2_happy="no"])
66+
67+
AS_IF([test "$ompi_check_psm2_happy" = "yes"],
68+
[$2],
69+
[AS_IF([test ! -z "$with_psm2" -a "$with_psm2" != "no"],
70+
[AC_MSG_ERROR([PSM2 support requested but not found. Aborting])])
71+
$3])
72+
])

ompi/mca/mtl/psm2/Makefile.am

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#
2+
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
3+
# University Research and Technology
4+
# Corporation. All rights reserved.
5+
# Copyright (c) 2004-2005 The University of Tennessee and The University
6+
# of Tennessee Research Foundation. All rights
7+
# reserved.
8+
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
9+
# University of Stuttgart. All rights reserved.
10+
# Copyright (c) 2004-2006 The Regents of the University of California.
11+
# All rights reserved.
12+
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
13+
# Copyright (c) 2015 Intel, Inc. All rights reserved
14+
# $COPYRIGHT$
15+
#
16+
# Additional copyrights may follow
17+
#
18+
# $HEADER$
19+
#
20+
21+
EXTRA_DIST = post_configure.sh
22+
23+
AM_CPPFLAGS = $(mtl_psm2_CPPFLAGS)
24+
25+
dist_ompidata_DATA = help-mtl-psm.txt
26+
27+
mtl_psm2_sources = \
28+
mtl_psm2.c \
29+
mtl_psm2.h \
30+
mtl_psm2_cancel.c \
31+
mtl_psm2_component.c \
32+
mtl_psm2_endpoint.c \
33+
mtl_psm2_endpoint.h \
34+
mtl_psm2_probe.c \
35+
mtl_psm2_recv.c \
36+
mtl_psm2_request.h \
37+
mtl_psm2_send.c \
38+
mtl_psm2_types.h
39+
40+
# Make the output library in this directory, and name it either
41+
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
42+
# (for static builds).
43+
44+
if MCA_BUILD_ompi_mtl_psm2_DSO
45+
component_noinst =
46+
component_install = mca_mtl_psm2.la
47+
else
48+
component_noinst = libmca_mtl_psm2.la
49+
component_install =
50+
endif
51+
52+
mcacomponentdir = $(ompilibdir)
53+
mcacomponent_LTLIBRARIES = $(component_install)
54+
mca_mtl_psm2_la_SOURCES = $(mtl_psm2_sources)
55+
mca_mtl_psm2_la_LIBADD = $(mtl_psm2_LIBS)
56+
mca_mtl_psm2_la_LDFLAGS = -module -avoid-version $(mtl_psm2_LDFLAGS)
57+
58+
noinst_LTLIBRARIES = $(component_noinst)
59+
libmca_mtl_psm2_la_SOURCES = $(mtl_psm2_sources)
60+
libmca_mtl_psm2_la_LIBADD = $(mtl_psm2_LIBS)
61+
libmca_mtl_psm2_la_LDFLAGS = -module -avoid-version $(mtl_psm2_LDFLAGS)

ompi/mca/mtl/psm2/configure.m4

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# -*- shell-script -*-
2+
#
3+
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
4+
# University Research and Technology
5+
# Corporation. All rights reserved.
6+
# Copyright (c) 2004-2005 The University of Tennessee and The University
7+
# of Tennessee Research Foundation. All rights
8+
# reserved.
9+
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10+
# University of Stuttgart. All rights reserved.
11+
# Copyright (c) 2004-2005 The Regents of the University of California.
12+
# All rights reserved.
13+
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
14+
# Copyright (c) 2013 Sandia National Laboratories. All rights reserved.
15+
# Copyright (c) 2014 Intel Corporation. All rights reserved.
16+
# $COPYRIGHT$
17+
#
18+
# Additional copyrights may follow
19+
#
20+
# $HEADER$
21+
#
22+
23+
# MCA_ompi_mtl_psm2_POST_CONFIG(will_build)
24+
# ----------------------------------------
25+
# Only require the tag if we're actually going to be built
26+
AC_DEFUN([MCA_ompi_mtl_psm2_POST_CONFIG], [
27+
AS_IF([test "$1" = "1"], [OMPI_REQUIRE_ENDPOINT_TAG([MTL])])
28+
])dnl
29+
30+
# MCA_mtl_psm2_CONFIG([action-if-can-compile],
31+
# [action-if-cant-compile])
32+
# ------------------------------------------------
33+
AC_DEFUN([MCA_ompi_mtl_psm2_CONFIG],[
34+
AC_CONFIG_FILES([ompi/mca/mtl/psm2/Makefile])
35+
36+
OMPI_CHECK_PSM2([mtl_psm2],
37+
[mtl_psm2_happy="yes"],
38+
[mtl_psm2_happy="no"])
39+
40+
AS_IF([test "$mtl_psm2_happy" = "yes"],
41+
[$1],
42+
[$2])
43+
44+
# substitute in the things needed to build psm2
45+
AC_SUBST([mtl_psm2_CFLAGS])
46+
AC_SUBST([mtl_psm2_CPPFLAGS])
47+
AC_SUBST([mtl_psm2_LDFLAGS])
48+
AC_SUBST([mtl_psm2_LIBS])
49+
])dnl

ompi/mca/mtl/psm2/help-mtl-psm.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# -*- text -*-
2+
#
3+
# Copyright (C) 2009. QLogic Corporation. All rights reserved.
4+
# $COPYRIGHT$
5+
#
6+
# Additional copyrights may follow
7+
#
8+
# $HEADER$
9+
#
10+
[psm init]
11+
Initialization of PSM library failed.
12+
13+
Error: %s
14+
#
15+
[debug level]
16+
Unable to set PSM debug level.
17+
18+
Error: %s
19+
#
20+
[unable to open endpoint]
21+
PSM was unable to open an endpoint. Please make sure that the network link is
22+
active on the node and the hardware is functioning.
23+
24+
Error: %s
25+
#
26+
[no uuid present]
27+
Error obtaining unique transport key from ORTE (orte_precondition_transports %s
28+
the environment).
29+
30+
Local host: %s
31+
#
32+
[error polling network]
33+
Error %s occurred in attempting to make network progress (psm_mq_ipeek).
34+
#
35+
[error posting receive]
36+
Unable to post application receive buffer (psm_mq_irecv or psm_mq_imrecv).
37+
38+
Error: %s
39+
Buffer: %p
40+
Length: %d
41+
#
42+
[path query mechanism unknown]
43+
Unknown path record query mechanism %s. Supported mechanisms are %s.

0 commit comments

Comments
 (0)