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
32 changes: 32 additions & 0 deletions opal/mca/reachable/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Copyright (c) 2014 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

AM_CPPFLAGS = $(LTDLINCL) $(reachable_CPPFLAGS)

# main library setup
noinst_LTLIBRARIES = libmca_reachable.la
libmca_reachable_la_SOURCES =

# pkgdata setup
dist_opaldata_DATA =

# local files
headers = reachable.h
libmca_reachable_la_SOURCES += $(headers)

# Conditionally install the header files
if WANT_INSTALL_HEADERS
opaldir = $(opalincludedir)/$(subdir)
nobase_opal_HEADERS = $(headers)
endif

include base/Makefile.am

distclean-local:
rm -f base/static-components.h
17 changes: 17 additions & 0 deletions opal/mca/reachable/base/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
# Copyright (c) 2014 Intel, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

headers += \
base/base.h

libmca_reachable_la_SOURCES += \
base/reachable_base_frame.c \
base/reachable_base_select.c
34 changes: 34 additions & 0 deletions opal/mca/reachable/base/base.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/** @file:
*/

#ifndef MCA_REACHABLE_BASE_H
#define MCA_REACHABLE_BASE_H

#include "opal_config.h"
#include "opal/types.h"

#include "opal/mca/mca.h"
#include "opal/mca/base/mca_base_framework.h"

#include "opal/mca/reachable/reachable.h"

BEGIN_C_DECLS

OPAL_DECLSPEC extern mca_base_framework_t opal_reachable_base_framework;

/**
* Select a reachable module
*/
OPAL_DECLSPEC int opal_reachable_base_select(void);

END_C_DECLS

#endif
51 changes: 51 additions & 0 deletions opal/mca/reachable/base/reachable_base_frame.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/


#include "opal_config.h"
#include "opal/constants.h"

#include "opal/mca/mca.h"
#include "opal/util/output.h"
#include "opal/mca/base/base.h"

#include "opal/mca/reachable/base/base.h"


/*
* The following file was created by configure. It contains extern
* components and the definition of an array of pointers to each
* module's public mca_base_module_t struct.
*/

#include "opal/mca/reachable/base/static-components.h"

opal_reachable_base_module_t opal_reachable;

static int opal_reachable_base_frame_register(mca_base_register_flag_t flags)
{
return OPAL_SUCCESS;
}

static int opal_reachable_base_frame_close(void)
{
return mca_base_framework_components_close(&opal_reachable_base_framework, NULL);
}

static int opal_reachable_base_frame_open(mca_base_open_flag_t flags)
{
/* Open up all available components */
return mca_base_framework_components_open(&opal_reachable_base_framework, flags);
}

MCA_BASE_FRAMEWORK_DECLARE(opal, reachable, "OPAL Reachability Framework",
opal_reachable_base_frame_register,
opal_reachable_base_frame_open,
opal_reachable_base_frame_close,
mca_reachable_base_static_components, 0);
47 changes: 47 additions & 0 deletions opal/mca/reachable/base/reachable_base_select.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/


#include "opal_config.h"

#include "opal/constants.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "opal/mca/reachable/reachable.h"
#include "opal/mca/reachable/base/base.h"

/*
* Globals
*/

int opal_reachable_base_select(void)
{
int ret;
opal_reachable_base_component_t *best_component = NULL;
opal_reachable_base_module_t *best_module = NULL;

/*
* Select the best component
*/
if( OPAL_SUCCESS != mca_base_select("reachable", opal_reachable_base_framework.framework_output,
&opal_reachable_base_framework.framework_components,
(mca_base_module_t **) &best_module,
(mca_base_component_t **) &best_component) ) {
/* notify caller that no available component found */
return OPAL_ERR_NOT_FOUND;
}

/* Save the winner */
opal_reachable = *best_module;

/* Initialize the winner */
ret = opal_reachable.init();

return ret;
}
44 changes: 44 additions & 0 deletions opal/mca/reachable/netlink/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#

sources = \
reachable_netlink.h \
reachable_netlink_component.c \
reachable_netlink_module.c \
libnl1_utils.h \
libnl3_utils.h \
libnl_utils.h \
reachable_netlink_utils_common.c

# 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_opal_reachable_netlink_DSO
component_noinst =
component_install = mca_reachable_netlink.la
else
component_noinst = libmca_reachable_netlink.la
component_install =
endif

AM_CPPFLAGS = \
$(opal_reachable_netlink_LIBNL_CPPFLAGS) \
-DHAVE_LIBNL3=$(HAVE_LIBNL3)

mcacomponentdir = $(opallibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_reachable_netlink_la_SOURCES = $(sources)
mca_reachable_netlink_la_LDFLAGS = -module -avoid-version
mca_reachable_netlink_la_LIBADD = $(opal_reachable_netlink_LIBNL_LIBS)

noinst_LTLIBRARIES = $(component_noinst)
libmca_reachable_netlink_la_SOURCES =$(sources)
libmca_reachable_netlink_la_LDFLAGS = -module -avoid-version
libmca_reachable_netlink_la_LIBADD = $(opal_reachable_netlink_LIBNL_LIBS)
Loading