1
1

Add a common/libfabric component to the opal layer where we can place common functions

Этот коммит содержится в:
Ralph Castain 2015-06-24 20:40:12 -07:00
родитель ee36d813dc
Коммит ea0e21bb06
7 изменённых файлов: 185 добавлений и 3 удалений

Просмотреть файл

@ -11,7 +11,7 @@
EXTRA_DIST = post_configure.sh
AM_CPPFLAGS = $(ompi_mtl_ofi_CPPFLAGS)
AM_CPPFLAGS = $(ompi_mtl_ofi_CPPFLAGS) $(opal_common_libfabric_CPPFLAGS)
dist_ompidata_DATA = help-mtl-ofi.txt
@ -43,8 +43,10 @@ mca_mtl_ofi_la_SOURCES = $(mtl_ofi_sources)
mca_mtl_ofi_la_LDFLAGS = \
$(ompi_mtl_ofi_LDFLAGS) \
-module -avoid-version
mca_mtl_ofi_la_LIBADD = $(ompi_mtl_ofi_LIBS)
mca_mtl_ofi_la_LIBADD = $(ompi_mtl_ofi_LIBS) \
$(OPAL_TOP_BUILDDIR)/opal/mca/common/libfabric/lib@OPAL_LIB_PREFIX@mca_common_libfabric.la
noinst_LTLIBRARIES = $(component_noinst)
libmca_mtl_ofi_la_SOURCES = $(mtl_ofi_sources)
libmca_mtl_ofi_la_LDFLAGS = -module -avoid-version

Просмотреть файл

@ -23,7 +23,10 @@ AC_DEFUN([MCA_ompi_mtl_ofi_POST_CONFIG], [
AC_DEFUN([MCA_ompi_mtl_ofi_CONFIG],[
AC_CONFIG_FILES([ompi/mca/mtl/ofi/Makefile])
OPAL_CHECK_LIBFABRIC([ompi_mtl_ofi],
# ensure we already ran the common libfabric config
AC_REQUIRE([MCA_opal_common_libfabric_CONFIG])
AS_IF([test "$opal_common_libfabric_happy" = "yes"],
[$1],
[$2])
])dnl

102
opal/mca/common/libfabric/Makefile.am Обычный файл
Просмотреть файл

@ -0,0 +1,102 @@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2013 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2009 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) 2011-2013 NVIDIA Corporation. All rights reserved.
# Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2015 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# A word of explanation...
#
# This library is linked against various MCA components because the
# support for libfabrics is needed in various places.
#
# Note that building this common component statically and linking
# against other dynamic components is *not* supported!
AM_CPPFLAGS = $(opal_common_libfabric_CPPFLAGS)
# Header files
headers = \
common_libfabric.h
# Source files
sources = \
common_libfabric.c
# As per above, we'll either have an installable or noinst result.
# The installable one should follow the same MCA prefix naming rules
# (i.e., libmca_<type>_<name>.la). The noinst one can be named
# whatever it wants, although libmca_<type>_<name>_noinst.la is
# recommended.
# To simplify components that link to this library, we will *always*
# have an output libtool library named libmca_<type>_<name>.la -- even
# for case 2) described above (i.e., so there's no conditional logic
# necessary in component Makefile.am's that link to this library).
# Hence, if we're creating a noinst version of this library (i.e.,
# case 2), we sym link it to the libmca_<type>_<name>.la name
# (libtool will do the Right Things under the covers). See the
# all-local and clean-local rules, below, for how this is effected.
lib_LTLIBRARIES =
noinst_LTLIBRARIES =
comp_inst = lib@OPAL_LIB_PREFIX@mca_common_libfabric.la
comp_noinst = lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst.la
if MCA_BUILD_opal_common_libfabric_DSO
lib_LTLIBRARIES += $(comp_inst)
else
noinst_LTLIBRARIES += $(comp_noinst)
endif
lib@OPAL_LIB_PREFIX@mca_common_libfabric_la_SOURCES = $(headers) $(sources)
lib@OPAL_LIB_PREFIX@mca_common_libfabric_la_LDFLAGS = \
$(opal_common_libfabric_LDFLAGS) \
-version-info $(libmca_opal_common_libfabric_so_version)
lib@OPAL_LIB_PREFIX@mca_common_libfabric_la_LIBADD = $(opal_common_libfabric_LIBS)
lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst_la_SOURCES = $(headers) $(sources)
lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst_la_LDFLAGS = $(opal_common_libfabric_LDFLAGS)
lib@OPAL_LIB_PREFIX@mca_common_libfabric_noinst_la_LIBADD = $(opal_common_libfabric_LIBS)
# Conditionally install the header files
if WANT_INSTALL_HEADERS
opaldir = $(opalincludedir)/$(subdir)
opal_HEADERS = $(headers)
endif
# These two rules will sym link the "noinst" libtool library filename
# to the installable libtool library filename in the case where we are
# compiling this component statically (case 2), described above).
V=0
OMPI_V_LN_SCOMP = $(ompi__v_LN_SCOMP_$V)
ompi__v_LN_SCOMP_ = $(ompi__v_LN_SCOMP_$AM_DEFAULT_VERBOSITY)
ompi__v_LN_SCOMP_0 = @echo " LN_S " `basename $(comp_inst)`;
all-local:
$(OMPI_V_LN_SCOMP) if test -z "$(lib_LTLIBRARIES)"; then \
rm -f "$(comp_inst)"; \
$(LN_S) "$(comp_noinst)" "$(comp_inst)"; \
fi
clean-local:
if test -z "$(lib_LTLIBRARIES)"; then \
rm -f "$(comp_inst)"; \
fi

Просмотреть файл

@ -0,0 +1,21 @@
/*
* Copyright (c) 2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "opal_config.h"
#include "opal/constants.h"
#include <errno.h>
#include <unistd.h>
#include "common_libfabric.h"
int mca_common_libfabric_register_mca_variables(void)
{
return OPAL_SUCCESS;
}

Просмотреть файл

@ -0,0 +1,16 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2015 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef OPAL_MCA_COMMON_LIBFABRIC_H
#define OPAL_MCA_COMMON_LIBFABRIC_H
OPAL_DECLSPEC int mca_common_libfabric_register_mca_variables(void);
#endif /* OPAL_MCA_COMMON_LIBFABRIC_H */

31
opal/mca/common/libfabric/configure.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,31 @@
# -*- shell-script -*-
#
# Copyright (c) 2011-2013 NVIDIA Corporation. All rights reserved.
# Copyright (c) 2013 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2015 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
#
# If LIBFABRIC support was requested, then build the LIBFABRIC support library.
# This code checks just makes sure the check was done earlier by the
# opal_check_libfabric.m4 code.
#
AC_DEFUN([MCA_opal_common_libfabric_CONFIG],[
AC_CONFIG_FILES([opal/mca/common/libfabric/Makefile])
# check for libfabric request
OPAL_CHECK_LIBFABRIC([opal_common_libfabric],
[opal_common_libfabric_happy=yes
$1],
[opal_common_libfabric_happy=no
$2])
])dnl

7
opal/mca/common/libfabric/owner.txt Обычный файл
Просмотреть файл

@ -0,0 +1,7 @@
#
# owner/status file
# owner: institution that is responsible for this package
# status: e.g. active, maintenance, unmaintained
#
owner: Intel
status:active