diff --git a/ompi/mca/bml/r2/Makefile.am b/ompi/mca/bml/r2/Makefile.am index 5a359d2f22..6fedf2e0d7 100644 --- a/ompi/mca/bml/r2/Makefile.am +++ b/ompi/mca/bml/r2/Makefile.am @@ -21,8 +21,8 @@ r2_sources = \ bml_r2.c \ bml_r2.h \ bml_r2_component.c \ - bml_r2_ft.c \ - bml_r2_ft.h + bml_r2_ft.c \ + bml_r2_ft.h dist_pkgdata_DATA = help-mca-bml-r2.txt diff --git a/ompi/mca/bml/r2/bml_r2_ft.c b/ompi/mca/bml/r2/bml_r2_ft.c index c602c5b47f..164dd4b841 100644 --- a/ompi/mca/bml/r2/bml_r2_ft.c +++ b/ompi/mca/bml/r2/bml_r2_ft.c @@ -38,6 +38,7 @@ int mca_bml_r2_ft_event(int state) { +#if !ORTE_DISABLE_FULL_SUPPORT static bool first_continue_pass = false; ompi_proc_t** procs = NULL; size_t num_procs; @@ -297,6 +298,7 @@ int mca_bml_r2_ft_event(int state) else { ; } - +#endif + return OMPI_SUCCESS; } diff --git a/ompi/mca/dpm/orte/configure.m4 b/ompi/mca/dpm/orte/configure.m4 new file mode 100644 index 0000000000..e32562ce89 --- /dev/null +++ b/ompi/mca/dpm/orte/configure.m4 @@ -0,0 +1,21 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# MCA_dpm_orte_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_ompi_dpm_orte_CONFIG],[ + AC_CONFIG_FILES([ompi/mca/dpm/orte/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +])dnl diff --git a/ompi/mca/pubsub/orte/configure.m4 b/ompi/mca/pubsub/orte/configure.m4 new file mode 100644 index 0000000000..4e69d70f76 --- /dev/null +++ b/ompi/mca/pubsub/orte/configure.m4 @@ -0,0 +1,21 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# MCA_pubsub_orte_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_ompi_pubsub_orte_CONFIG],[ + AC_CONFIG_FILES([ompi/mca/pubsub/orte/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +])dnl diff --git a/ompi/tools/ompi_info/components.c b/ompi/tools/ompi_info/components.c index 9aa7708581..e7ba2f6dae 100644 --- a/ompi/tools/ompi_info/components.c +++ b/ompi/tools/ompi_info/components.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2010 Los Alamos National Security, LLC. + * Copyright (c) 2010-2011 Los Alamos National Security, LLC. * All rights reserved. * Copyright (c) 2011 University of Houston. All rights reserved. * $COPYRIGHT$ @@ -103,15 +103,13 @@ #include "orte/mca/errmgr/base/base.h" #include "orte/mca/grpcomm/grpcomm.h" #include "orte/mca/grpcomm/base/base.h" -#include "orte/mca/db/db.h" -#include "orte/mca/db/base/base.h" #include "orte/mca/ess/ess.h" #include "orte/mca/ess/base/base.h" -#include "orte/mca/notifier/notifier.h" -#include "orte/mca/notifier/base/base.h" #include "orte/util/show_help.h" #include "orte/util/proc_info.h" #if !ORTE_DISABLE_FULL_SUPPORT +#include "orte/mca/notifier/notifier.h" +#include "orte/mca/notifier/base/base.h" #include "orte/mca/debugger/debugger.h" #include "orte/mca/debugger/base/base.h" #include "orte/mca/iof/iof.h" @@ -124,8 +122,6 @@ #include "orte/mca/ras/base/ras_private.h" #include "orte/mca/rmaps/rmaps.h" #include "orte/mca/rmaps/base/base.h" -#include "orte/mca/rmcast/rmcast.h" -#include "orte/mca/rmcast/base/base.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/base/base.h" #include "orte/mca/routed/routed.h" @@ -418,14 +414,6 @@ void ompi_info_open_components(void) map->components = &orte_grpcomm_base.components_available; opal_pointer_array_add(&component_map, map); - if (ORTE_SUCCESS != orte_db_base_open()) { - goto error; - } - map = OBJ_NEW(ompi_info_component_map_t); - map->type = strdup("db"); - map->components = &orte_db_base_components_available; - opal_pointer_array_add(&component_map, map); - if (ORTE_SUCCESS != orte_ess_base_open()) { goto error; } @@ -434,6 +422,7 @@ void ompi_info_open_components(void) map->components = &orte_ess_base_components_available; opal_pointer_array_add(&component_map, map); +#if !ORTE_DISABLE_FULL_SUPPORT if (ORTE_SUCCESS != orte_notifier_base_open()) { goto error; } @@ -442,7 +431,6 @@ void ompi_info_open_components(void) map->components = &orte_notifier_base_components_available; opal_pointer_array_add(&component_map, map); -#if !ORTE_DISABLE_FULL_SUPPORT if (ORTE_SUCCESS != orte_debugger_base_open()) { goto error; } @@ -491,14 +479,6 @@ void ompi_info_open_components(void) map->components = &orte_rmaps_base.available_components; opal_pointer_array_add(&component_map, map); - if (ORTE_SUCCESS != orte_rmcast_base_open()) { - goto error; - } - map = OBJ_NEW(ompi_info_component_map_t); - map->type = strdup("rmcast"); - map->components = &orte_rmcast_base.rmcast_opened; - opal_pointer_array_add(&component_map, map); - if (ORTE_SUCCESS != orte_rml_base_open()) { goto error; } @@ -799,8 +779,6 @@ void ompi_info_close_components() (void) ompi_osc_base_close(); (void) orte_grpcomm_base_close(); - (void) orte_db_base_close(); - (void) orte_notifier_base_close(); (void) orte_ess_base_close(); (void) orte_show_help_finalize(); #if !ORTE_DISABLE_FULL_SUPPORT @@ -808,6 +786,7 @@ void ompi_info_close_components() (void) orte_snapc_base_close(); (void) orte_sstore_base_close(); #endif + (void) orte_notifier_base_close(); (void) orte_filem_base_close(); (void) orte_iof_base_close(); (void) orte_plm_base_close(); @@ -818,7 +797,6 @@ void ompi_info_close_components() (void) orte_routed_base_close(); (void) mca_oob_base_close(); - (void) orte_rmcast_base_close(); #endif (void) orte_errmgr_base_close(); diff --git a/ompi/tools/ompi_info/ompi_info.c b/ompi/tools/ompi_info/ompi_info.c index ac3b6d2c70..4d85e2f336 100644 --- a/ompi/tools/ompi_info/ompi_info.c +++ b/ompi/tools/ompi_info/ompi_info.c @@ -239,7 +239,6 @@ int main(int argc, char *argv[]) opal_pointer_array_add(&mca_types, "odls"); opal_pointer_array_add(&mca_types, "ras"); opal_pointer_array_add(&mca_types, "rmaps"); - opal_pointer_array_add(&mca_types, "rmcast"); opal_pointer_array_add(&mca_types, "rml"); opal_pointer_array_add(&mca_types, "routed"); opal_pointer_array_add(&mca_types, "plm"); @@ -256,7 +255,6 @@ int main(int argc, char *argv[]) opal_pointer_array_add(&mca_types, "errmgr"); opal_pointer_array_add(&mca_types, "ess"); opal_pointer_array_add(&mca_types, "grpcomm"); - opal_pointer_array_add(&mca_types, "db"); opal_pointer_array_add(&mca_types, "notifier"); /* Execute the desired action(s) */ diff --git a/orte/config/orte_configure_options.m4 b/orte/config/orte_configure_options.m4 index 492bfb27d7..eb889353a8 100644 --- a/orte/config/orte_configure_options.m4 +++ b/orte/config/orte_configure_options.m4 @@ -77,25 +77,6 @@ AC_DEFINE_UNQUOTED([ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT], [$orte_want_orterun_prefix_by_default], [Whether we want orterun to effect "--prefix $prefix" by default]) -# -# Do we want reliable multicast enabled? -# - -AC_MSG_CHECKING([if want reliable multicast]) -AC_ARG_ENABLE([multicast], - [AC_HELP_STRING([--enable-multicast], - [Enable reliable multicast messaging (default: disabled)])]) -if test "$enable_multicast" = "yes"; then - AC_MSG_RESULT([yes]) - orte_want_multicast=1 -else - AC_MSG_RESULT([no]) - orte_want_multicast=0 -fi -AC_DEFINE_UNQUOTED([ORTE_ENABLE_MULTICAST], - [$orte_want_multicast], - [Whether we want multicast messaging enabled]) - # # Do we want sensors enabled? @@ -135,16 +116,22 @@ AC_DEFINE_UNQUOTED([ORTE_ENABLE_HEARTBEAT], # # Compile in resilient runtime code # +AC_MSG_CHECKING([if want resilient runtime code enabled]) AC_ARG_ENABLE(resilient-orte, [AC_HELP_STRING([--enable-resilient-orte], [Enable the resilient runtime code.])]) -AS_IF( [test "$enable_resilient_orte" = "yes"], [result=1], [result=0] ) - +if test "$enable_resilient_orte" = "yes"; then + AC_MSG_RESULT([yes]) + orte_enable_resilient_code=1 +else + AC_MSG_RESULT([no]) + orte_enable_resilient_code=0 +fi AM_CONDITIONAL(ORTE_RESIL_ORTE, [test "$enable_resilient_orte" = "yes"]) -AC_DEFINE_UNQUOTED([ORTE_RESIL_ORTE], [$result], +AC_DEFINE_UNQUOTED([ORTE_RESIL_ORTE], [$orte_enable_resilient_code], [Compile a resilient version of Open MPI]) AM_CONDITIONAL(ORTE_ENABLE_EPOCH, [test "$enable_resilient_orte" = "yes"]) -AC_DEFINE_UNQUOTED([ORTE_ENABLE_EPOCH], [$result], +AC_DEFINE_UNQUOTED([ORTE_ENABLE_EPOCH], [$orte_enable_resilient_code], [Support for epoch in the ORTE process name enabled or not]) diff --git a/orte/mca/db/Makefile.am b/orte/mca/db/Makefile.am deleted file mode 100644 index 5129aaf9a5..0000000000 --- a/orte/mca/db/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AM_CPPFLAGS = $(LTDLINCL) - -# main library setup -noinst_LTLIBRARIES = libmca_db.la -libmca_db_la_SOURCES = - -# pkgdata setup -dist_pkgdata_DATA = - -# local files -headers = db.h -libmca_db_la_SOURCES += $(headers) - -# Conditionally install the header files -if WANT_INSTALL_HEADERS -ortedir = $(includedir)/openmpi/$(subdir) -nobase_orte_HEADERS = $(headers) -endif - -include base/Makefile.am - -distclean-local: - rm -f base/static-components.h diff --git a/orte/mca/db/base/Makefile.am b/orte/mca/db/base/Makefile.am deleted file mode 100644 index 1fb7d7495c..0000000000 --- a/orte/mca/db/base/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -dist_pkgdata_DATA += base/help-db-base.txt - -headers += \ - base/base.h - -libmca_db_la_SOURCES += \ - base/db_base_open.c \ - base/db_base_close.c \ - base/db_base_select.c diff --git a/orte/mca/db/base/base.h b/orte/mca/db/base/base.h deleted file mode 100644 index 257046c1ac..0000000000 --- a/orte/mca/db/base/base.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file: - */ - -#ifndef MCA_DB_BASE_H -#define MCA_DB_BASE_H - -#include "orte_config.h" -#include "orte/types.h" - -#include "opal/mca/mca.h" -#include "opal/class/opal_list.h" - -#include "orte/mca/db/db.h" - -BEGIN_C_DECLS - -/* - * Global functions for MCA overall collective open and close - */ - -/** - * Open the db framework - */ -ORTE_DECLSPEC int orte_db_base_open(void); - -/** - * Select a db module - */ -ORTE_DECLSPEC int orte_db_base_select(void); - -/** - * Close the db framework - */ -ORTE_DECLSPEC int orte_db_base_close(void); - -/* - * The verbose channel for debug output - */ -ORTE_DECLSPEC extern int orte_db_base_output; - -ORTE_DECLSPEC extern opal_list_t orte_db_base_components_available; - - -END_C_DECLS - -#endif diff --git a/orte/mca/db/base/db_base_close.c b/orte/mca/db/base/db_base_close.c deleted file mode 100644 index 6c6f045ac1..0000000000 --- a/orte/mca/db/base/db_base_close.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include - -#include "opal/mca/mca.h" -#include "opal/util/output.h" -#include "opal/mca/base/base.h" -#include "opal/mca/base/mca_base_component_repository.h" - -#include "orte/mca/db/base/base.h" - -extern opal_list_t orte_db_base_components_available; - -int -orte_db_base_close(void) -{ - opal_list_item_t *item; - mca_base_component_list_item_t *cli; - - if (NULL != orte_db.finalize) { - orte_db.finalize(); - } - - /* unload all remaining components */ - while (NULL != (item = opal_list_remove_first(&orte_db_base_components_available))) { - orte_db_base_component_t* component; - cli = (mca_base_component_list_item_t *) item; - component = (orte_db_base_component_t*) cli->cli_component; - opal_output_verbose(10, 0, - "orte_db_base_close: module %s unloaded", - component->base_version.mca_component_name); - mca_base_component_repository_release((mca_base_component_t *) component); - OBJ_RELEASE(item); - } - - OBJ_DESTRUCT(&orte_db_base_components_available); - opal_output_close(orte_db_base_output); - return ORTE_SUCCESS; -} - diff --git a/orte/mca/db/base/db_base_open.c b/orte/mca/db/base/db_base_open.c deleted file mode 100644 index 0f6be18707..0000000000 --- a/orte/mca/db/base/db_base_open.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "orte_config.h" -#include "orte/constants.h" - -#include "opal/mca/mca.h" -#include "opal/util/output.h" -#include "opal/mca/base/base.h" -#include "opal/dss/dss_types.h" - -#include "orte/mca/db/base/base.h" - - -/* - * The following file was created by configure. It contains extern - * dbments and the definition of an array of pointers to each - * module's public mca_base_module_t struct. - */ - -#include "orte/mca/db/base/static-components.h" - -opal_list_t orte_db_base_components_available; - -/* provide "NULL" functions */ -static int init(void); -static int finalize(void); -static int store(char *key, void *object, opal_data_type_t type); -static int set_source(orte_process_name_t *name); -static int fetch(char *key, void *object, opal_data_type_t type); -static int update(char *key, void *object, opal_data_type_t type); -static int remove_data(char *key); - -orte_db_base_module_t orte_db = { - init, - finalize, - store, - set_source, - fetch, - update, - remove_data -}; -int orte_db_base_output; - -int -orte_db_base_open(void) -{ - orte_db_base_output = opal_output_open(NULL); - - OBJ_CONSTRUCT(&orte_db_base_components_available, opal_list_t); - - /* Open up all available components */ - if (ORTE_SUCCESS != - mca_base_components_open("db", orte_db_base_output, mca_db_base_static_components, - &orte_db_base_components_available, - true)) { - return ORTE_ERROR; - } - - return ORTE_SUCCESS; -} - -static int init(void) -{ - return ORTE_SUCCESS; -} -static int finalize(void) -{ - return ORTE_SUCCESS; -} -static int store(char *key, void *object, opal_data_type_t type) -{ - return ORTE_SUCCESS; -} -static int set_source(orte_process_name_t *name) -{ - return ORTE_SUCCESS; -} -static int fetch(char *key, void *object, opal_data_type_t type) -{ - return ORTE_SUCCESS; -} -static int update(char *key, void *object, opal_data_type_t type) -{ - return ORTE_SUCCESS; -} -static int remove_data(char *key) -{ - return ORTE_SUCCESS; -} diff --git a/orte/mca/db/base/db_base_select.c b/orte/mca/db/base/db_base_select.c deleted file mode 100644 index aa7c164b91..0000000000 --- a/orte/mca/db/base/db_base_select.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include "opal/class/opal_list.h" -#include "opal/mca/mca.h" -#include "opal/mca/base/base.h" -#include "opal/mca/base/mca_base_component_repository.h" - -#include "orte/mca/db/base/base.h" - -extern opal_list_t orte_db_base_components_available; - -int -orte_db_base_select(void) -{ - orte_db_base_component_t *best_component = NULL; - orte_db_base_module_t *best_module = NULL; - - /* - * Select the best component - */ - if( OPAL_SUCCESS != mca_base_select("db", orte_db_base_output, - &orte_db_base_components_available, - (mca_base_module_t **) &best_module, - (mca_base_component_t **) &best_component) ) { - /* It is okay to not select a component - default - * to using the base NULL component - */ - return ORTE_SUCCESS; - } - - /* Save and init the winner */ - orte_db = *best_module; - if (NULL != orte_db.init) { - orte_db.init(); - } - - return ORTE_SUCCESS; -} diff --git a/orte/mca/db/base/help-db-base.txt b/orte/mca/db/base/help-db-base.txt deleted file mode 100644 index d2715b34ee..0000000000 --- a/orte/mca/db/base/help-db-base.txt +++ /dev/null @@ -1,19 +0,0 @@ - -*- text -*- -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -# This is the US/English general help file for ORTE Errmgr HNP module. -# -[errmgr-hnp:unknown-job-error] -An error has occurred in an unknown job. This generally should not happen -except due to an internal ORTE error. - -Job state: %s - -This information should probably be reported to the OMPI developers. diff --git a/orte/mca/db/daemon/Makefile.am b/orte/mca/db/daemon/Makefile.am deleted file mode 100644 index 190bf5a78a..0000000000 --- a/orte/mca/db/daemon/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - db_daemon.h \ - db_daemon_component.c \ - db_daemon.c - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -if MCA_BUILD_orte_db_daemon_DSO -component_noinst = -component_install = mca_db_daemon.la -else -component_noinst = libmca_db_daemon.la -component_install = -endif - -mcacomponentdir = $(pkglibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_db_daemon_la_CPPFLAGS = $(db_daemon_CPPFLAGS) -mca_db_daemon_la_SOURCES = $(sources) -mca_db_daemon_la_LDFLAGS = -module -avoid-version $(db_daemon_LDFLAGS) -mca_db_daemon_la_LIBADD = $(db_daemon_LIBS) - -noinst_LTLIBRARIES = $(component_noinst) -libmca_db_daemon_la_CPPFLAGS = $(db_daemon_CPPFLAGS) -libmca_db_daemon_la_SOURCES =$(sources) -libmca_db_daemon_la_LDFLAGS = -module -avoid-version $(db_daemon_LDFLAGS) -libmca_db_daemon_la_LIBADD = $(db_daemon_LIBS) diff --git a/orte/mca/db/daemon/configure.m4 b/orte/mca/db/daemon/configure.m4 deleted file mode 100644 index 9bc82d5dbb..0000000000 --- a/orte/mca/db/daemon/configure.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# MCA_db_daemon_CONFIG([action-if-found], [action-if-not-found]) -# ----------------------------------------------------------- -AC_DEFUN([MCA_orte_db_daemon_CONFIG], [ - AC_CONFIG_FILES([orte/mca/db/daemon/Makefile]) - - # cant run this component without multicast - AS_IF([test "$orte_want_multicast" = "1"], - [$1], [$2]) -])dnl diff --git a/orte/mca/db/daemon/db_daemon.c b/orte/mca/db/daemon/db_daemon.c deleted file mode 100644 index 2bf98ebe11..0000000000 --- a/orte/mca/db/daemon/db_daemon.c +++ /dev/null @@ -1,440 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2004-2011 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include - -#include "opal/class/opal_pointer_array.h" -#include "opal/dss/dss_types.h" -#include "opal/util/output.h" - -#include "orte/util/show_help.h" -#include "orte/util/name_fns.h" -#include "orte/mca/errmgr/errmgr.h" -#include "orte/mca/rmcast/rmcast.h" -#include "orte/runtime/orte_globals.h" -#include "orte/runtime/orte_wait.h" - -#include "orte/mca/db/base/base.h" -#include "db_daemon.h" - -static int init(void); -static int finalize(void); -static int store(char *key, void *object, opal_data_type_t type); -static int set_source(orte_process_name_t *name); -static int fetch(char *key, void *object, opal_data_type_t type); -static int update(char *key, void *object, opal_data_type_t type); -static int remove_data(char *key); - -orte_db_base_module_t orte_db_daemon_module = { - init, - finalize, - store, - set_source, - fetch, - update, - remove_data -}; - -/* local types */ -typedef struct { - opal_object_t super; - orte_process_name_t name; - char *key; - int32_t size; - uint8_t *bytes; -} orte_db_data_t; -static void dtconstructor(orte_db_data_t *dt) -{ - dt->key = NULL; - dt->bytes = NULL; - dt->size = 0; -} -static void dtdestructor(orte_db_data_t *dt) -{ - if (NULL != dt->key) { - free(dt->key); - } - if (NULL != dt->bytes) { - free(dt->bytes); - } -} -OBJ_CLASS_INSTANCE(orte_db_data_t, - opal_object_t, - dtconstructor, - dtdestructor); - -/* local variables */ -static orte_vpid_t num_recvd; -static bool ack_reqd; -static opal_pointer_array_t datastore; -static orte_rmcast_channel_t my_group_channel; - -/* local functions */ -static void callback_fn(int status, - orte_rmcast_channel_t channel, - orte_rmcast_seq_t seq_num, - orte_rmcast_tag_t tag, - orte_process_name_t *sender, - opal_buffer_t *buf, void* cbdata); - -static void recv_cmd(int status, - orte_rmcast_channel_t channel, - orte_rmcast_seq_t seq_num, - orte_rmcast_tag_t tag, - orte_process_name_t *sender, - opal_buffer_t *buf, void* cbdata); - -static void recv_ack(int status, - orte_rmcast_channel_t channel, - orte_rmcast_seq_t seq_num, - orte_rmcast_tag_t tag, - orte_process_name_t *sender, - opal_buffer_t *buf, void* cbdata); - -#include MCA_timer_IMPLEMENTATION_HEADER -static inline double gettime(void) __opal_attribute_always_inline__; -static inline double gettime(void) -{ - double wtime; -#if OPAL_TIMER_USEC_NATIVE - wtime = ((double) opal_timer_base_get_usec()) / 1000000.0; -#else - struct timeval tv; - gettimeofday(&tv, NULL); - wtime = tv.tv_sec; - wtime += (double)tv.tv_usec / 1000000.0; -#endif - return wtime; -} -#define TIMER_START(x) (x) = gettime(); -#define TIMER_STOP(y,x) (y) = (gettime() - (x)); - -static int init(void) -{ - int rc; - - if (ORTE_PROC_IS_DAEMON || ORTE_PROC_IS_HNP) { - /* daemons recv data server cmds */ - if (ORTE_SUCCESS != (rc = orte_rmcast.recv_buffer_nb(ORTE_RMCAST_DATA_SERVER_CHANNEL, - ORTE_RMCAST_TAG_DATA, - ORTE_RMCAST_PERSISTENT, - recv_cmd, NULL))) { - ORTE_ERROR_LOG(rc); - } - OBJ_CONSTRUCT(&datastore, opal_pointer_array_t); - opal_pointer_array_init(&datastore, 16, INT_MAX, 16); - } else if (ORTE_PROC_IS_APP) { - /* get my multicast output group */ - orte_rmcast.query_channel(&my_group_channel, NULL); - - /* recv responses */ - if (ORTE_SUCCESS != (rc = orte_rmcast.recv_buffer_nb(my_group_channel, - ORTE_RMCAST_TAG_CMD_ACK, - ORTE_RMCAST_PERSISTENT, - recv_ack, NULL))) { - ORTE_ERROR_LOG(rc); - } - } - return ORTE_SUCCESS; -} - -static int finalize(void) -{ - int i; - orte_db_data_t *dat; - - /* cancel the callbacks */ - if (ORTE_PROC_IS_DAEMON || ORTE_PROC_IS_HNP) { - orte_rmcast.cancel_recv(ORTE_RMCAST_DATA_SERVER_CHANNEL, ORTE_RMCAST_TAG_DATA); - for (i=0; i < datastore.size; i++) { - if (NULL != (dat = (orte_db_data_t*)opal_pointer_array_get_item(&datastore, i))) { - OBJ_RELEASE(dat); - } - } - OBJ_DESTRUCT(&datastore); - } else if (ORTE_PROC_IS_APP) { - orte_rmcast.cancel_recv(my_group_channel, ORTE_RMCAST_TAG_WILDCARD); - } - - return ORTE_SUCCESS; -} - -static int send_data(orte_db_cmd_t cmd, char *key, void *object, opal_data_type_t type) -{ - opal_buffer_t *buf, dat; - orte_job_t *jdata; - orte_proc_t *proc; - orte_job_state_t *job_state; - orte_proc_state_t *proc_state; - int rc; - bool got_response; - opal_byte_object_t bo; - - /* construct the buffer we will use for packing the data */ - buf = OBJ_NEW(opal_buffer_t); - opal_dss.pack(buf, &cmd, 1, ORTE_DB_CMD_T); /* add cmd */ - opal_dss.pack(buf, &my_group_channel, 1, ORTE_RMCAST_CHANNEL_T); /* tell the server my channel */ - opal_dss.pack(buf, &key, 1, OPAL_STRING); /* pack the key */ - - if (NULL != object) { - OBJ_CONSTRUCT(&dat, opal_buffer_t); - /* pack the data */ - switch (type) { - case ORTE_JOB: - jdata = (orte_job_t*)object; - opal_dss.pack(&dat, &jdata, 1, ORTE_JOB); - break; - case ORTE_JOB_STATE: - job_state = (orte_job_state_t*)object; - opal_dss.pack(&dat, job_state, 1, ORTE_JOB_STATE); - break; - - case ORTE_PROC: - proc = (orte_proc_t*)object; - opal_dss.pack(&dat, &proc, 1, ORTE_PROC); - break; - case ORTE_PROC_STATE: - proc_state = (orte_proc_state_t*)object; - opal_dss.pack(&dat, proc_state, 1, ORTE_PROC_STATE); - break; - - default: - orte_show_help("help-db-base.txt", "unrecognized-type", true, type); - rc = ORTE_ERR_BAD_PARAM; - goto cleanup; - break; - } - opal_dss.unload(&dat, (void**)&bo.bytes, &bo.size); - opal_dss.pack(buf, &bo.size, 1, OPAL_INT32); - opal_dss.pack(buf, &bo.bytes, bo.size, OPAL_UINT8); - OBJ_DESTRUCT(&dat); - free(bo.bytes); - } - - got_response = false; - num_recvd = 0; - ack_reqd = true; - - /* send the data to all the daemons */ - if (ORTE_SUCCESS != (rc = orte_rmcast.send_buffer_nb(ORTE_RMCAST_DATA_SERVER_CHANNEL, - ORTE_RMCAST_TAG_DATA, buf, - callback_fn, NULL))) { - ORTE_ERROR_LOG(rc); - } - /* wait for all daemons to ack the request */ - ORTE_PROGRESSED_WAIT(got_response, num_recvd, orte_process_info.num_daemons); - ack_reqd = false; - -cleanup: - return rc; -} - -static int store(char *key, void *object, opal_data_type_t type) -{ - int rc; - double start; - double cpu_time_used; - - TIMER_START(start); - - if (ORTE_SUCCESS != (rc = send_data(ORTE_DB_STORE_CMD, key, object, type))) { - ORTE_ERROR_LOG(rc); - } - - TIMER_STOP(cpu_time_used, start); - opal_output(0, "%s TOOK %g usecs TO STORE", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - cpu_time_used * 1000000.0); - - return rc; -} - -static int set_source(orte_process_name_t *name) -{ - return ORTE_SUCCESS; -} - -static int fetch(char *key, void *object, opal_data_type_t type) -{ - int rc; - double cpu_time_used, start; - - TIMER_START(start); - - if (ORTE_SUCCESS != (rc = send_data(ORTE_DB_FETCH_CMD, key, NULL, OPAL_INT32))) { - ORTE_ERROR_LOG(rc); - } - - TIMER_STOP(cpu_time_used, start); - opal_output(0, "%s TOOK %g usecs TO FETCH", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - cpu_time_used * 1000000.0); - - return ORTE_SUCCESS; -} - -static int update(char *key, void *object, opal_data_type_t type) -{ - int rc; - double start; - double cpu_time_used; - - TIMER_START(start); - - if (ORTE_SUCCESS != (rc = send_data(ORTE_DB_UPDATE_CMD, key, object, type))) { - ORTE_ERROR_LOG(rc); - } - - TIMER_STOP(cpu_time_used, start); - opal_output(0, "%s TOOK %g usecs TO UPDATE", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - cpu_time_used * 1000000.0); - - return rc; -} - -static int remove_data(char *key) -{ - int rc; - double start; - double cpu_time_used; - - TIMER_START(start); - - if (ORTE_SUCCESS != (rc = send_data(ORTE_DB_REMOVE_CMD, key, NULL, OPAL_INT32))) { - ORTE_ERROR_LOG(rc); - } - - TIMER_STOP(cpu_time_used, start); - opal_output(0, "%s TOOK %g usecs TO REMOVE", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - cpu_time_used * 1000000.0); - - return rc; -} - -static void callback_fn(int status, - orte_rmcast_channel_t channel, - orte_rmcast_seq_t seq_num, - orte_rmcast_tag_t tag, - orte_process_name_t *sender, - opal_buffer_t *buf, void* cbdata) -{ - OBJ_RELEASE(buf); -} - -static void recv_ack(int status, - orte_rmcast_channel_t channel, - orte_rmcast_seq_t seq_num, - orte_rmcast_tag_t tag, - orte_process_name_t *sender, - opal_buffer_t *buf, void* cbdata) -{ - if (ack_reqd) { - num_recvd++; - } -} - -static void recv_cmd(int status, - orte_rmcast_channel_t channel, - orte_rmcast_seq_t seq_num, - orte_rmcast_tag_t tag, - orte_process_name_t *sender, - opal_buffer_t *buf, void* cbdata) -{ - orte_db_cmd_t cmd; - opal_buffer_t *ans; - int count, i; - int32_t rc; - char *key; - orte_db_data_t *dat; - orte_rmcast_channel_t ch; - char *ch_name; - - OPAL_OUTPUT_VERBOSE((2, orte_db_base_output, - "%s db:daemon: cmd recvd from %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(sender))); - - count=1; - opal_dss.unpack(buf, &cmd, &count, ORTE_DB_CMD_T); - count=1; - opal_dss.unpack(buf, &ch, &count, ORTE_RMCAST_CHANNEL_T); - count=1; - opal_dss.unpack(buf, &ch_name, &count, OPAL_STRING); - count=1; - opal_dss.unpack(buf, &key, &count, OPAL_STRING); - - ans = OBJ_NEW(opal_buffer_t); - opal_dss.pack(ans, &cmd, 1, ORTE_DB_CMD_T); - - switch (cmd) { - case ORTE_DB_STORE_CMD: - dat = OBJ_NEW(orte_db_data_t); - dat->name.jobid = sender->jobid; - dat->name.vpid = sender->vpid; - ORTE_EPOCH_SET(dat->name.epoch,sender->epoch); - dat->key = key; - count=1; - opal_dss.unpack(buf, &dat->size, &count, OPAL_INT32); - dat->bytes = (uint8_t*)malloc(dat->size); - opal_dss.unpack(buf, dat->bytes, &dat->size, OPAL_UINT8); - opal_pointer_array_add(&datastore, dat); - OPAL_OUTPUT_VERBOSE((2, orte_db_base_output, - "%s db:daemon: data from %s stored: key %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(sender), key)); - rc = ORTE_SUCCESS; - opal_dss.pack(ans, &rc, 1, OPAL_INT32); - break; - case ORTE_DB_FETCH_CMD: - /* find the key */ - for (i=0; i < datastore.size; i++) { - if (NULL == (dat = (orte_db_data_t*)opal_pointer_array_get_item(&datastore, i))) { - continue; - } - if (0 != strcmp(key, dat->key)) { - continue; - } - /* found the data - return it */ - rc = ORTE_SUCCESS; - opal_dss.pack(ans, &rc, 1, OPAL_INT32); - opal_dss.pack(ans, &dat->size, 1, OPAL_INT32); - opal_dss.pack(ans, dat->bytes, dat->size, OPAL_UINT8); - OPAL_OUTPUT_VERBOSE((2, orte_db_base_output, - "%s db:daemon: data fetched for %s: key %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(sender), key)); - break; - } - rc = ORTE_ERR_NOT_FOUND; - opal_dss.pack(ans, &rc, 1, OPAL_INT32); - OPAL_OUTPUT_VERBOSE((2, orte_db_base_output, - "%s db:daemon: data fetch request from %s not found: key %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(sender), key)); - break; - - default: - rc = ORTE_ERR_NOT_FOUND; - break; - } - - /* ensure the return channel is open */ - orte_rmcast.open_channel(ch, ch_name, NULL, -1, NULL, ORTE_RMCAST_XMIT); - - orte_rmcast.send_buffer_nb(ch, ORTE_RMCAST_TAG_CMD_ACK, ans, callback_fn, NULL); -} diff --git a/orte/mca/db/daemon/db_daemon.h b/orte/mca/db/daemon/db_daemon.h deleted file mode 100644 index 6abfcb9440..0000000000 --- a/orte/mca/db/daemon/db_daemon.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef ORTE_DB_DAEMON_H -#define ORTE_DB_DAEMON_H - -#include "orte/mca/db/db.h" - -BEGIN_C_DECLS - -/* - * Module open / close - */ -int orte_db_daemon_component_open(void); -int orte_db_daemon_component_close(void); -int orte_db_daemon_component_query(mca_base_module_t **module, int *priority); - - -ORTE_MODULE_DECLSPEC extern orte_db_base_component_t mca_db_daemon_component; -ORTE_DECLSPEC extern orte_db_base_module_t orte_db_daemon_module; -extern char *orte_db_daemon_directory; - -END_C_DECLS - -#endif /* ORTE_DB_DAEMON_H */ diff --git a/orte/mca/db/daemon/db_daemon_component.c b/orte/mca/db/daemon/db_daemon_component.c deleted file mode 100644 index 248d812711..0000000000 --- a/orte/mca/db/daemon/db_daemon_component.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - * These symbols are in a file by themselves to provide nice linker - * semantics. Since linkers generally pull in symbols by object - * files, keeping these symbols as the only symbols in this file - * prevents utility programs such as "ompi_info" from having to import - * entire components just to query their version and parameters. - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#ifdef HAVE_STRINGS_H -#include -#endif - -#include "opal/mca/base/base.h" -#include "opal/mca/base/mca_base_param.h" - -#include "orte/util/proc_info.h" - -#include "orte/mca/db/db.h" -#include "orte/mca/db/base/base.h" -#include "db_daemon.h" - -extern orte_db_base_module_t orte_db_daemon_module; -char *orte_db_daemon_directory; - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ -orte_db_base_component_t mca_db_daemon_component = { - { - ORTE_DB_BASE_VERSION_1_0_0, - - /* Component name and version */ - "daemon", - ORTE_MAJOR_VERSION, - ORTE_MINOR_VERSION, - ORTE_RELEASE_VERSION, - - /* Component open and close functions */ - orte_db_daemon_component_open, - orte_db_daemon_component_close, - orte_db_daemon_component_query - }, - { - /* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - } -}; - - -int -orte_db_daemon_component_open(void) -{ - return ORTE_SUCCESS; -} - -/* only select us if specifically requested */ -int orte_db_daemon_component_query(mca_base_module_t **module, int *priority) -{ - char *req; - - if (NULL != (req = getenv("OMPI_MCA_db"))) { - if (0 == strcasecmp(req, "daemon")) { - *priority = 100; - *module = (mca_base_module_t*)&orte_db_daemon_module; - return ORTE_SUCCESS; - } - } - - *priority = 0; - *module = NULL; - return ORTE_ERROR; -} - - -int -orte_db_daemon_component_close(void) -{ - return ORTE_SUCCESS; -} - diff --git a/orte/mca/db/db.h b/orte/mca/db/db.h deleted file mode 100644 index 5634385618..0000000000 --- a/orte/mca/db/db.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file: - * - * The OpenRTE State Save/Recovery Service - * - */ - -#ifndef ORTE_DB_H -#define ORTE_DB_H - -#include "orte_config.h" -#include "orte/types.h" - -#include "opal/mca/mca.h" -#include "opal/dss/dss_types.h" - -BEGIN_C_DECLS - -/* - * API functions - */ - -typedef uint8_t orte_db_cmd_t; -#define ORTE_DB_CMD_T OPAL_UINT8 - -#define ORTE_DB_STORE_CMD 0x01 -#define ORTE_DB_FETCH_CMD 0X02 -#define ORTE_DB_UPDATE_CMD 0x03 -#define ORTE_DB_REMOVE_CMD 0x04 - -/* - * Initialize the module - */ -typedef int (*orte_db_base_module_init_fn_t)(void); - -/* - * Finalize the module - */ -typedef int (*orte_db_base_module_finalize_fn_t)(void); - -/* - * Save the db of the provided object - */ -typedef int (*orte_db_base_module_store_fn_t)(char *key, void *object, opal_data_type_t type); - -/* - * Set the source for recovering db info - */ -typedef int (*orte_db_base_module_set_source_fn_t)(orte_process_name_t *name); - -/* - * Retrieve data - */ -typedef int (*orte_db_base_module_fetch_fn_t)(char *key, void *object, opal_data_type_t type); - -/* - * Update data - */ -typedef int (*orte_db_base_module_update_fn_t)(char *key, void *object, opal_data_type_t type); - -/* - * Delete data - */ -typedef int (*orte_db_base_module_remove_fn_t)(char *key); - -/* - * the standard module data structure - */ -struct orte_db_base_module_1_0_0_t { - orte_db_base_module_init_fn_t init; - orte_db_base_module_finalize_fn_t finalize; - orte_db_base_module_store_fn_t store; - orte_db_base_module_set_source_fn_t set_source; - orte_db_base_module_fetch_fn_t fetch; - orte_db_base_module_update_fn_t update; - orte_db_base_module_remove_fn_t remove; -}; -typedef struct orte_db_base_module_1_0_0_t orte_db_base_module_1_0_0_t; -typedef struct orte_db_base_module_1_0_0_t orte_db_base_module_t; - -/* - * the standard component data structure - */ -struct orte_db_base_component_1_0_0_t { - mca_base_component_t base_version; - mca_base_component_data_t base_data; -}; -typedef struct orte_db_base_component_1_0_0_t orte_db_base_component_1_0_0_t; -typedef struct orte_db_base_component_1_0_0_t orte_db_base_component_t; - -/* - * Macro for use in components that are of type db - */ -#define ORTE_DB_BASE_VERSION_1_0_0 \ - MCA_BASE_VERSION_2_0_0, \ - "db", 1, 0, 0 - -/* Global structure for accessing DB functions */ -ORTE_DECLSPEC extern orte_db_base_module_t orte_db; /* holds selected module's function pointers */ - -END_C_DECLS - -#endif diff --git a/orte/mca/db/dbase/Makefile.am b/orte/mca/db/dbase/Makefile.am deleted file mode 100644 index 99d2e1a681..0000000000 --- a/orte/mca/db/dbase/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - db_dbase.h \ - db_dbase_component.c \ - db_dbase.c - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -if MCA_BUILD_orte_db_dbase_DSO -component_noinst = -component_install = mca_db_dbase.la -else -component_noinst = libmca_db_dbase.la -component_install = -endif - -mcacomponentdir = $(pkglibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_db_dbase_la_CPPFLAGS = $(db_dbase_CPPFLAGS) -mca_db_dbase_la_SOURCES = $(sources) -mca_db_dbase_la_LDFLAGS = -module -avoid-version $(db_dbase_LDFLAGS) -mca_db_dbase_la_LIBADD = $(db_dbase_LIBS) - -noinst_LTLIBRARIES = $(component_noinst) -libmca_db_dbase_la_CPPFLAGS = $(db_dbase_CPPFLAGS) -libmca_db_dbase_la_SOURCES =$(sources) -libmca_db_dbase_la_LDFLAGS = -module -avoid-version $(db_dbase_LDFLAGS) -libmca_db_dbase_la_LIBADD = $(db_dbase_LIBS) diff --git a/orte/mca/db/dbase/configure.m4 b/orte/mca/db/dbase/configure.m4 deleted file mode 100644 index 26195bd3dc..0000000000 --- a/orte/mca/db/dbase/configure.m4 +++ /dev/null @@ -1,30 +0,0 @@ -dnl -*- shell-script -*- -dnl -dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -dnl $COPYRIGHT$ -dnl -dnl Additional copyrights may follow -dnl -dnl $HEADER$ -dnl - -# MCA_db_dbase_CONFIG([action-if-found], [action-if-not-found]) -# ----------------------------------------------------------- -AC_DEFUN([MCA_orte_db_dbase_CONFIG], [ - AC_CONFIG_FILES([orte/mca/db/dbase/Makefile]) - - # only build if db.h and its corresponding library are found - OMPI_CHECK_PACKAGE([db_db], - [db.h], - [db], - [dbopen], - [], - [], - [], - [$1], - [$2])]) - - AC_SUBST(db_dbase_CPPFLAGS) - AC_SUBST(db_dbase_LDFLAGS) - AC_SUBST(db_dbase_LIBS) -])dnl diff --git a/orte/mca/db/dbase/db_dbase.c b/orte/mca/db/dbase/db_dbase.c deleted file mode 100644 index deaa615685..0000000000 --- a/orte/mca/db/dbase/db_dbase.c +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include -#include -#ifdef HAVE_LIMITS_H -#include -#endif -#include -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#include - -#include "opal/dss/dss_types.h" -#include "opal/util/os_dirpath.h" -#include "opal/util/os_path.h" -#include "opal/util/output.h" -#include "opal/util/malloc.h" -#include "opal/util/basename.h" -#include "opal/mca/pstat/base/base.h" -#include "opal/mca/paffinity/base/base.h" -#include "opal/mca/sysinfo/base/base.h" - -#include "orte/util/show_help.h" -#include "orte/mca/errmgr/base/base.h" -#include "orte/runtime/orte_globals.h" - -#include "db_dbase.h" - -static int init(void); -static int finalize(void); -static int insert(char *key, void *object, opal_data_type_t type); -static int set_recover_source(orte_process_name_t *name); -static int select_data(char *key, void *object, opal_data_type_t type); -static int update(char *key, void *object, opal_data_type_t type); -static int delete_data(char *key); - -orte_db_base_module_t orte_db_dbase_module = { - init, - finalize, - insert, - set_recover_source, - select_data, - update, - delete_data -}; - -/* local variables */ -static DB *save_dbase=NULL, *recover_dbase=NULL; - -static int init(void) -{ - char *path, *name; - - /* setup the database */ - if (ORTE_SUCCESS != opal_os_dirpath_create(orte_db_dbase_directory, S_IRWXU)) { - orte_show_help("help-db-dbase.txt", "cannot-create-dir", true, - orte_db_dbase_directory); - return ORTE_ERR_FILE_OPEN_FAILURE; - } - orte_util_convert_process_name_to_string(&name, ORTE_PROC_MY_NAME); - path = opal_os_path(false, orte_db_dbase_directory, name, NULL); - free(name); - if (NULL == (save_dbase = dbaseopen(path, O_CREAT | O_RDWR | O_TRUNC, S_IRWXU, DB_HASH, NULL))) { - orte_show_help("help-db-dbase.txt", "cannot-create-dbase", true, path); - free(path); - return ORTE_ERR_FILE_OPEN_FAILURE; - } - free(path); - - return ORTE_SUCCESS; -} - -static int finalize(void) -{ - /* if we are normally terminating, remove the recovery file */ - - return ORTE_SUCCESS; -} - -static int insert(char *inkey, void *object, opal_data_type_t type) -{ - DBT key, data; - opal_buffer_t buf; - orte_job_t *jdata; - orte_proc_t *proc; - int rc=ORTE_SUCCESS, size; - - /* construct the buffer we will use for packing the data */ - OBJ_CONSTRUCT(&buf, opal_buffer_t); - key.data = inkey; - key.size = strlen(key.data); - - switch (type) { - case ORTE_JOB: - jdata = (orte_job_t*)object; - opal_dss.pack(&buf, &jdata, 1, ORTE_JOB); - break; - case ORTE_PROC: - proc = (orte_proc_t*)object; - opal_dss.pack(&buf, &proc, 1, ORTE_PROC); - break; - default: - orte_show_help("help-db-dbase.txt", "unrecognized-type", true, type); - rc = ORTE_ERR_BAD_PARAM; - goto cleanup; - break; - } - - /* unload the data */ - opal_dss.unload(&buf, (void**)&data.data, &size); - data.size = size; - OBJ_DESTRUCT(&buf); - - /* put the info into the dbase */ - if (0 > save_dbase->put(save_dbase, &key, &data, 0)) { - orte_show_help("help-db-dbase.txt", "error-writing-dbase", true, (char*)key.data, strerror(errno)); - rc = ORTE_ERR_FILE_WRITE_FAILURE; - } - /* sync it to force it to disk */ - if (0 > save_dbase->sync(save_dbase, 0)) { - orte_show_help("help-db-dbase.txt", "error-syncing-dbase", true, (char*)key.data, strerror(errno)); - rc = ORTE_ERR_FILE_WRITE_FAILURE; - } - -cleanup: - /* cleanup */ - if (NULL != key.data) { - free(key.data); - } - if (NULL != data.data) { - free(data.data); - } - return rc; -} - -static int set_recover_source(orte_process_name_t *name) -{ - char *path, *pname; - int rc=ORTE_SUCCESS; - - /* setup the database */ - orte_util_convert_process_name_to_string(&pname, name); - path = opal_os_path(false, orte_db_dbase_directory, pname, NULL); - free(pname); - if (NULL == (recover_dbase = dbaseopen(path, O_RDONLY, S_IRWXU, DB_HASH, NULL))) { - orte_show_help("help-db-dbase.txt", "cannot-open-dbase", true, path); - free(path); - return ORTE_ERR_FILE_OPEN_FAILURE; - } - free(path); - - return rc; -} - -static int select_data(char *inkey, void *object, opal_data_type_t type) -{ - DBT key, data; - opal_buffer_t buf; - orte_job_t *jdata; - orte_proc_t *proc; - int rc=ORTE_SUCCESS; - int32_t n; - - if (NULL == recover_dbase) { - orte_show_help("help-db-dbase.txt", "recover-source-undef", true); - rc = ORTE_ERR_NOT_FOUND; - } - - /* construct the buffer we will use for unpacking the data */ - OBJ_CONSTRUCT(&buf, opal_buffer_t); - key.data = inkey; - key.size = strlen(key.data); - - /* get the specified data */ - if (0 > recover_dbase->get(recover_dbase, &key, &data, 0)) { - orte_show_help("help-db-dbase.txt", "error-reading-dbase", true, (char*)key.data, strerror(errno)); - rc = ORTE_ERR_FILE_READ_FAILURE; - goto cleanup; - } - - /* populate the recovered info */ - opal_dss.load(&buf, data.data, data.size); - switch (type) { - case ORTE_JOB: - n=1; - opal_dss.unpack(&buf, &jdata, &n, ORTE_JOB); - break; - case ORTE_PROC: - n=1; - opal_dss.unpack(&buf, &proc, &n, ORTE_PROC); - break; - default: - break; - } - -cleanup: - OBJ_DESTRUCT(&buf); - return rc; -} - -static int update(char *key, void *object, opal_data_type_t type) -{ - return ORTE_ERR_NOT_IMPLEMENTED; -} - -static int delete_data(char *key) -{ - return ORTE_ERR_NOT_IMPLEMENTED; -} diff --git a/orte/mca/db/dbase/db_dbase.h b/orte/mca/db/dbase/db_dbase.h deleted file mode 100644 index ede0b884c4..0000000000 --- a/orte/mca/db/dbase/db_dbase.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef ORTE_DB_DBASE_H -#define ORTE_DB_DBASE_H - -#include "orte/mca/db/db.h" - -BEGIN_C_DECLS - -/* - * Module open / close - */ -int orte_db_dbase_component_open(void); -int orte_db_dbase_component_close(void); -int orte_db_dbase_component_query(mca_base_module_t **module, int *priority); - - -ORTE_MODULE_DECLSPEC extern orte_db_base_component_t mca_db_dbase_component; -ORTE_DECLSPEC extern orte_db_base_module_t orte_db_dbase_module; -extern char *orte_db_dbase_directory; - -END_C_DECLS - -#endif /* ORTE_DB_DBASE_H */ diff --git a/orte/mca/db/dbase/db_dbase_component.c b/orte/mca/db/dbase/db_dbase_component.c deleted file mode 100644 index 80c21b6af2..0000000000 --- a/orte/mca/db/dbase/db_dbase_component.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - * These symbols are in a file by themselves to provide nice linker - * semantics. Since linkers generally pull in symbols by object - * files, keeping these symbols as the only symbols in this file - * prevents utility programs such as "ompi_info" from having to import - * entire components just to query their version and parameters. - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include "opal/mca/base/base.h" -#include "opal/mca/base/mca_base_param.h" - -#include "orte/util/proc_info.h" - -#include "orte/mca/db/db.h" -#include "orte/mca/db/base/base.h" -#include "db_dbase.h" - -extern orte_db_base_module_t orte_db_dbase_module; -char *orte_db_dbase_directory; - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ -orte_db_base_component_t mca_db_dbase_component = { - { - ORTE_DB_BASE_VERSION_1_0_0, - - /* Component name and version */ - "dbase", - ORTE_MAJOR_VERSION, - ORTE_MINOR_VERSION, - ORTE_RELEASE_VERSION, - - /* Component open and close functions */ - orte_db_dbase_component_open, - orte_db_dbase_component_close, - orte_db_dbase_component_query - }, - { - /* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - } -}; - - -int -orte_db_dbase_component_open(void) -{ - return ORTE_SUCCESS; -} - - -int orte_db_dbase_component_query(mca_base_module_t **module, int *priority) -{ - - /* we are the file module - we need to be selected - * IFF we are requested - */ - bool is_required = false; - mca_base_component_t *c = &mca_db_dbase_component.base_version; - - /* retrieve the name of the file to be used */ - mca_base_param_reg_string(c, "dir", - "Name of directory to be used for storing and recovering db information", - false, false, NULL, &orte_db_dbase_directory); - - mca_base_is_component_required(&orte_db_base_components_available, - &mca_db_dbase_component.base_version, - true, - &is_required); - - if (is_required && NULL != orte_db_dbase_directory) { - *priority = 1000; - *module = (mca_base_module_t*)&orte_db_dbase_module; - return ORTE_SUCCESS; - } - - - *priority = 0; - *module = NULL; - return ORTE_ERROR; -} - - -int -orte_db_dbase_component_close(void) -{ - return ORTE_SUCCESS; -} - diff --git a/orte/mca/db/dbm/Makefile.am b/orte/mca/db/dbm/Makefile.am deleted file mode 100644 index dbfbf51542..0000000000 --- a/orte/mca/db/dbm/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -sources = \ - db_dbm.h \ - db_dbm_component.c \ - db_dbm.c - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -if MCA_BUILD_orte_db_dbm_DSO -component_noinst = -component_install = mca_db_dbm.la -else -component_noinst = libmca_db_dbm.la -component_install = -endif - -mcacomponentdir = $(pkglibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_db_dbm_la_CPPFLAGS = $(db_dbm_CPPFLAGS) -mca_db_dbm_la_SOURCES = $(sources) -mca_db_dbm_la_LDFLAGS = -module -avoid-version $(db_dbm_LDFLAGS) -mca_db_dbm_la_LIBADD = $(db_dbm_LIBS) - -noinst_LTLIBRARIES = $(component_noinst) -libmca_db_dbm_la_CPPFLAGS = $(db_dbm_CPPFLAGS) -libmca_db_dbm_la_SOURCES =$(sources) -libmca_db_dbm_la_LDFLAGS = -module -avoid-version $(db_dbm_LDFLAGS) -libmca_db_dbm_la_LIBADD = $(db_dbm_LIBS) diff --git a/orte/mca/db/dbm/configure.m4 b/orte/mca/db/dbm/configure.m4 deleted file mode 100644 index 5997880b76..0000000000 --- a/orte/mca/db/dbm/configure.m4 +++ /dev/null @@ -1,30 +0,0 @@ -dnl -*- shell-script -*- -dnl -dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -dnl $COPYRIGHT$ -dnl -dnl Additional copyrights may follow -dnl -dnl $HEADER$ -dnl - -# MCA_db_dbm_CONFIG([action-if-found], [action-if-not-found]) -# ----------------------------------------------------------- -AC_DEFUN([MCA_orte_db_dbm_CONFIG], [ - AC_CONFIG_FILES([orte/mca/db/dbm/Makefile]) - - # only build if ndbm.h and its library are found - OMPI_CHECK_PACKAGE([db_dbm], - [ndbm.h], - [dbm], - [dbm_open], - [], - [], - [], - [$1], - [$2])]) - - AC_SUBST(db_dbm_CPPFLAGS) - AC_SUBST(db_dbm_LDFLAGS) - AC_SUBST(db_dbm_LIBS) -])dnl diff --git a/orte/mca/db/dbm/db_dbm.c b/orte/mca/db/dbm/db_dbm.c deleted file mode 100644 index dac4faa816..0000000000 --- a/orte/mca/db/dbm/db_dbm.c +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include -#include -#ifdef HAVE_LIMITS_H -#include -#endif -#include -#ifdef HAVE_FCNTL_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#include - -#include "opal/dss/dss_types.h" -#include "opal/util/os_dirpath.h" -#include "opal/util/os_path.h" -#include "opal/util/output.h" -#include "opal/util/malloc.h" -#include "opal/util/basename.h" -#include "opal/mca/pstat/base/base.h" -#include "opal/mca/paffinity/base/base.h" - -#include "orte/util/show_help.h" -#include "orte/mca/errmgr/base/base.h" -#include "orte/runtime/orte_globals.h" - -#include "db_dbm.h" - -static int init(void); -static int finalize(void); -static int insert(char *key, void *object, opal_data_type_t type); -static int set_recover_source(orte_process_name_t *name); -static int select_data(char *key, void *object, opal_data_type_t type); -static int update(char *key, void *object, opal_data_type_t type); -static int delete_data(char *key); - -orte_db_base_module_t orte_db_dbm_module = { - init, - finalize, - insert, - set_recover_source, - select_data, - update, - delete_data -}; - -/* local variables */ -static DBM *save_dbm=NULL, *recover_dbm=NULL; - -static int init(void) -{ - char *path, *name; - - /* setup the database */ - if (ORTE_SUCCESS != opal_os_dirpath_create(orte_db_dbm_directory, S_IRWXU)) { - orte_show_help("help-db-dbm.txt", "cannot-create-dir", true, - orte_db_dbm_directory); - return ORTE_ERR_FILE_OPEN_FAILURE; - } - orte_util_convert_process_name_to_string(&name, ORTE_PROC_MY_NAME); - path = opal_os_path(false, orte_db_dbm_directory, name, NULL); - free(name); - if (NULL == (save_dbm = dbm_open(path, O_CREAT | O_RDWR | O_TRUNC, S_IRWXU))) { - orte_show_help("help-db-dbm.txt", "cannot-create-dbm", true, path); - free(path); - return ORTE_ERR_FILE_OPEN_FAILURE; - } - free(path); - - return ORTE_SUCCESS; -} - -static int finalize(void) -{ - /* if we are normally terminating, remove the recovery file */ - - return ORTE_SUCCESS; -} - -static int insert(char *inkey, void *object, opal_data_type_t type) -{ - datum key, data; - opal_buffer_t buf; - orte_job_t *jdata; - orte_proc_t *proc; - int rc=ORTE_SUCCESS, size; - - /* construct the buffer we will use for packing the data */ - OBJ_CONSTRUCT(&buf, opal_buffer_t); - key.dptr = inkey; - key.dsize = strlen(key.dptr); - data.dptr = NULL; - - switch (type) { - case ORTE_JOB: - jdata = (orte_job_t*)object; - opal_dss.pack(&buf, &jdata, 1, ORTE_JOB); - break; - case ORTE_PROC: - proc = (orte_proc_t*)object; - opal_dss.pack(&buf, &proc, 1, ORTE_PROC); - break; - default: - orte_show_help("help-db-db.txt", "unrecognized-type", true, type); - rc = ORTE_ERR_BAD_PARAM; - goto cleanup; - break; - } - - /* unload the data */ - opal_dss.unload(&buf, (void**)&data.dptr, &size); - data.dsize = size; - OBJ_DESTRUCT(&buf); - - /* put the info into the dbm */ - if (0 > dbm_store(save_dbm, key, data, DBM_REPLACE)) { - orte_show_help("help-db-dbm.txt", "error-writing-dbm", true, (char*)key.dptr, strerror(errno)); - rc = ORTE_ERR_FILE_WRITE_FAILURE; - } - -cleanup: - /* cleanup */ - if (NULL != key.dptr) { - free(key.dptr); - } - if (NULL != data.dptr) { - free(data.dptr); - } - return rc; -} - -static int set_recover_source(orte_process_name_t *name) -{ - char *path, *pname; - int rc=ORTE_SUCCESS; - - /* setup the database */ - orte_util_convert_process_name_to_string(&pname, name); - path = opal_os_path(false, orte_db_dbm_directory, pname, NULL); - free(pname); - if (NULL == (recover_dbm = dbm_open(path, O_RDONLY, S_IRWXU))) { - orte_show_help("help-db-dbm.txt", "cannot-open-dbm", true, path); - free(path); - return ORTE_ERR_FILE_OPEN_FAILURE; - } - free(path); - - return rc; -} - -static int select_data(char *inkey, void *object, opal_data_type_t type) -{ - datum key, data; - opal_buffer_t buf; - orte_job_t *jdata; - orte_proc_t *proc; - int rc=ORTE_SUCCESS; - int32_t n; - - if (NULL == recover_dbm) { - orte_show_help("help-db-dbm.txt", "recover-source-undef", true); - rc = ORTE_ERR_NOT_FOUND; - } - - /* construct the buffer we will use for unpacking the data */ - OBJ_CONSTRUCT(&buf, opal_buffer_t); - key.dptr = inkey; - key.dsize = strlen(key.dptr); - data.dptr = NULL; - - /* get the specified data */ - data = dbm_fetch(recover_dbm, key); - if (NULL == data.dptr) { - orte_show_help("help-db-dbm.txt", "error-reading-dbm", true, (char*)key.dptr, strerror(errno)); - rc = ORTE_ERR_FILE_READ_FAILURE; - goto cleanup; - } - - /* populate the recovered info */ - opal_dss.load(&buf, data.dptr, data.dsize); - switch (type) { - case ORTE_JOB: - n=1; - opal_dss.unpack(&buf, &jdata, &n, ORTE_JOB); - break; - case ORTE_PROC: - n=1; - opal_dss.unpack(&buf, &proc, &n, ORTE_PROC); - break; - default: - break; - } - -cleanup: - OBJ_DESTRUCT(&buf); - return rc; -} - -static int update(char *key, void *object, opal_data_type_t type) -{ - return ORTE_ERR_NOT_IMPLEMENTED; -} - -static int delete_data(char *key) -{ - return ORTE_ERR_NOT_IMPLEMENTED; -} diff --git a/orte/mca/db/dbm/db_dbm.h b/orte/mca/db/dbm/db_dbm.h deleted file mode 100644 index c7b68d5fbd..0000000000 --- a/orte/mca/db/dbm/db_dbm.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#ifndef ORTE_DB_DBM_H -#define ORTE_DB_DBM_H - -#include "orte/mca/db/db.h" - -BEGIN_C_DECLS - -/* - * Module open / close - */ -int orte_db_dbm_component_open(void); -int orte_db_dbm_component_close(void); -int orte_db_dbm_component_query(mca_base_module_t **module, int *priority); - - -ORTE_MODULE_DECLSPEC extern orte_db_base_component_t mca_db_dbm_component; -ORTE_DECLSPEC extern orte_db_base_module_t orte_db_dbm_module; -extern char *orte_db_dbm_directory; - -END_C_DECLS - -#endif /* ORTE_DB_DBM_H */ diff --git a/orte/mca/db/dbm/db_dbm_component.c b/orte/mca/db/dbm/db_dbm_component.c deleted file mode 100644 index e4b9066f20..0000000000 --- a/orte/mca/db/dbm/db_dbm_component.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - * - * These symbols are in a file by themselves to provide nice linker - * semantics. Since linkers generally pull in symbols by object - * files, keeping these symbols as the only symbols in this file - * prevents utility programs such as "ompi_info" from having to import - * entire components just to query their version and parameters. - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include "opal/mca/base/base.h" -#include "opal/mca/base/mca_base_param.h" - -#include "orte/util/proc_info.h" - -#include "orte/mca/db/db.h" -#include "orte/mca/db/base/base.h" -#include "db_dbm.h" - -extern orte_db_base_module_t orte_db_dbm_module; -char *orte_db_dbm_directory; - -/* - * Instantiate the public struct with all of our public information - * and pointers to our public functions in it - */ -orte_db_base_component_t mca_db_dbm_component = { - { - ORTE_DB_BASE_VERSION_1_0_0, - - /* Component name and version */ - "dbm", - ORTE_MAJOR_VERSION, - ORTE_MINOR_VERSION, - ORTE_RELEASE_VERSION, - - /* Component open and close functions */ - orte_db_dbm_component_open, - orte_db_dbm_component_close, - orte_db_dbm_component_query - }, - { - /* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - } -}; - - -int -orte_db_dbm_component_open(void) -{ - return ORTE_SUCCESS; -} - - -int orte_db_dbm_component_query(mca_base_module_t **module, int *priority) -{ - mca_base_component_t *c = &mca_db_dbm_component.base_version; - - /* retrieve the name of the file to be used */ - mca_base_param_reg_string(c, "dir", - "Name of directory to be used for storing and recovering db information", - false, false, NULL, &orte_db_dbm_directory); - - if (NULL != orte_db_dbm_directory) { - *priority = 50; - *module = (mca_base_module_t*)&orte_db_dbm_module; - return ORTE_SUCCESS; - } - - - *priority = 0; - *module = NULL; - return ORTE_ERROR; -} - - -int -orte_db_dbm_component_close(void) -{ - return ORTE_SUCCESS; -} - diff --git a/orte/mca/debugger/mpir/configure.m4 b/orte/mca/debugger/mpir/configure.m4 new file mode 100644 index 0000000000..d8cd2b6338 --- /dev/null +++ b/orte/mca/debugger/mpir/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_debugger_mpir_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_debugger_mpir_CONFIG], [ + AC_CONFIG_FILES([orte/mca/debugger/mpir/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/debugger/mpir/mpir.c b/orte/mca/debugger/mpir/mpir.c index dbca2d4c1d..35630a3329 100644 --- a/orte/mca/debugger/mpir/mpir.c +++ b/orte/mca/debugger/mpir/mpir.c @@ -111,7 +111,6 @@ #include "opal/util/output.h" #include "opal/util/path.h" #include "opal/util/os_path.h" -#include "opal/util/opal_sos.h" #include "opal/class/opal_pointer_array.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/opal_getcwd.h" diff --git a/orte/mca/debugger/mpirx/configure.m4 b/orte/mca/debugger/mpirx/configure.m4 new file mode 100644 index 0000000000..a7f3c5425e --- /dev/null +++ b/orte/mca/debugger/mpirx/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_debugger_mpirx_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_debugger_mpirx_CONFIG], [ + AC_CONFIG_FILES([orte/mca/debugger/mpirx/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/debugger/mpirx/mpirx.c b/orte/mca/debugger/mpirx/mpirx.c index dec674de07..76217c0763 100644 --- a/orte/mca/debugger/mpirx/mpirx.c +++ b/orte/mca/debugger/mpirx/mpirx.c @@ -37,7 +37,6 @@ #include "opal/util/output.h" #include "opal/util/path.h" #include "opal/util/os_path.h" -#include "opal/util/opal_sos.h" #include "opal/class/opal_pointer_array.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/opal_getcwd.h" diff --git a/orte/mca/errmgr/app/configure.m4 b/orte/mca/errmgr/app/configure.m4 new file mode 100644 index 0000000000..bf12b54215 --- /dev/null +++ b/orte/mca/errmgr/app/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_errmgr_app_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_errmgr_app_CONFIG], [ + AC_CONFIG_FILES([orte/mca/errmgr/app/Makefile]) + + AS_IF([test "$orte_enable_resilient_code" = 1 -a "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/errmgr/default_app/configure.m4 b/orte/mca/errmgr/default_app/configure.m4 new file mode 100644 index 0000000000..0306771fb8 --- /dev/null +++ b/orte/mca/errmgr/default_app/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_errmgr_default_app_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_errmgr_default_app_CONFIG], [ + AC_CONFIG_FILES([orte/mca/errmgr/default_app/Makefile]) + + AS_IF([test "$orte_enable_resilient_code" = 0 -a "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/errmgr/default_hnp/configure.m4 b/orte/mca/errmgr/default_hnp/configure.m4 new file mode 100644 index 0000000000..6dced14eb4 --- /dev/null +++ b/orte/mca/errmgr/default_hnp/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_errmgr_default_hnp_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_errmgr_default_hnp_CONFIG], [ + AC_CONFIG_FILES([orte/mca/errmgr/default_hnp/Makefile]) + + AS_IF([test "$orte_enable_resilient_code" = 0 -a "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c b/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c index d90edeb8fa..cc505c0306 100644 --- a/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c +++ b/orte/mca/errmgr/default_hnp/errmgr_default_hnp.c @@ -28,7 +28,6 @@ #endif #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/mca/rml/rml.h" diff --git a/orte/mca/errmgr/default_orted/configure.m4 b/orte/mca/errmgr/default_orted/configure.m4 new file mode 100644 index 0000000000..cfc2eb6348 --- /dev/null +++ b/orte/mca/errmgr/default_orted/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_errmgr_default_orted_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_errmgr_default_orted_CONFIG], [ + AC_CONFIG_FILES([orte/mca/errmgr/default_orted/Makefile]) + + AS_IF([test "$orte_enable_resilient_code" = 0 -a "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/errmgr/default_orted/errmgr_default_orted.c b/orte/mca/errmgr/default_orted/errmgr_default_orted.c index b9d2310dfe..810728476e 100644 --- a/orte/mca/errmgr/default_orted/errmgr_default_orted.c +++ b/orte/mca/errmgr/default_orted/errmgr_default_orted.c @@ -24,7 +24,6 @@ #endif #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/util/error_strings.h" diff --git a/orte/mca/errmgr/hnp/configure.m4 b/orte/mca/errmgr/hnp/configure.m4 new file mode 100644 index 0000000000..440d03515b --- /dev/null +++ b/orte/mca/errmgr/hnp/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_errmgr_hnp_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_errmgr_hnp_CONFIG], [ + AC_CONFIG_FILES([orte/mca/errmgr/hnp/Makefile]) + + AS_IF([test "$orte_enable_resilient_code" = 1 -a "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/errmgr/hnp/errmgr_hnp.c b/orte/mca/errmgr/hnp/errmgr_hnp.c index 3384e48619..ac9b7fb451 100644 --- a/orte/mca/errmgr/hnp/errmgr_hnp.c +++ b/orte/mca/errmgr/hnp/errmgr_hnp.c @@ -27,7 +27,6 @@ #endif #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/mca/rml/rml.h" diff --git a/orte/mca/errmgr/orted/configure.m4 b/orte/mca/errmgr/orted/configure.m4 new file mode 100644 index 0000000000..8c10aa375c --- /dev/null +++ b/orte/mca/errmgr/orted/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_errmgr_orted_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_errmgr_orted_CONFIG], [ + AC_CONFIG_FILES([orte/mca/errmgr/orted/Makefile]) + + AS_IF([test "$orte_enable_resilient_code" = 1 -a "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/errmgr/orted/errmgr_orted.c b/orte/mca/errmgr/orted/errmgr_orted.c index 4c1f1712a9..646f31104d 100644 --- a/orte/mca/errmgr/orted/errmgr_orted.c +++ b/orte/mca/errmgr/orted/errmgr_orted.c @@ -24,7 +24,6 @@ #endif #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/util/error_strings.h" diff --git a/orte/mca/ess/alps/configure.m4 b/orte/mca/ess/alps/configure.m4 index 72bdc38255..72701fe994 100644 --- a/orte/mca/ess/alps/configure.m4 +++ b/orte/mca/ess/alps/configure.m4 @@ -57,7 +57,7 @@ AC_DEFUN([MCA_orte_ess_alps_CONFIG],[ [$orte_mca_ess_alps_have_cnos], [Whether we have CNOS support in alps ess or not]) - AS_IF([test "$orte_mca_ess_alps_happy" = "yes"], + AS_IF([test "$orte_mca_ess_alps_happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/ess/alps/ess_alps_module.c b/orte/mca/ess/alps/ess_alps_module.c index f109157acd..3ce8a7809e 100644 --- a/orte/mca/ess/alps/ess_alps_module.c +++ b/orte/mca/ess/alps/ess_alps_module.c @@ -183,9 +183,12 @@ static int rte_init(void) return ORTE_SUCCESS; error: - orte_show_help("help-orte-runtime.txt", - "orte_init:startup:internal-failure", - true, error, ORTE_ERROR_NAME(ret), ret); + if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { + orte_show_help("help-orte-runtime.txt", + "orte_init:startup:internal-failure", + true, error, ORTE_ERROR_NAME(ret), ret); + } + return ret; } diff --git a/orte/mca/ess/base/ess_base_std_app.c b/orte/mca/ess/base/ess_base_std_app.c index 63ebdcb1cb..2dd2b9ffc0 100644 --- a/orte/mca/ess/base/ess_base_std_app.c +++ b/orte/mca/ess/base/ess_base_std_app.c @@ -40,7 +40,6 @@ #include "orte/mca/routed/base/base.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/grpcomm/base/base.h" -#include "orte/mca/rmcast/base/base.h" #include "orte/mca/rml/rml.h" #include "orte/mca/odls/odls_types.h" #include "orte/mca/plm/plm.h" @@ -54,7 +53,6 @@ #include "orte/util/name_fns.h" #include "orte/util/show_help.h" #include "orte/mca/notifier/base/base.h" -#include "orte/mca/db/base/base.h" #include "orte/runtime/orte_cr.h" #include "orte/runtime/orte_globals.h" @@ -107,18 +105,6 @@ int orte_ess_base_app_setup(void) goto error; } - /* multicast */ - if (ORTE_SUCCESS != (ret = orte_rmcast_base_open())) { - ORTE_ERROR_LOG(ret); - error = "orte_rmcast_base_open"; - goto error; - } - if (ORTE_SUCCESS != (ret = orte_rmcast_base_select())) { - ORTE_ERROR_LOG(ret); - error = "orte_rmcast_base_select"; - goto error; - } - /* * Group communications */ @@ -229,18 +215,6 @@ int orte_ess_base_app_setup(void) goto error; } - /* setup the db system */ - if (ORTE_SUCCESS != (ret = orte_db_base_open())) { - ORTE_ERROR_LOG(ret); - error = "orte_db_open"; - goto error; - } - if (ORTE_SUCCESS != (ret = orte_db_base_select())) { - ORTE_ERROR_LOG(ret); - error = "orte_db_select"; - goto error; - } - /* if we are an ORTE app - and not an MPI app - then * we need to barrier here. MPI_Init has its own barrier, * so we don't need to do two of them. However, if we @@ -288,8 +262,6 @@ int orte_ess_base_app_finalize(void) /* now can close the rml and its friendly group comm */ orte_grpcomm_base_close(); - /* close the multicast */ - orte_rmcast_base_close(); orte_routed_base_close(); orte_rml_base_close(); diff --git a/orte/mca/ess/base/ess_base_std_orted.c b/orte/mca/ess/base/ess_base_std_orted.c index 223b719eb4..77e3dd104b 100644 --- a/orte/mca/ess/base/ess_base_std_orted.c +++ b/orte/mca/ess/base/ess_base_std_orted.c @@ -60,8 +60,6 @@ #include "orte/util/show_help.h" #include "orte/mca/errmgr/base/base.h" #include "orte/mca/notifier/base/base.h" -#include "orte/mca/rmcast/base/base.h" -#include "orte/mca/db/base/base.h" #include "orte/mca/sensor/base/base.h" #include "orte/mca/sensor/sensor.h" #include "orte/runtime/orte_cr.h" @@ -251,18 +249,6 @@ int orte_ess_base_orted_setup(char **hosts) goto error; } - /* multicast */ - if (ORTE_SUCCESS != (ret = orte_rmcast_base_open())) { - ORTE_ERROR_LOG(ret); - error = "orte_rmcast_base_open"; - goto error; - } - if (ORTE_SUCCESS != (ret = orte_rmcast_base_select())) { - ORTE_ERROR_LOG(ret); - error = "orte_rmcast_base_select"; - goto error; - } - /* * Group communications */ @@ -491,18 +477,6 @@ int orte_ess_base_orted_setup(char **hosts) goto error; } - /* setup the db framework */ - if (ORTE_SUCCESS != (ret = orte_db_base_open())) { - ORTE_ERROR_LOG(ret); - error = "orte_db_open"; - goto error; - } - if (ORTE_SUCCESS != (ret = orte_db_base_select())) { - ORTE_ERROR_LOG(ret); - error = "orte_db_select"; - goto error; - } - /* setup the SENSOR framework */ if (ORTE_SUCCESS != (ret = orte_sensor_base_open())) { ORTE_ERROR_LOG(ret); @@ -555,7 +529,6 @@ int orte_ess_base_orted_finalize(void) orte_session_dir_cleanup(ORTE_JOBID_WILDCARD); orte_sensor_base_close(); - orte_db_base_close(); orte_notifier_base_close(); orte_cr_finalize(); @@ -579,8 +552,6 @@ int orte_ess_base_orted_finalize(void) /* now can close the rml and its friendly group comm */ orte_grpcomm_base_close(); - /* close the multicast */ - orte_rmcast_base_close(); orte_routed_base_close(); orte_rml_base_close(); diff --git a/orte/mca/ess/base/ess_base_std_prolog.c b/orte/mca/ess/base/ess_base_std_prolog.c index 9873bc11fa..bd1fb617a2 100644 --- a/orte/mca/ess/base/ess_base_std_prolog.c +++ b/orte/mca/ess/base/ess_base_std_prolog.c @@ -28,8 +28,6 @@ #include #endif -#include "opal/util/opal_sos.h" - #include "orte/mca/errmgr/errmgr.h" #include "orte/util/show_help.h" #include "orte/runtime/orte_wait.h" diff --git a/orte/mca/ess/base/ess_base_std_tool.c b/orte/mca/ess/base/ess_base_std_tool.c index 9e8711a483..5c77d114ba 100644 --- a/orte/mca/ess/base/ess_base_std_tool.c +++ b/orte/mca/ess/base/ess_base_std_tool.c @@ -42,7 +42,6 @@ #include "orte/util/proc_info.h" #include "orte/util/session_dir.h" #include "orte/util/show_help.h" -#include "orte/mca/rmcast/base/base.h" #include "orte/runtime/orte_cr.h" #include "orte/runtime/orte_globals.h" @@ -89,18 +88,6 @@ int orte_ess_base_tool_setup(void) goto error; } - /* multicast */ - if (ORTE_SUCCESS != (ret = orte_rmcast_base_open())) { - ORTE_ERROR_LOG(ret); - error = "orte_rmcast_base_open"; - goto error; - } - if (ORTE_SUCCESS != (ret = orte_rmcast_base_select())) { - ORTE_ERROR_LOG(ret); - error = "orte_rmcast_base_select"; - goto error; - } - /* since I am a tool, then all I really want to do is communicate. * So setup communications and be done - finding the HNP * to which I want to communicate and setting up a route for @@ -197,7 +184,6 @@ int orte_ess_base_tool_finalize(void) orte_iof_base_close(); } orte_routed_base_close(); - orte_rmcast_base_close(); orte_rml_base_close(); return ORTE_SUCCESS; diff --git a/orte/mca/ess/env/configure.m4 b/orte/mca/ess/env/configure.m4 index ddcee7de13..be2f6e1b46 100644 --- a/orte/mca/ess/env/configure.m4 +++ b/orte/mca/ess/env/configure.m4 @@ -1,6 +1,8 @@ # -*- shell-script -*- # # Copyright (c) 2007 Sandia National Laboratories. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -13,4 +15,8 @@ AC_DEFUN([MCA_orte_ess_env_PRIORITY], [10]) # ----------------------------------------------------------- AC_DEFUN([MCA_orte_ess_env_CONFIG], [ AC_CONFIG_FILES([orte/mca/ess/env/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) ]) diff --git a/orte/mca/ess/env/ess_env_module.c b/orte/mca/ess/env/ess_env_module.c index 651722c795..3c37ef29f7 100644 --- a/orte/mca/ess/env/ess_env_module.c +++ b/orte/mca/ess/env/ess_env_module.c @@ -168,10 +168,12 @@ static int rte_init(void) return ORTE_SUCCESS; error: - orte_show_help("help-orte-runtime.txt", - "orte_init:startup:internal-failure", - true, error, ORTE_ERROR_NAME(ret), ret); - + if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { + orte_show_help("help-orte-runtime.txt", + "orte_init:startup:internal-failure", + true, error, ORTE_ERROR_NAME(ret), ret); + } + return ret; } diff --git a/orte/mca/ess/generic/configure.m4 b/orte/mca/ess/generic/configure.m4 index b8eb26e562..30036b030e 100644 --- a/orte/mca/ess/generic/configure.m4 +++ b/orte/mca/ess/generic/configure.m4 @@ -1,6 +1,8 @@ # -*- shell-script -*- # # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -13,4 +15,8 @@ AC_DEFUN([MCA_orte_ess_generic_PRIORITY], [10]) # ----------------------------------------------------------- AC_DEFUN([MCA_orte_ess_generic_CONFIG], [ AC_CONFIG_FILES([orte/mca/ess/generic/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) ]) diff --git a/orte/mca/ess/generic/ess_generic_module.c b/orte/mca/ess/generic/ess_generic_module.c index 43b8fd4a33..cd9a0afa83 100644 --- a/orte/mca/ess/generic/ess_generic_module.c +++ b/orte/mca/ess/generic/ess_generic_module.c @@ -327,10 +327,12 @@ static int rte_init(void) return ORTE_SUCCESS; error: - orte_show_help("help-orte-runtime.txt", - "orte_init:startup:internal-failure", - true, error, ORTE_ERROR_NAME(ret), ret); - + if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { + orte_show_help("help-orte-runtime.txt", + "orte_init:startup:internal-failure", + true, error, ORTE_ERROR_NAME(ret), ret); + } + return ret; } diff --git a/orte/mca/ess/hnp/configure.m4 b/orte/mca/ess/hnp/configure.m4 index 941a4a78c5..d9bbcdfe47 100644 --- a/orte/mca/ess/hnp/configure.m4 +++ b/orte/mca/ess/hnp/configure.m4 @@ -1,6 +1,8 @@ # -*- shell-script -*- # # Copyright (c) 2007 Sandia National Laboratories. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -13,4 +15,8 @@ AC_DEFUN([MCA_orte_ess_hnp_PRIORITY], [10]) # ----------------------------------------------------------- AC_DEFUN([MCA_orte_ess_hnp_CONFIG], [ AC_CONFIG_FILES([orte/mca/ess/hnp/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) ]) diff --git a/orte/mca/ess/hnp/ess_hnp_module.c b/orte/mca/ess/hnp/ess_hnp_module.c index ba374b192b..677b68fd6d 100644 --- a/orte/mca/ess/hnp/ess_hnp_module.c +++ b/orte/mca/ess/hnp/ess_hnp_module.c @@ -56,8 +56,6 @@ #include "orte/mca/plm/plm.h" #include "orte/mca/odls/base/base.h" #include "orte/mca/notifier/base/base.h" -#include "orte/mca/rmcast/base/base.h" -#include "orte/mca/db/base/base.h" #include "orte/mca/sensor/base/base.h" #include "orte/mca/sensor/sensor.h" #include "orte/mca/debugger/base/base.h" @@ -311,18 +309,6 @@ static int rte_init(void) goto error; } - /* multicast */ - if (ORTE_SUCCESS != (ret = orte_rmcast_base_open())) { - ORTE_ERROR_LOG(ret); - error = "orte_rmcast_base_open"; - goto error; - } - if (ORTE_SUCCESS != (ret = orte_rmcast_base_select())) { - ORTE_ERROR_LOG(ret); - error = "orte_rmcast_base_select"; - goto error; - } - /* * Group communications */ @@ -622,18 +608,6 @@ static int rte_init(void) goto error; } - /* setup the db framework */ - if (ORTE_SUCCESS != (ret = orte_db_base_open())) { - ORTE_ERROR_LOG(ret); - error = "orte_db_open"; - goto error; - } - if (ORTE_SUCCESS != (ret = orte_db_base_select())) { - ORTE_ERROR_LOG(ret); - error = "orte_db_select"; - goto error; - } - /* setup the SENSOR framework */ if (ORTE_SUCCESS != (ret = orte_sensor_base_open())) { ORTE_ERROR_LOG(ret); @@ -693,7 +667,7 @@ static int rte_init(void) return ORTE_SUCCESS; error: - if (ORTE_ERR_SILENT != ret) { + if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { orte_show_help("help-orte-runtime.txt", "orte_init:startup:internal-failure", true, error, ORTE_ERROR_NAME(ret), ret); @@ -740,7 +714,6 @@ static int rte_finalize(void) free(contact_path); orte_sensor_base_close(); - orte_db_base_close(); orte_notifier_base_close(); orte_cr_finalize(); @@ -764,9 +737,6 @@ static int rte_finalize(void) orte_errmgr_base_close(); orte_grpcomm_base_close(); - /* close the multicast */ - orte_rmcast_base_close(); - /* now can close the rml */ orte_routed_base_close(); orte_rml_base_close(); diff --git a/orte/mca/ess/lsf/configure.m4 b/orte/mca/ess/lsf/configure.m4 index 1d856b57b4..a2de739ad5 100644 --- a/orte/mca/ess/lsf/configure.m4 +++ b/orte/mca/ess/lsf/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -28,7 +30,7 @@ AC_DEFUN([MCA_orte_ess_lsf_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$ess_lsf_good" = "1"], + AS_IF([test "$ess_lsf_good" = "1" -a "$orte_without_full_support" = 0], [ess_lsf_WRAPPER_EXTRA_LDFLAGS="$ess_lsf_LDFLAGS" ess_lsf_WRAPPER_EXTRA_LIBS="$ess_lsf_LIBS" $1], diff --git a/orte/mca/ess/lsf/ess_lsf_module.c b/orte/mca/ess/lsf/ess_lsf_module.c index 8e250a911e..0ed1b00ec6 100644 --- a/orte/mca/ess/lsf/ess_lsf_module.c +++ b/orte/mca/ess/lsf/ess_lsf_module.c @@ -138,10 +138,12 @@ static int rte_init(void) return ORTE_SUCCESS; error: - orte_show_help("help-orte-runtime.txt", - "orte_init:startup:internal-failure", - true, error, ORTE_ERROR_NAME(ret), ret); - + if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { + orte_show_help("help-orte-runtime.txt", + "orte_init:startup:internal-failure", + true, error, ORTE_ERROR_NAME(ret), ret); + } + return ret; } diff --git a/orte/mca/ess/pmi/configure.m4 b/orte/mca/ess/pmi/configure.m4 index 182a828817..ff5fd8be9a 100644 --- a/orte/mca/ess/pmi/configure.m4 +++ b/orte/mca/ess/pmi/configure.m4 @@ -1,6 +1,8 @@ # -*- shell-script -*- # # Copyright (c) 2009-2011 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -19,7 +21,7 @@ AC_DEFUN([MCA_orte_ess_pmi_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$ess_pmi_good" = "1"], + AS_IF([test "$ess_pmi_good" = "1" -a "$orte_without_full_support" = 0], [ess_pmi_WRAPPER_EXTRA_LDFLAGS="$ess_pmi_LDFLAGS" ess_pmi_WRAPPER_EXTRA_LIBS="$ess_pmi_LIBS" $1], diff --git a/orte/mca/ess/pmi/ess_pmi_module.c b/orte/mca/ess/pmi/ess_pmi_module.c index e5d4a635dc..4bb2297872 100644 --- a/orte/mca/ess/pmi/ess_pmi_module.c +++ b/orte/mca/ess/pmi/ess_pmi_module.c @@ -272,9 +272,12 @@ static int rte_init(void) return ORTE_SUCCESS; error: - orte_show_help("help-orte-runtime.txt", - "orte_init:startup:internal-failure", - true, error, ORTE_ERROR_NAME(ret), ret); + if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { + orte_show_help("help-orte-runtime.txt", + "orte_init:startup:internal-failure", + true, error, ORTE_ERROR_NAME(ret), ret); + } + return ret; } diff --git a/orte/mca/ess/singleton/configure.m4 b/orte/mca/ess/singleton/configure.m4 index 27fc83be94..5f120ba09f 100644 --- a/orte/mca/ess/singleton/configure.m4 +++ b/orte/mca/ess/singleton/configure.m4 @@ -1,6 +1,8 @@ # -*- shell-script -*- # # Copyright (c) 2007 Sandia National Laboratories. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -13,4 +15,8 @@ AC_DEFUN([MCA_orte_ess_singleton_PRIORITY], [10]) # ----------------------------------------------------------- AC_DEFUN([MCA_orte_ess_singleton_CONFIG], [ AC_CONFIG_FILES([orte/mca/ess/singleton/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) ]) diff --git a/orte/mca/ess/slave/configure.m4 b/orte/mca/ess/slave/configure.m4 index 0f606a1c33..af7d29504c 100644 --- a/orte/mca/ess/slave/configure.m4 +++ b/orte/mca/ess/slave/configure.m4 @@ -1,7 +1,7 @@ # -*- shell-script -*- # -# Copyright (c) 2009 Los Alamos National Security, LLC. -# All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -14,4 +14,8 @@ AC_DEFUN([MCA_orte_ess_slave_PRIORITY], [10]) # ----------------------------------------------------------- AC_DEFUN([MCA_orte_ess_slave_CONFIG], [ AC_CONFIG_FILES([orte/mca/ess/slave/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) ]) diff --git a/orte/mca/ess/slave/ess_slave_module.c b/orte/mca/ess/slave/ess_slave_module.c index 15b7dc42ae..def1346b31 100644 --- a/orte/mca/ess/slave/ess_slave_module.c +++ b/orte/mca/ess/slave/ess_slave_module.c @@ -39,7 +39,6 @@ #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/util/malloc.h" #include "orte/mca/rml/base/base.h" diff --git a/orte/mca/ess/slurm/configure.m4 b/orte/mca/ess/slurm/configure.m4 index 0efa55707b..412582e187 100644 --- a/orte/mca/ess/slurm/configure.m4 +++ b/orte/mca/ess/slurm/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -28,7 +30,7 @@ AC_DEFUN([MCA_orte_ess_slurm_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$ess_slurm_good" = "1"], + AS_IF([test "$ess_slurm_good" = "1" -a "$orte_without_full_support" = 0], [ess_slurm_WRAPPER_EXTRA_LDFLAGS="$ess_slurm_LDFLAGS" ess_slurm_WRAPPER_EXTRA_LIBS="$ess_slurm_LIBS" $1], diff --git a/orte/mca/ess/slurm/ess_slurm_module.c b/orte/mca/ess/slurm/ess_slurm_module.c index 7e8f915a27..280dadeee3 100644 --- a/orte/mca/ess/slurm/ess_slurm_module.c +++ b/orte/mca/ess/slurm/ess_slurm_module.c @@ -134,10 +134,12 @@ static int rte_init(void) return ORTE_SUCCESS; error: - orte_show_help("help-orte-runtime.txt", - "orte_init:startup:internal-failure", - true, error, ORTE_ERROR_NAME(ret), ret); - + if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { + orte_show_help("help-orte-runtime.txt", + "orte_init:startup:internal-failure", + true, error, ORTE_ERROR_NAME(ret), ret); + } + return ret; } diff --git a/orte/mca/ess/slurmd/configure.m4 b/orte/mca/ess/slurmd/configure.m4 index 215eac5172..f9350c01ab 100644 --- a/orte/mca/ess/slurmd/configure.m4 +++ b/orte/mca/ess/slurmd/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2011 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -28,7 +30,7 @@ AC_DEFUN([MCA_orte_ess_slurmd_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$ess_slurmd_good" = "1"], + AS_IF([test "$ess_slurmd_good" = "1" -a "$orte_without_full_support" = 0], [ess_slurmd_WRAPPER_EXTRA_LDFLAGS="$ess_slurmd_LDFLAGS" ess_slurmd_WRAPPER_EXTRA_LIBS="$ess_slurmd_LIBS" $1], diff --git a/orte/mca/ess/slurmd/ess_slurmd_module.c b/orte/mca/ess/slurmd/ess_slurmd_module.c index 891456206c..84ed39175e 100644 --- a/orte/mca/ess/slurmd/ess_slurmd_module.c +++ b/orte/mca/ess/slurmd/ess_slurmd_module.c @@ -403,9 +403,12 @@ static int rte_init(void) return ORTE_SUCCESS; error: - orte_show_help("help-orte-runtime.txt", - "orte_init:startup:internal-failure", - true, error, ORTE_ERROR_NAME(ret), ret); + if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { + orte_show_help("help-orte-runtime.txt", + "orte_init:startup:internal-failure", + true, error, ORTE_ERROR_NAME(ret), ret); + } + return ret; } diff --git a/orte/mca/ess/tm/configure.m4 b/orte/mca/ess/tm/configure.m4 index 37da7cee65..a9d354e09c 100644 --- a/orte/mca/ess/tm/configure.m4 +++ b/orte/mca/ess/tm/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -28,7 +30,7 @@ AC_DEFUN([MCA_orte_ess_tm_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$ess_tm_good" = "1"], + AS_IF([test "$ess_tm_good" = "1" -a test "$orte_without_full_support" = 0], [ess_tm_WRAPPER_EXTRA_LDFLAGS="$ess_tm_LDFLAGS" ess_tm_WRAPPER_EXTRA_LIBS="$ess_tm_LIBS" $1], diff --git a/orte/mca/ess/tm/ess_tm_module.c b/orte/mca/ess/tm/ess_tm_module.c index 4da1dd3acb..6d149f6962 100644 --- a/orte/mca/ess/tm/ess_tm_module.c +++ b/orte/mca/ess/tm/ess_tm_module.c @@ -140,10 +140,12 @@ static int rte_init(void) return ORTE_SUCCESS; error: - orte_show_help("help-orte-runtime.txt", - "orte_init:startup:internal-failure", - true, error, ORTE_ERROR_NAME(ret), ret); - + if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { + orte_show_help("help-orte-runtime.txt", + "orte_init:startup:internal-failure", + true, error, ORTE_ERROR_NAME(ret), ret); + } + return ret; } diff --git a/orte/mca/ess/tool/configure.m4 b/orte/mca/ess/tool/configure.m4 index 88e02be7f8..2d0397af36 100644 --- a/orte/mca/ess/tool/configure.m4 +++ b/orte/mca/ess/tool/configure.m4 @@ -2,6 +2,8 @@ # # Copyright (c) 2007 Sandia National Laboratories. All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -14,4 +16,8 @@ AC_DEFUN([MCA_orte_ess_tool_PRIORITY], [10]) # ----------------------------------------------------------- AC_DEFUN([MCA_orte_ess_tool_CONFIG], [ AC_CONFIG_FILES([orte/mca/ess/tool/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) ]) diff --git a/orte/mca/ess/tool/ess_tool_module.c b/orte/mca/ess/tool/ess_tool_module.c index e779265927..ad36e63bb1 100644 --- a/orte/mca/ess/tool/ess_tool_module.c +++ b/orte/mca/ess/tool/ess_tool_module.c @@ -29,8 +29,6 @@ #include #endif -#include "opal/util/opal_sos.h" - #include "orte/util/show_help.h" #include "orte/mca/plm/base/base.h" #include "orte/mca/plm/plm.h" @@ -116,10 +114,12 @@ static int rte_init(void) return ORTE_SUCCESS; error: - orte_show_help("help-ess-tool.txt", - "tool:rte_init:startup:internal-failure", - true, error, ORTE_ERROR_NAME(ret), ret); - + if (ORTE_ERR_SILENT != ret && !orte_report_silent_errors) { + orte_show_help("help-ess-tool.txt", + "tool:rte_init:startup:internal-failure", + true, error, ORTE_ERROR_NAME(ret), ret); + } + return ret; } diff --git a/orte/mca/filem/rsh/configure.m4 b/orte/mca/filem/rsh/configure.m4 new file mode 100644 index 0000000000..ebf7f48056 --- /dev/null +++ b/orte/mca/filem/rsh/configure.m4 @@ -0,0 +1,20 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +# MCA_ess_env_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_filem_rsh_CONFIG], [ + AC_CONFIG_FILES([orte/mca/filem/rsh/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/filem/rsh/filem_rsh_module.c b/orte/mca/filem/rsh/filem_rsh_module.c index 252ccbdc3a..c801e4b7b5 100644 --- a/orte/mca/filem/rsh/filem_rsh_module.c +++ b/orte/mca/filem/rsh/filem_rsh_module.c @@ -36,7 +36,6 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/mca/event/event.h" -#include "opal/util/opal_sos.h" #include "orte/constants.h" #include "orte/util/show_help.h" diff --git a/orte/mca/grpcomm/bad/configure.m4 b/orte/mca/grpcomm/bad/configure.m4 index d7251f758b..e204fa0b25 100644 --- a/orte/mca/grpcomm/bad/configure.m4 +++ b/orte/mca/grpcomm/bad/configure.m4 @@ -1,6 +1,7 @@ # -*- shell-script -*- # -# Copyright (c) 2007 Sandia National Laboratories. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -13,4 +14,8 @@ AC_DEFUN([MCA_orte_grpcomm_bad_PRIORITY], [10]) # ----------------------------------------------------------- AC_DEFUN([MCA_orte_grpcomm_bad_CONFIG], [ AC_CONFIG_FILES([orte/mca/grpcomm/bad/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) ]) diff --git a/orte/mca/grpcomm/bad/grpcomm_bad_module.c b/orte/mca/grpcomm/bad/grpcomm_bad_module.c index b9e1cecbda..c6661539b5 100644 --- a/orte/mca/grpcomm/bad/grpcomm_bad_module.c +++ b/orte/mca/grpcomm/bad/grpcomm_bad_module.c @@ -25,7 +25,6 @@ #include "opal/dss/dss.h" -#include "opal/util/opal_sos.h" #include "opal/mca/hwloc/base/base.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/grpcomm/hier/configure.m4 b/orte/mca/grpcomm/hier/configure.m4 index 22099c5dab..2be8ed3045 100644 --- a/orte/mca/grpcomm/hier/configure.m4 +++ b/orte/mca/grpcomm/hier/configure.m4 @@ -1,6 +1,7 @@ # -*- shell-script -*- # -# Copyright (c) 2007 Sandia National Laboratories. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -13,4 +14,8 @@ AC_DEFUN([MCA_orte_grpcomm_hier_PRIORITY], [10]) # ----------------------------------------------------------- AC_DEFUN([MCA_orte_grpcomm_hier_CONFIG], [ AC_CONFIG_FILES([orte/mca/grpcomm/hier/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) ]) diff --git a/orte/mca/grpcomm/pmi/configure.m4 b/orte/mca/grpcomm/pmi/configure.m4 index a213dd6523..b5b96177a6 100644 --- a/orte/mca/grpcomm/pmi/configure.m4 +++ b/orte/mca/grpcomm/pmi/configure.m4 @@ -1,6 +1,8 @@ # -*- shell-script -*- # # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -18,7 +20,7 @@ AC_DEFUN([MCA_orte_grpcomm_pmi_CONFIG], [ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$grpcomm_pmi_good" = 1], + AS_IF([test "$grpcomm_pmi_good" = 1 -a "$orte_without_full_support" = 0], [grpcomm_pmi_WRAPPER_EXTRA_LDFLAGS="$grpcomm_pmi_LDFLAGS" grpcomm_pmi_WRAPPER_EXTRA_LIBS="$grpcomm_pmi_LIBS" $1], diff --git a/orte/mca/iof/hnp/configure.m4 b/orte/mca/iof/hnp/configure.m4 new file mode 100644 index 0000000000..fff29f6639 --- /dev/null +++ b/orte/mca/iof/hnp/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_iof_hnp_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_iof_hnp_CONFIG], [ + AC_CONFIG_FILES([orte/mca/iof/hnp/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/iof/hnp/iof_hnp.c b/orte/mca/iof/hnp/iof_hnp.c index 0943a18276..94aeb5fb2f 100644 --- a/orte/mca/iof/hnp/iof_hnp.c +++ b/orte/mca/iof/hnp/iof_hnp.c @@ -37,7 +37,6 @@ #endif #endif -#include "opal/util/opal_sos.h" #include "opal/mca/event/event.h" #include "orte/runtime/orte_globals.h" diff --git a/orte/mca/iof/hnp/iof_hnp_read.c b/orte/mca/iof/hnp/iof_hnp_read.c index fb8c73de72..2e94e38725 100644 --- a/orte/mca/iof/hnp/iof_hnp_read.c +++ b/orte/mca/iof/hnp/iof_hnp_read.c @@ -28,7 +28,6 @@ #include #endif /* HAVE_STRING_H */ -#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/mca/rml/rml_types.h" @@ -187,7 +186,7 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) */ if( ORTE_SUCCESS != (rc = orte_iof_hnp_send_data_to_endpoint(&sink->daemon, &sink->name, ORTE_IOF_STDIN, data, numbytes))) { /* if the addressee is unknown, remove the sink from the list */ - if( ORTE_ERR_ADDRESSEE_UNKNOWN == OPAL_SOS_GET_ERROR_CODE(rc) ) { + if( ORTE_ERR_ADDRESSEE_UNKNOWN == rc ) { prev_item = opal_list_get_prev(item); opal_list_remove_item(&mca_iof_hnp_component.sinks, item); OBJ_RELEASE(item); diff --git a/orte/mca/iof/hnp/iof_hnp_receive.c b/orte/mca/iof/hnp/iof_hnp_receive.c index 6110adf7f2..355c7ca2b5 100644 --- a/orte/mca/iof/hnp/iof_hnp_receive.c +++ b/orte/mca/iof/hnp/iof_hnp_receive.c @@ -35,8 +35,6 @@ #endif #endif -#include "opal/util/opal_sos.h" - #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/iof/hnp/iof_hnp_send.c b/orte/mca/iof/hnp/iof_hnp_send.c index 5d7c815d32..a605a3f85a 100644 --- a/orte/mca/iof/hnp/iof_hnp_send.c +++ b/orte/mca/iof/hnp/iof_hnp_send.c @@ -28,8 +28,6 @@ #include #endif /* HAVE_STRING_H */ -#include "opal/util/opal_sos.h" - #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/iof/orted/configure.m4 b/orte/mca/iof/orted/configure.m4 new file mode 100644 index 0000000000..16c839ca24 --- /dev/null +++ b/orte/mca/iof/orted/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_iof_orted_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_iof_orted_CONFIG], [ + AC_CONFIG_FILES([orte/mca/iof/orted/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/iof/orted/iof_orted.c b/orte/mca/iof/orted/iof_orted.c index 881811537b..4c7d865c9f 100644 --- a/orte/mca/iof/orted/iof_orted.c +++ b/orte/mca/iof/orted/iof_orted.c @@ -37,8 +37,6 @@ #endif #endif -#include "opal/util/opal_sos.h" - #include "orte/mca/errmgr/errmgr.h" #include "orte/util/name_fns.h" #include "orte/runtime/orte_globals.h" diff --git a/orte/mca/iof/orted/iof_orted_read.c b/orte/mca/iof/orted/iof_orted_read.c index a3c0f0a5e4..5edeeafcf5 100644 --- a/orte/mca/iof/orted/iof_orted_read.c +++ b/orte/mca/iof/orted/iof_orted_read.c @@ -29,7 +29,6 @@ #endif /* HAVE_STRING_H */ #include "opal/dss/dss.h" -#include "opal/util/opal_sos.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" diff --git a/orte/mca/iof/orted/iof_orted_receive.c b/orte/mca/iof/orted/iof_orted_receive.c index 4a91dc7f14..7585b951a0 100644 --- a/orte/mca/iof/orted/iof_orted_receive.c +++ b/orte/mca/iof/orted/iof_orted_receive.c @@ -28,8 +28,6 @@ #include #endif /* HAVE_STRING_H */ -#include "opal/util/opal_sos.h" - #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/iof/tool/configure.m4 b/orte/mca/iof/tool/configure.m4 new file mode 100644 index 0000000000..e3be5459e6 --- /dev/null +++ b/orte/mca/iof/tool/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_iof_tool_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_iof_tool_CONFIG], [ + AC_CONFIG_FILES([orte/mca/iof/tool/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/iof/tool/iof_tool.c b/orte/mca/iof/tool/iof_tool.c index 55c1dd4a64..ea62d6e679 100644 --- a/orte/mca/iof/tool/iof_tool.c +++ b/orte/mca/iof/tool/iof_tool.c @@ -28,8 +28,6 @@ #include #endif /* HAVE_STRING_H */ -#include "opal/util/opal_sos.h" - #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/iof/tool/iof_tool_receive.c b/orte/mca/iof/tool/iof_tool_receive.c index 9e80fd97de..a83d4b8586 100644 --- a/orte/mca/iof/tool/iof_tool_receive.c +++ b/orte/mca/iof/tool/iof_tool_receive.c @@ -28,8 +28,6 @@ #include #endif /* HAVE_STRING_H */ -#include "opal/util/opal_sos.h" - #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/notifier/base/Makefile.am b/orte/mca/notifier/base/Makefile.am index 14c5e4c23a..c0cd807f12 100644 --- a/orte/mca/notifier/base/Makefile.am +++ b/orte/mca/notifier/base/Makefile.am @@ -23,6 +23,11 @@ headers += \ libmca_notifier_la_SOURCES += \ base/notifier_base_close.c \ base/notifier_base_select.c \ - base/notifier_base_wrappers.c \ - base/notifier_base_events.c \ base/notifier_base_open.c + +if !ORTE_DISABLE_FULL_SUPPORT +libmca_notifier_la_SOURCES += \ + base/notifier_base_wrappers.c \ + base/notifier_base_events.c +endif + diff --git a/orte/mca/notifier/base/base.h b/orte/mca/notifier/base/base.h index 458a2d453e..c4eda9fb81 100644 --- a/orte/mca/notifier/base/base.h +++ b/orte/mca/notifier/base/base.h @@ -51,13 +51,14 @@ typedef struct { OBJ_CLASS_DECLARATION(orte_notifier_base_selected_pair_t); -#if !ORTE_DISABLE_FULL_SUPPORT - /* * function definitions */ ORTE_DECLSPEC int orte_notifier_base_open(void); +ORTE_DECLSPEC int orte_notifier_base_close(void); ORTE_DECLSPEC int orte_notifier_base_select(void); + +#if !ORTE_DISABLE_FULL_SUPPORT ORTE_DECLSPEC void orte_notifier_log(orte_notifier_base_severity_t severity, int errcode, const char *msg, ...); @@ -73,7 +74,6 @@ ORTE_DECLSPEC const char* orte_notifier_base_sev2str(orte_notifier_base_severity ORTE_DECLSPEC char *orte_notifier_base_peer_log(int errcode, orte_process_name_t *peer_proc, const char *msg, va_list ap); -ORTE_DECLSPEC int orte_notifier_base_close(void); #if ORTE_WANT_NOTIFIER_LOG_EVENT diff --git a/orte/mca/notifier/command/configure.m4 b/orte/mca/notifier/command/configure.m4 index 3c715521d4..c4bc263c10 100644 --- a/orte/mca/notifier/command/configure.m4 +++ b/orte/mca/notifier/command/configure.m4 @@ -2,6 +2,8 @@ # # Copyright (c) 2007 Sandia National Laboratories. All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -29,6 +31,6 @@ AC_DEFUN([MCA_orte_notifier_command_CONFIG], [ AS_IF([test "$THREAD_TYPE" != "none"], [notifier_happy=yes])]) - AS_IF([test "$notifier_happy" = "yes"], [$1], [$2]) + AS_IF([test "$notifier_happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) OPAL_VAR_SCOPE_POP ]) diff --git a/orte/mca/notifier/file/configure.m4 b/orte/mca/notifier/file/configure.m4 new file mode 100644 index 0000000000..5757c92d10 --- /dev/null +++ b/orte/mca/notifier/file/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_notifier_file_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_notifier_file_CONFIG], [ + AC_CONFIG_FILES([orte/mca/notifier/file/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/notifier/ftb/configure.m4 b/orte/mca/notifier/ftb/configure.m4 index ce0c922952..3681cd2b4e 100644 --- a/orte/mca/notifier/ftb/configure.m4 +++ b/orte/mca/notifier/ftb/configure.m4 @@ -62,7 +62,7 @@ AC_DEFUN([MCA_orte_notifier_ftb_CONFIG], [ [notifier_ftb_happy="yes"], [notifier_ftb_happy="no"]) - AS_IF([test "$notifier_ftb_happy" = "yes"], + AS_IF([test "$notifier_ftb_happy" = "yes" -a "$orte_without_full_support" = 0], [notifier_ftb_WRAPPER_EXTRA_LDFLAGS="$notifier_ftb_LDFLAGS" notifier_ftb_WRAPPER_EXTRA_LIBS="$notifier_ftb_LIBS" $1], diff --git a/orte/mca/notifier/hnp/configure.m4 b/orte/mca/notifier/hnp/configure.m4 new file mode 100644 index 0000000000..279636eeec --- /dev/null +++ b/orte/mca/notifier/hnp/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_notifier_hnp_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_notifier_hnp_CONFIG], [ + AC_CONFIG_FILES([orte/mca/notifier/hnp/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/notifier/smtp/configure.m4 b/orte/mca/notifier/smtp/configure.m4 index 6f4def934c..31199f1fe1 100644 --- a/orte/mca/notifier/smtp/configure.m4 +++ b/orte/mca/notifier/smtp/configure.m4 @@ -32,6 +32,10 @@ AC_DEFUN([MCA_orte_notifier_smtp_CONFIG], [ [esmtp], [smtp_create_session], [], - [$1], - [$2]) + [$orte_notifier_want_smtp=1], + [$orte_notifier_want_smtp=0]) + + AS_IF([test "$orte_notifier_want_smtp" = 1 -a "$orte_without_full_support" = 0], + [$1], + [$2]) ])dnl diff --git a/orte/mca/notifier/syslog/configure.m4 b/orte/mca/notifier/syslog/configure.m4 new file mode 100644 index 0000000000..21eb823b9d --- /dev/null +++ b/orte/mca/notifier/syslog/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_notifier_syslog_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_notifier_syslog_CONFIG], [ + AC_CONFIG_FILES([orte/mca/notifier/syslog/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/odls/default/configure.m4 b/orte/mca/odls/default/configure.m4 index 37c19e7cdd..19d84eafe8 100644 --- a/orte/mca/odls/default/configure.m4 +++ b/orte/mca/odls/default/configure.m4 @@ -10,7 +10,9 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -23,6 +25,9 @@ dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. AC_DEFUN([MCA_orte_odls_default_CONFIG],[ AC_CONFIG_FILES([orte/mca/odls/default/Makefile]) - AC_CHECK_FUNC([fork], [$1], [$2]) + AC_CHECK_FUNC([fork], [odls_default_happy="yes"], [odls_default_happy="no"]) + + AS_IF([test "$odls_default_happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) + ])dnl diff --git a/orte/mca/odls/process/configure.m4 b/orte/mca/odls/process/configure.m4 index 3de189a5dd..906a9e13dc 100644 --- a/orte/mca/odls/process/configure.m4 +++ b/orte/mca/odls/process/configure.m4 @@ -3,7 +3,9 @@ # Copyright (c) 2004-2005 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -16,5 +18,7 @@ dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. AC_DEFUN([MCA_orte_odls_process_CONFIG],[ AC_CONFIG_FILES([orte/mca/odls/process/Makefile]) - AC_CHECK_FUNC([CreateProcess], [$1], [$2]) + AC_CHECK_FUNC([CreateProcess], [odls_process_happy="yes"], [odls_process_happy="no"]) + + AS_IF([test "$odls_process_happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/odls/process/odls_process_module.c b/orte/mca/odls/process/odls_process_module.c index e6f2967f7f..b289f1d992 100644 --- a/orte/mca/odls/process/odls_process_module.c +++ b/orte/mca/odls/process/odls_process_module.c @@ -36,7 +36,6 @@ #include "orte/util/show_help.h" #include "opal/util/sys_limits.h" #include "opal/class/opal_pointer_array.h" -#include "opal/util/opal_sos.h" #include "orte/runtime/orte_wait.h" #include "orte/runtime/orte_globals.h" diff --git a/orte/mca/oob/tcp/configure.m4 b/orte/mca/oob/tcp/configure.m4 index 241c239604..e45d37aac1 100644 --- a/orte/mca/oob/tcp/configure.m4 +++ b/orte/mca/oob/tcp/configure.m4 @@ -10,7 +10,9 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -25,10 +27,12 @@ AC_DEFUN([MCA_orte_oob_tcp_CONFIG],[ # check for sockaddr_in (a good sign we have TCP) AC_CHECK_TYPES([struct sockaddr_in], - [$1], - [$2], + [oob_tcp_happy="yes"], + [oob_tcp_happy="no"], [AC_INCLUDES_DEFAULT #ifdef HAVE_NETINET_IN_H #include #endif]) + + AS_IF([test "$oob_tcp_happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/oob/tcp/oob_tcp.c b/orte/mca/oob/tcp/oob_tcp.c index cb784188e4..8e67550245 100644 --- a/orte/mca/oob/tcp/oob_tcp.c +++ b/orte/mca/oob/tcp/oob_tcp.c @@ -49,7 +49,6 @@ #include "opal/util/show_help.h" #include "opal/util/error.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/opal_socket_errno.h" #include "opal/util/if.h" #include "opal/util/net.h" diff --git a/orte/mca/oob/tcp/oob_tcp_send.c b/orte/mca/oob/tcp/oob_tcp_send.c index be31de351c..d0722ddfd8 100644 --- a/orte/mca/oob/tcp/oob_tcp_send.c +++ b/orte/mca/oob/tcp/oob_tcp_send.c @@ -21,8 +21,6 @@ #include "orte/types.h" #include "opal/types.h" -#include "opal/util/opal_sos.h" - #include "orte/util/name_fns.h" #include "orte/runtime/orte_globals.h" @@ -168,7 +166,7 @@ int mca_oob_tcp_send_nb( MCA_OOB_TCP_HDR_HTON(&msg->msg_hdr); rc = mca_oob_tcp_peer_send(peer, msg); if(rc != ORTE_SUCCESS) { - if (OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_ADDRESSEE_UNKNOWN) { + if (rc != ORTE_ERR_ADDRESSEE_UNKNOWN) { MCA_OOB_TCP_MSG_RETURN(msg); } return rc; diff --git a/orte/mca/plm/alps/configure.m4 b/orte/mca/plm/alps/configure.m4 index 6048b24f58..c3125f5642 100644 --- a/orte/mca/plm/alps/configure.m4 +++ b/orte/mca/plm/alps/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -23,5 +25,7 @@ AC_DEFUN([MCA_orte_plm_alps_CONFIG],[ AC_CONFIG_FILES([orte/mca/plm/alps/Makefile]) - ORTE_CHECK_ALPS([plm_alps], [$1], [$2]) + ORTE_CHECK_ALPS([plm_alps], [plm_alps_happy="yes"], [plm_alps_happy="no"]) + + AS_IF([test "$plm_alps_happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/plm/base/plm_base_receive.c b/orte/mca/plm/base/plm_base_receive.c index 8d3bdaf7ab..ae0af67f4e 100644 --- a/orte/mca/plm/base/plm_base_receive.c +++ b/orte/mca/plm/base/plm_base_receive.c @@ -34,7 +34,6 @@ #include "opal/mca/mca.h" #include "opal/mca/base/mca_base_param.h" -#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "opal/threads/threads.h" @@ -457,7 +456,7 @@ static void process_msg(int fd, short event, void *data) } count = 1; } - if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != OPAL_SOS_GET_ERROR_CODE(rc)) { + if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { ORTE_ERROR_LOG(rc); } else { rc = ORTE_SUCCESS; diff --git a/orte/mca/plm/lsf/configure.m4 b/orte/mca/plm/lsf/configure.m4 index 57151aa917..29ec544049 100644 --- a/orte/mca/plm/lsf/configure.m4 +++ b/orte/mca/plm/lsf/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -27,7 +29,7 @@ AC_DEFUN([MCA_orte_plm_lsf_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$plm_lsf_good" = "1"], + AS_IF([test "$plm_lsf_good" = "1" -a "$orte_without_full_support" = 0], [plm_lsf_WRAPPER_EXTRA_LDFLAGS="$plm_lsf_LDFLAGS" plm_lsf_WRAPPER_EXTRA_LIBS="$plm_lsf_LIBS" $1], diff --git a/orte/mca/plm/poe/configure.m4 b/orte/mca/plm/poe/configure.m4 index d3049d03c8..01c62eaaf5 100644 --- a/orte/mca/plm/poe/configure.m4 +++ b/orte/mca/plm/poe/configure.m4 @@ -12,6 +12,8 @@ # All rights reserved. # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2011 IBM Corporation. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -42,5 +44,5 @@ AC_DEFUN([MCA_orte_plm_poe_CONFIG],[ happy=no ;; esac - AS_IF([test "$happy" = "yes"], [$1], [$2]) + AS_IF([test "$happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) ]) diff --git a/orte/mca/plm/process/configure.m4 b/orte/mca/plm/process/configure.m4 index 970369a5a1..ad5209e4d8 100644 --- a/orte/mca/plm/process/configure.m4 +++ b/orte/mca/plm/process/configure.m4 @@ -10,7 +10,9 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow diff --git a/orte/mca/plm/process/plm_process_module.c b/orte/mca/plm/process/plm_process_module.c index 1f7d687126..8ef26de39d 100644 --- a/orte/mca/plm/process/plm_process_module.c +++ b/orte/mca/plm/process/plm_process_module.c @@ -80,7 +80,6 @@ #include "opal/util/trace.h" #include "opal/util/basename.h" #include "opal/util/opal_environ.h" -#include "opal/util/opal_sos.h" #include "orte/util/name_fns.h" diff --git a/orte/mca/plm/rsh/configure.m4 b/orte/mca/plm/rsh/configure.m4 index 57420d2901..7c174afe6b 100644 --- a/orte/mca/plm/rsh/configure.m4 +++ b/orte/mca/plm/rsh/configure.m4 @@ -10,7 +10,9 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -23,5 +25,7 @@ dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. AC_DEFUN([MCA_orte_plm_rsh_CONFIG],[ AC_CONFIG_FILES([orte/mca/plm/rsh/Makefile]) - AC_CHECK_FUNC([fork], [$1], [$2]) + AC_CHECK_FUNC([fork], [plm_rsh_happy="yes"], [plm_rsh_happy="no"]) + + AS_IF([test "$plm_rsh_happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/plm/rshbase/configure.m4 b/orte/mca/plm/rshbase/configure.m4 index 239183d28c..7c1a67ebb5 100644 --- a/orte/mca/plm/rshbase/configure.m4 +++ b/orte/mca/plm/rshbase/configure.m4 @@ -10,7 +10,9 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -23,5 +25,7 @@ dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. AC_DEFUN([MCA_orte_plm_rshbase_CONFIG],[ AC_CONFIG_FILES([orte/mca/plm/rshbase/Makefile]) - AC_CHECK_FUNC([fork], [$1], [$2]) + AC_CHECK_FUNC([fork], [plm_rshbase_happy="yes"], [plm_rshbase_happy="no"]) + + AS_IF([test "$plm_rshbase_happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/plm/rshbase/plm_rshbase_module.c b/orte/mca/plm/rshbase/plm_rshbase_module.c index 9602d69b84..c99de24884 100644 --- a/orte/mca/plm/rshbase/plm_rshbase_module.c +++ b/orte/mca/plm/rshbase/plm_rshbase_module.c @@ -55,7 +55,6 @@ #include "opal/mca/installdirs/installdirs.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/mca/event/event.h" #include "opal/util/argv.h" #include "opal/util/opal_environ.h" diff --git a/orte/mca/plm/slurm/configure.m4 b/orte/mca/plm/slurm/configure.m4 index d89bfbd031..8f85ffbbdb 100644 --- a/orte/mca/plm/slurm/configure.m4 +++ b/orte/mca/plm/slurm/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -27,7 +29,7 @@ AC_DEFUN([MCA_orte_plm_slurm_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$plm_slurm_good" = "1"], + AS_IF([test "$plm_slurm_good" = "1" -a "$orte_without_full_support" = 0], [plm_slurm_WRAPPER_EXTRA_LDFLAGS="$plm_slurm_LDFLAGS" plm_slurm_WRAPPER_EXTRA_LIBS="$plm_slurm_LIBS" $1], diff --git a/orte/mca/plm/slurm/plm_slurm_module.c b/orte/mca/plm/slurm/plm_slurm_module.c index e3ec6739cc..03db745eb5 100644 --- a/orte/mca/plm/slurm/plm_slurm_module.c +++ b/orte/mca/plm/slurm/plm_slurm_module.c @@ -54,7 +54,6 @@ #include "opal/mca/installdirs/installdirs.h" #include "opal/util/argv.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/util/opal_environ.h" #include "opal/util/path.h" #include "opal/util/basename.h" diff --git a/orte/mca/plm/submit/configure.m4 b/orte/mca/plm/submit/configure.m4 index a96a592671..4a40323f7b 100644 --- a/orte/mca/plm/submit/configure.m4 +++ b/orte/mca/plm/submit/configure.m4 @@ -3,7 +3,9 @@ # Copyright (c) 2004-2006 The University of Tennessee and The University # of Tennessee Research Foundation. All rights # reserved. -dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -16,5 +18,7 @@ dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. AC_DEFUN([MCA_orte_plm_submit_CONFIG],[ AC_CONFIG_FILES([orte/mca/plm/submit/Makefile]) - AC_CHECK_FUNC([fork], [$1], [$2]) + AC_CHECK_FUNC([fork], [plm_submit_happy="yes"], [plm_submit_happy="no"]) + + AS_IF([test "$plm_submit_happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/plm/tm/configure.m4 b/orte/mca/plm/tm/configure.m4 index 7dfefe56a4..f028fe00b7 100644 --- a/orte/mca/plm/tm/configure.m4 +++ b/orte/mca/plm/tm/configure.m4 @@ -10,6 +10,8 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. # $COPYRIGHT$ # @@ -27,7 +29,7 @@ AC_DEFUN([MCA_orte_plm_tm_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$plm_tm_good" = "1"], + AS_IF([test "$plm_tm_good" = "1" -a "$orte_without_full_support" = 0], [plm_tm_WRAPPER_EXTRA_LDFLAGS="$plm_tm_LDFLAGS" plm_tm_WRAPPER_EXTRA_LIBS="$plm_tm_LIBS" $1], diff --git a/orte/mca/plm/xgrid/configure.m4 b/orte/mca/plm/xgrid/configure.m4 index 1e3bc73fc5..c1461e22d9 100644 --- a/orte/mca/plm/xgrid/configure.m4 +++ b/orte/mca/plm/xgrid/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -28,7 +30,7 @@ AC_DEFUN([MCA_orte_plm_xgrid_CONFIG],[ # For very dumb reasons involving linking, it's near impossible # to build the XGrid components as static libraries. Disable if that's # the case. - AS_IF([test "$plm_xgrid_good" = "0"], [$2], + AS_IF([test "$plm_xgrid_good" = "0" -a "$orte_without_full_support" = 0], [$2], [AS_IF([test "$compile_mode" = "dso"], [ # plm_xgrid_LDFLAGS will be set by ORTE_CHECK_XGRID plm_xgrid_WRAPPER_EXTRA_LDFLAGS="$plm_xgrid_LDFLAGS" diff --git a/orte/mca/ras/alps/configure.m4 b/orte/mca/ras/alps/configure.m4 index 4e7f485eec..dfa9a97848 100644 --- a/orte/mca/ras/alps/configure.m4 +++ b/orte/mca/ras/alps/configure.m4 @@ -12,6 +12,8 @@ # All rights reserved. # Copyright (c) 2008 UT-Battelle, LLC # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -24,5 +26,7 @@ AC_DEFUN([MCA_orte_ras_alps_CONFIG],[ AC_CONFIG_FILES([orte/mca/ras/alps/Makefile]) - ORTE_CHECK_ALPS([ras_alps], [$1], [$2]) + ORTE_CHECK_ALPS([ras_alps], [ras_alps_happy="yes"], [ras_alps_happy="no"]) + + AS_IF([test "$ras_alps_happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/ras/gridengine/configure.m4 b/orte/mca/ras/gridengine/configure.m4 index 6926063005..163e9177d6 100644 --- a/orte/mca/ras/gridengine/configure.m4 +++ b/orte/mca/ras/gridengine/configure.m4 @@ -13,6 +13,8 @@ # Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -25,5 +27,7 @@ AC_DEFUN([MCA_orte_ras_gridengine_CONFIG],[ AC_CONFIG_FILES([orte/mca/ras/gridengine/Makefile]) - ORTE_CHECK_GRIDENGINE([ras_gridengine], [$1], [$2]) + ORTE_CHECK_GRIDENGINE([ras_gridengine], [ras_gridengine_happy="yes"], [ras_gridengine_happy="no"]) + + AS_IF([test "$ras_gridengine_happy" = "yes" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/ras/gridengine/ras_gridengine_module.c b/orte/mca/ras/gridengine/ras_gridengine_module.c index b38627e801..a294308337 100644 --- a/orte/mca/ras/gridengine/ras_gridengine_module.c +++ b/orte/mca/ras/gridengine/ras_gridengine_module.c @@ -28,7 +28,6 @@ #include #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/runtime/orte_globals.h" diff --git a/orte/mca/ras/loadleveler/configure.m4 b/orte/mca/ras/loadleveler/configure.m4 index 4de1a528e2..89fdf386fb 100644 --- a/orte/mca/ras/loadleveler/configure.m4 +++ b/orte/mca/ras/loadleveler/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -27,7 +29,7 @@ AC_DEFUN([MCA_orte_ras_loadleveler_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$ras_loadleveler_good" = "1"], + AS_IF([test "$ras_loadleveler_good" = "1" -a "$orte_without_full_support" = 0], [ras_loadleveler_WRAPPER_EXTRA_LDFLAGS="$ras_loadleveler_LDFLAGS" ras_loadleveler_WRAPPER_EXTRA_LIBS="$ras_loadleveler_LIBS" $1], diff --git a/orte/mca/ras/lsf/configure.m4 b/orte/mca/ras/lsf/configure.m4 index 0ff4c87202..e22ad0a5ec 100644 --- a/orte/mca/ras/lsf/configure.m4 +++ b/orte/mca/ras/lsf/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -27,7 +29,7 @@ AC_DEFUN([MCA_orte_ras_lsf_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$ras_lsf_good" = "1"], + AS_IF([test "$ras_lsf_good" = "1" -a "$orte_without_full_support" = 0], [ras_lsf_WRAPPER_EXTRA_LDFLAGS="$ras_lsf_LDFLAGS" ras_lsf_WRAPPER_EXTRA_LIBS="$ras_lsf_LIBS" $1], diff --git a/orte/mca/ras/simulator/configure.m4 b/orte/mca/ras/simulator/configure.m4 new file mode 100644 index 0000000000..9e59f4031c --- /dev/null +++ b/orte/mca/ras/simulator/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_ras_simulator_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_ras_simulator_CONFIG], [ + AC_CONFIG_FILES([orte/mca/ras/simulator/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/ras/slurm/configure.m4 b/orte/mca/ras/slurm/configure.m4 index 3986dccb01..ed0305a814 100644 --- a/orte/mca/ras/slurm/configure.m4 +++ b/orte/mca/ras/slurm/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -27,7 +29,7 @@ AC_DEFUN([MCA_orte_ras_slurm_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$ras_slurm_good" = "1"], + AS_IF([test "$ras_slurm_good" = "1" -a "$orte_without_full_support" = 0], [ras_slurm_WRAPPER_EXTRA_LDFLAGS="$ras_slurm_LDFLAGS" ras_slurm_WRAPPER_EXTRA_LIBS="$ras_slurm_LIBS" $1], diff --git a/orte/mca/ras/slurm/ras_slurm_module.c b/orte/mca/ras/slurm/ras_slurm_module.c index 72c140a750..d1858e4fae 100644 --- a/orte/mca/ras/slurm/ras_slurm_module.c +++ b/orte/mca/ras/slurm/ras_slurm_module.c @@ -25,7 +25,6 @@ #include "opal/util/argv.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/ras/tm/configure.m4 b/orte/mca/ras/tm/configure.m4 index f52a6deb3e..144bc1508c 100644 --- a/orte/mca/ras/tm/configure.m4 +++ b/orte/mca/ras/tm/configure.m4 @@ -11,6 +11,8 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -27,7 +29,7 @@ AC_DEFUN([MCA_orte_ras_tm_CONFIG],[ # if check worked, set wrapper flags if so. # Evaluate succeed / fail - AS_IF([test "$ras_tm_good" = "1"], + AS_IF([test "$ras_tm_good" = "1" -a "$orte_without_full_support" = 0], [ras_tm_WRAPPER_EXTRA_LDFLAGS="$ras_tm_LDFLAGS" ras_tm_WRAPPER_EXTRA_LIBS="$ras_tm_LIBS" $1], diff --git a/orte/mca/rmaps/ppr/configure.m4 b/orte/mca/rmaps/ppr/configure.m4 new file mode 100644 index 0000000000..aca2ace1f2 --- /dev/null +++ b/orte/mca/rmaps/ppr/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_rmaps_ppr_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_rmaps_ppr_CONFIG], [ + AC_CONFIG_FILES([orte/mca/rmaps/ppr/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/rmaps/rank_file/configure.m4 b/orte/mca/rmaps/rank_file/configure.m4 new file mode 100644 index 0000000000..7e67c61f14 --- /dev/null +++ b/orte/mca/rmaps/rank_file/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_rmaps_rank_file_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_rmaps_rank_file_CONFIG], [ + AC_CONFIG_FILES([orte/mca/rmaps/rank_file/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/rmaps/round_robin/configure.m4 b/orte/mca/rmaps/round_robin/configure.m4 new file mode 100644 index 0000000000..8cb4c10ab0 --- /dev/null +++ b/orte/mca/rmaps/round_robin/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_rmaps_round_robin_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_rmaps_round_robin_CONFIG], [ + AC_CONFIG_FILES([orte/mca/rmaps/round_robin/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/rmaps/round_robin/rmaps_rr.c b/orte/mca/rmaps/round_robin/rmaps_rr.c index fdfe3b5317..3e29e106ed 100644 --- a/orte/mca/rmaps/round_robin/rmaps_rr.c +++ b/orte/mca/rmaps/round_robin/rmaps_rr.c @@ -30,7 +30,6 @@ #endif /* HAVE_STRING_H */ #include "opal/mca/base/mca_base_param.h" -#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/rmaps/seq/configure.m4 b/orte/mca/rmaps/seq/configure.m4 new file mode 100644 index 0000000000..ecbf0aaa21 --- /dev/null +++ b/orte/mca/rmaps/seq/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_rmaps_seq_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_rmaps_seq_CONFIG], [ + AC_CONFIG_FILES([orte/mca/rmaps/seq/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/rmcast/Makefile.am b/orte/mca/rmcast/Makefile.am deleted file mode 100644 index 14743eec85..0000000000 --- a/orte/mca/rmcast/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# -# 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$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -AM_CPPFLAGS = $(LTDLINCL) - -# main library setup -noinst_LTLIBRARIES = libmca_rmcast.la -libmca_rmcast_la_SOURCES = - -# header setup -dist_pkgdata_DATA = - -# local files -headers = rmcast.h rmcast_types.h -libmca_rmcast_la_SOURCES += $(headers) - -# Conditionally install the header files -if WANT_INSTALL_HEADERS -ortedir = $(includedir)/openmpi/$(subdir) -nobase_orte_HEADERS = $(headers) -endif - -include base/Makefile.am - -distclean-local: - rm -f base/static-components.h diff --git a/orte/mca/rmcast/base/Makefile.am b/orte/mca/rmcast/base/Makefile.am deleted file mode 100644 index 5e58740c1f..0000000000 --- a/orte/mca/rmcast/base/Makefile.am +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -dist_pkgdata_DATA += base/help-rmcast-base.txt - -headers += \ - base/base.h \ - base/private.h - -libmca_rmcast_la_SOURCES += \ - base/rmcast_base_open.c - -if !ORTE_DISABLE_FULL_SUPPORT - -libmca_rmcast_la_SOURCES += \ - base/rmcast_base_close.c \ - base/rmcast_base_select.c \ - base/rmcast_base_fns.c \ - base/rmcast_base_threads.c - -endif diff --git a/orte/mca/rmcast/base/base.h b/orte/mca/rmcast/base/base.h deleted file mode 100644 index 0426066a4c..0000000000 --- a/orte/mca/rmcast/base/base.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file: - */ - -#ifndef ORTE_MCA_RMCAST_BASE_H -#define ORTE_MCA_RMCAST_BASE_H - -/* - * includes - */ -#include "orte_config.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif - -#include "opal/class/opal_list.h" -#include "opal/mca/event/event.h" - -#include "orte/threads/threads.h" - -#include "orte/mca/rmcast/rmcast.h" -#include "orte/mca/rmcast/base/private.h" - -BEGIN_C_DECLS - -ORTE_DECLSPEC int orte_rmcast_base_open(void); - -#if !ORTE_DISABLE_FULL_SUPPORT - - -/* - * globals that might be needed - */ -typedef struct { - int rmcast_output; - opal_list_t rmcast_opened; - uint32_t xmit_network; - char *my_group_name; - uint8_t my_group_number; - uint32_t interface; - struct { - char **start; - char **end; - } ports; - int cache_size; - bool opened; - orte_thread_ctl_t main_ctl; - opal_list_t recvs; - opal_list_t channels; - rmcast_base_channel_t *my_output_channel; - rmcast_base_channel_t *my_input_channel; - bool unreliable_xport; - opal_list_t msg_logs; - opal_thread_t recv_thread; - orte_thread_ctl_t recv_ctl; - int recv_pipe[2]; - opal_thread_t recv_process; - orte_thread_ctl_t recv_process_ctl; -} orte_rmcast_base_t; - -ORTE_DECLSPEC extern orte_rmcast_base_t orte_rmcast_base; - - -/* - * function definitions - */ -ORTE_DECLSPEC int orte_rmcast_base_select(void); -ORTE_DECLSPEC int orte_rmcast_base_close(void); - -ORTE_DECLSPEC void orte_rmcast_print_buffer_finalize(void); - -#endif /* ORTE_DISABLE_FULL_SUPPORT */ - -END_C_DECLS - -#endif diff --git a/orte/mca/rmcast/base/help-rmcast-base.txt b/orte/mca/rmcast/base/help-rmcast-base.txt deleted file mode 100644 index 3c23a40997..0000000000 --- a/orte/mca/rmcast/base/help-rmcast-base.txt +++ /dev/null @@ -1,70 +0,0 @@ -# -*- text -*- -# -# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -# This is the US/English general help file for Open RTE. -# -[unrecognized-network] -An out-of-range value for the multicast transmit network was specified: - - Network: %s - -Please specify a valid network - as a reminder, you can use - -ompi_info -param rmcast all - -to see the allowed values. -# -[value-out-of-range] -The specified parameter is outside of the range or in an -incorrect format: - - Parameter: %s - Range/Format: %s - -Please adjust the value and try again. -# -[value-range] -The specified parameter is outside of valid range: - - Parameter: %s - Value given: %d - Valid range: %s - -Please adjust the value and try again. -# -[no-avail-interfaces] -No multicast interfaces are available. Please contact -your system administrator for assistance. -# -[invalid-net-mask] -We were unable to parse the provided network interface: - - Interface: %s - Error: %s - -The interface must be one of the following forms: - - 123.456.789.123 - 123.456/16 - 123.456.789 - -The system can parse any one of these, and will find an interface -that matches within the provided scope. Please revise your input -and try again. -# -[too-many-values] -The specified parameter includes too many values: - - Paramater: %s - Value: %s - Number of results: %d - Allowed number: %d - -Please adjust the value and try again. - diff --git a/orte/mca/rmcast/base/private.h b/orte/mca/rmcast/base/private.h deleted file mode 100644 index 325a3b811a..0000000000 --- a/orte/mca/rmcast/base/private.h +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file: - */ - -#ifndef ORTE_MCA_RMCAST_PRIVATE_H -#define ORTE_MCA_RMCAST_PRIVATE_H - -/* - * includes - */ -#include "orte_config.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif - -#include "opal/mca/event/event.h" -#include "opal/class/opal_list.h" -#include "opal/class/opal_ring_buffer.h" - -#include "orte/threads/threads.h" -#include "orte/mca/rmcast/rmcast.h" - -BEGIN_C_DECLS - -#if !ORTE_DISABLE_FULL_SUPPORT - -#define CLOSE_THE_SOCKET(socket) \ - do { \ - shutdown(socket, 2); \ - close(socket); \ - } while(0) - - -/**** CLASS DEFINITIONS ****/ -/* - * Data structure for tracking assigned channels - */ -typedef struct { - opal_list_item_t item; - char *name; - orte_rmcast_channel_t channel; - uint32_t network; - uint16_t port; - uint32_t interface; - int xmit; - bool restart; - orte_rmcast_seq_t seq_num; - int recv; - struct sockaddr_in addr; - opal_event_t recv_ev; - /* ring buffer to cache our messages */ - opal_ring_buffer_t cache; -} rmcast_base_channel_t; -ORTE_DECLSPEC OBJ_CLASS_DECLARATION(rmcast_base_channel_t); - - -/* - * Data structure for tracking registered non-blocking recvs - */ -typedef struct { - opal_list_item_t item; - orte_process_name_t name; - orte_rmcast_channel_t channel; - orte_rmcast_seq_t seq_num; - orte_thread_ctl_t ctl; - orte_rmcast_tag_t tag; - orte_rmcast_flag_t flags; - struct iovec *iovec_array; - int iovec_count; - opal_buffer_t *buf; - orte_rmcast_callback_fn_t cbfunc_iovec; - orte_rmcast_callback_buffer_fn_t cbfunc_buffer; - void *cbdata; -} rmcast_base_recv_t; -ORTE_DECLSPEC OBJ_CLASS_DECLARATION(rmcast_base_recv_t); - - -/* - * Data structure for tracking pending sends - */ -typedef struct { - opal_list_item_t item; - bool retransmit; - struct iovec *iovec_array; - int32_t iovec_count; - opal_buffer_t *buf; - orte_rmcast_tag_t tag; - orte_rmcast_callback_fn_t cbfunc_iovec; - orte_rmcast_callback_buffer_fn_t cbfunc_buffer; - void *cbdata; - orte_thread_ctl_t ctl; -} rmcast_base_send_t; -ORTE_DECLSPEC OBJ_CLASS_DECLARATION(rmcast_base_send_t); - - -/* Data structure for tracking recvd sequence numbers */ -typedef struct { - opal_list_item_t super; - orte_rmcast_channel_t channel; - orte_rmcast_seq_t seq_num; - bool recovering; -} rmcast_seq_tracker_t; -ORTE_DECLSPEC OBJ_CLASS_DECLARATION(rmcast_seq_tracker_t); - -typedef struct { - opal_list_item_t super; - orte_process_name_t name; - opal_list_t last_msg; -} rmcast_recv_log_t; -ORTE_DECLSPEC OBJ_CLASS_DECLARATION(rmcast_recv_log_t); - - -/* Data structure for holding messages in case - * of retransmit - */ -typedef struct { - opal_object_t super; - orte_rmcast_seq_t seq_num; - orte_rmcast_channel_t channel; - opal_buffer_t *buf; -} rmcast_send_log_t; -ORTE_DECLSPEC OBJ_CLASS_DECLARATION(rmcast_send_log_t); - - - -#define ORTE_MULTICAST_MESSAGE_EVENT(sndr, bf) \ - do { \ - orte_rmcast_msg_t *msg; \ - OPAL_OUTPUT_VERBOSE((1, orte_debug_output, \ - "defining mcast msg event: %s %d", \ - __FILE__, __LINE__)); \ - msg = OBJ_NEW(orte_rmcast_msg_t); \ - msg->sender.jobid = (sndr)->jobid; \ - msg->sender.vpid = (sndr)->vpid; \ - opal_dss.copy_payload(msg->buf, (bf)); \ - opal_fd_write(orte_rmcast_base.recv_pipe[1], \ - sizeof(orte_rmcast_msg_t*), &msg); \ - } while(0); - - -#define ORTE_MULTICAST_NEXT_SEQUENCE_NUM(seq) \ - do { \ - if ((seq) == ORTE_RMCAST_SEQ_INVALID || \ - (seq) == ORTE_RMCAST_SEQ_MAX) { \ - (seq) = 0; \ - } else { \ - (seq) += 1; \ - } \ - } while(0); - -/**** FUNCTIONS ****/ -ORTE_DECLSPEC int orte_rmcast_base_queue_recv(rmcast_base_recv_t **recvptr, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_fn_t cbfunc_iovec, - orte_rmcast_callback_buffer_fn_t cbfunc_buffer, - void *cbdata, bool blocking); - -ORTE_DECLSPEC rmcast_base_channel_t* orte_rmcast_base_get_channel(orte_rmcast_channel_t channel); - -ORTE_DECLSPEC int orte_rmcast_base_queue_xmit(rmcast_base_send_t *snd, - orte_rmcast_channel_t channel, - opal_buffer_t **buffer, - rmcast_base_channel_t **chan); - -ORTE_DECLSPEC int orte_rmcast_base_start_threads(void); -ORTE_DECLSPEC void orte_rmcast_base_stop_threads(void); -ORTE_DECLSPEC void orte_rmcast_base_process_msg(orte_rmcast_msg_t *msg); - -ORTE_DECLSPEC void orte_rmcast_base_cancel_recv(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag); - -ORTE_DECLSPEC int orte_rmcast_base_close_channel(orte_rmcast_channel_t channel); - -ORTE_DECLSPEC int orte_rmcast_base_query(orte_rmcast_channel_t *output, - orte_rmcast_channel_t *input); - -ORTE_DECLSPEC char* orte_rmcast_base_print_channel(orte_rmcast_channel_t channel); - -#endif /* ORTE_DISABLE_FULL_SUPPORT */ - -END_C_DECLS - -#endif diff --git a/orte/mca/rmcast/base/rmcast_base_close.c b/orte/mca/rmcast/base/rmcast_base_close.c deleted file mode 100644 index 9766eccf3a..0000000000 --- a/orte/mca/rmcast/base/rmcast_base_close.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include - -#include "opal/mca/mca.h" -#include "opal/mca/base/base.h" - -#include "orte/mca/rmcast/base/base.h" -#include "orte/mca/rmcast/base/private.h" - -int orte_rmcast_base_close(void) -{ - opal_list_item_t *item; - - if (!orte_rmcast_base.opened) { - return ORTE_SUCCESS; - } - - /* finalize the active module */ - if (NULL != orte_rmcast.finalize) { - orte_rmcast.finalize(); - } - - while (NULL != (item = opal_list_remove_first(&orte_rmcast_base.msg_logs))) { - OBJ_RELEASE(item); - } - OBJ_DESTRUCT(&orte_rmcast_base.msg_logs); - - while (NULL != (item = opal_list_remove_first(&orte_rmcast_base.recvs))) { - OBJ_RELEASE(item); - } - OBJ_DESTRUCT(&orte_rmcast_base.recvs); - while (NULL != (item = opal_list_remove_first(&orte_rmcast_base.channels))) { - OBJ_RELEASE(item); - } - OBJ_DESTRUCT(&orte_rmcast_base.channels); - - /* cleanup thread stuff */ - OBJ_DESTRUCT(&orte_rmcast_base.main_ctl); - OBJ_DESTRUCT(&orte_rmcast_base.recv_thread); - OBJ_DESTRUCT(&orte_rmcast_base.recv_ctl); - OBJ_DESTRUCT(&orte_rmcast_base.recv_process); - OBJ_DESTRUCT(&orte_rmcast_base.recv_process_ctl); - if (NULL != orte_rmcast_base.my_group_name) { - free(orte_rmcast_base.my_group_name); - } - - /* Close all remaining available components (may be one if this is a - Open RTE program, or [possibly] multiple if this is ompi_info) */ - - mca_base_components_close(orte_rmcast_base.rmcast_output, - &orte_rmcast_base.rmcast_opened, NULL); - - orte_rmcast_base.opened = false; - return ORTE_SUCCESS; -} diff --git a/orte/mca/rmcast/base/rmcast_base_fns.c b/orte/mca/rmcast/base/rmcast_base_fns.c deleted file mode 100644 index ef227c9192..0000000000 --- a/orte/mca/rmcast/base/rmcast_base_fns.c +++ /dev/null @@ -1,486 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include - -#include "opal/mca/mca.h" -#include "opal/mca/base/base.h" -#include "opal/threads/threads.h" -#include "opal/threads/tsd.h" - -#include "orte/mca/errmgr/errmgr.h" -#include "orte/util/name_fns.h" -#include "orte/runtime/orte_globals.h" - -#include "orte/mca/rmcast/base/base.h" -#include "orte/mca/rmcast/base/private.h" - -static int insert_hdr(opal_buffer_t *buf, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - bool restart, - orte_rmcast_seq_t seq_num); - -rmcast_base_channel_t* orte_rmcast_base_get_channel(orte_rmcast_channel_t channel) -{ - rmcast_base_channel_t *chptr, *ch; - opal_list_item_t *item; - - /* if we were asked to send this on our group output - * channel, substitute it - */ - if (ORTE_RMCAST_GROUP_OUTPUT_CHANNEL == channel) { - if (NULL == orte_rmcast_base.my_output_channel) { - ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND); - return NULL; - } - return orte_rmcast_base.my_output_channel; - } else if (ORTE_RMCAST_GROUP_INPUT_CHANNEL == channel) { - if (NULL == orte_rmcast_base.my_input_channel) { - ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND); - return NULL; - } - return orte_rmcast_base.my_input_channel; - } - - /* find the channel */ - ch = NULL; - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.main_ctl); - for (item = opal_list_get_first(&orte_rmcast_base.channels); - item != opal_list_get_end(&orte_rmcast_base.channels); - item = opal_list_get_next(item)) { - chptr = (rmcast_base_channel_t*)item; - if (channel == chptr->channel) { - ch = chptr; - break; - } - } - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - if (NULL == ch) { - /* didn't find it */ - ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND); - return NULL; - } - - return ch; -} - -int orte_rmcast_base_queue_xmit(rmcast_base_send_t *snd, - orte_rmcast_channel_t channel, - opal_buffer_t **buffer, - rmcast_base_channel_t **chan) -{ - rmcast_base_channel_t *ch; - int32_t sz; - int rc; - int8_t flag; - int32_t tmp32; - opal_buffer_t *buf; - - /* setup default responses */ - *buffer = NULL; - *chan = NULL; - - /* get the channel object */ - if (NULL == (ch = orte_rmcast_base_get_channel(channel))) { - ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND); - return ORTE_ERR_NOT_FOUND; - } - /* return the channel */ - *chan = ch; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base:queue_xmit of %d %s" - " for multicast on channel %d tag %d seq_num %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - (NULL == snd->iovec_array) ? (int)snd->buf->bytes_used : (int)snd->iovec_count, - (NULL == snd->iovec_array) ? "bytes" : "iovecs", - (int)ch->channel, snd->tag, ch->seq_num)); - - /* setup a buffer */ - buf = OBJ_NEW(opal_buffer_t); - *buffer = buf; - - /* assign a sequence number */ - ORTE_MULTICAST_NEXT_SEQUENCE_NUM(ch->seq_num); - - /* insert the header */ - if (ORTE_SUCCESS != (rc = insert_hdr(buf, ch->channel, snd->tag, ch->restart, ch->seq_num))) { - ORTE_ERROR_LOG(rc); - return rc; - } - /* are we sending a buffer? */ - if (NULL == snd->buf) { - /* no, flag the buffer as containing iovecs */ - flag = 0; - if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &flag, 1, OPAL_INT8))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - /* pack the number of iovecs */ - if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &snd->iovec_count, 1, OPAL_INT32))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - - /* pack each iovec into a buffer in prep for sending - * so we can recreate the array at the other end - */ - for (sz=0; sz < snd->iovec_count; sz++) { - /* pack the size */ - tmp32 = snd->iovec_array[sz].iov_len; - if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &tmp32, 1, OPAL_INT32))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - if (0 < tmp32) { - /* pack the bytes */ - if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, snd->iovec_array[sz].iov_base, tmp32, OPAL_UINT8))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - } - } - - } else { - /* flag it as being a buffer */ - flag = 1; - if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &flag, 1, OPAL_INT8))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - - /* copy the payload */ - if (ORTE_SUCCESS != (rc = opal_dss.copy_payload(buf, snd->buf))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - } - /* flag this channel as no longer in restart mode since - * it will have sent at least one message - */ - ch->restart = false; - return ORTE_SUCCESS; - -cleanup: - if (NULL != buf) { - OBJ_RELEASE(buf); - } - return rc; -} - -int orte_rmcast_base_queue_recv(rmcast_base_recv_t **recvptr, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_fn_t cbfunc_iovec, - orte_rmcast_callback_buffer_fn_t cbfunc_buffer, - void *cbdata, bool blocking) -{ - opal_list_item_t *item; - rmcast_base_recv_t *rptr; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base: queue_recv called on multicast channel %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel, tag)); - - if (!blocking) { - /* do we already have a recv for this channel/tag? */ - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.main_ctl); - for (item = opal_list_get_first(&orte_rmcast_base.recvs); - item != opal_list_get_end(&orte_rmcast_base.recvs); - item = opal_list_get_next(item)) { - rptr = (rmcast_base_recv_t*)item; - if (channel != rptr->channel) { - /* different channel */ - continue; - } - if (tag != rptr->tag) { - /* different tag */ - continue; - } - if (NULL != cbfunc_iovec) { - if (NULL != rptr->cbfunc_iovec) { - /* already have one in place */ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base: matching recv already active on multicast channel %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel, tag)); - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - return ORTE_EXISTS; - } - rptr->cbfunc_iovec = cbfunc_iovec; - } - if (NULL != cbfunc_buffer) { - if (NULL != rptr->cbfunc_buffer) { - /* matching type - recv already in place */ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base: matching recv already active on multicast channel %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel, tag)); - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - return ORTE_EXISTS; - } - rptr->cbfunc_buffer = cbfunc_buffer; - } - if (NULL != recvptr) { - *recvptr = rptr; - } - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - return ORTE_SUCCESS; - } - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - } - - /* if we get here, then we need to add a new recv */ - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base: adding recv on multicast channel %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel, tag)); - rptr = OBJ_NEW(rmcast_base_recv_t); - rptr->channel = channel; - rptr->tag = tag; - rptr->flags = flags; - rptr->cbfunc_iovec = cbfunc_iovec; - rptr->cbfunc_buffer = cbfunc_buffer; - rptr->cbdata = cbdata; - if (NULL != recvptr) { - *recvptr = rptr; - } - - /* wildcard tag recvs get pushed to the end of the list so - * that specific tag recvs take precedence - */ - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.main_ctl); - if (ORTE_RMCAST_TAG_WILDCARD == tag) { - opal_list_append(&orte_rmcast_base.recvs, &rptr->item); - } else { - opal_list_prepend(&orte_rmcast_base.recvs, &rptr->item); - } - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - - return ORTE_SUCCESS; -} - -void orte_rmcast_base_cancel_recv(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag) -{ - opal_list_item_t *item, *next; - rmcast_base_recv_t *ptr; - orte_rmcast_channel_t ch; - - if (ORTE_RMCAST_GROUP_INPUT_CHANNEL == channel) { - ch = orte_rmcast_base.my_group_number; - } else if (ORTE_RMCAST_GROUP_OUTPUT_CHANNEL == channel) { - ch = orte_rmcast_base.my_group_number + 1; - } else { - ch = channel; - } - - /* find all recv's for this channel and tag */ - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.main_ctl); - item = opal_list_get_first(&orte_rmcast_base.recvs); - while (item != opal_list_get_end(&orte_rmcast_base.recvs)) { - next = opal_list_get_next(item); - - ptr = (rmcast_base_recv_t*)item; - if (ch == ptr->channel && - tag == ptr->tag) { - opal_list_remove_item(&orte_rmcast_base.recvs, &ptr->item); - OBJ_RELEASE(ptr); - } - item = next; - } - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); -} - -int orte_rmcast_base_close_channel(orte_rmcast_channel_t channel) -{ - opal_list_item_t *item; - rmcast_base_channel_t *chan; - - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.main_ctl); - for (item = opal_list_get_first(&orte_rmcast_base.channels); - item != opal_list_get_end(&orte_rmcast_base.channels); - item = opal_list_get_next(item)) { - chan = (rmcast_base_channel_t*)item; - - if (channel == chan->channel) { - opal_list_remove_item(&orte_rmcast_base.channels, item); - OBJ_RELEASE(chan); - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - return ORTE_SUCCESS; - } - } - - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - return ORTE_ERR_NOT_FOUND; -} - -int orte_rmcast_base_query(orte_rmcast_channel_t *output, orte_rmcast_channel_t *input) -{ - if (NULL != output) { - if (NULL == orte_rmcast_base.my_output_channel) { - *output = ORTE_RMCAST_INVALID_CHANNEL; - } else { - *output = orte_rmcast_base.my_output_channel->channel; - } - } - if (NULL != input) { - if (NULL == orte_rmcast_base.my_input_channel) { - *input = ORTE_RMCAST_INVALID_CHANNEL; - } else { - *input = orte_rmcast_base.my_input_channel->channel; - } - } - return ORTE_SUCCESS; -} - -static int insert_hdr(opal_buffer_t *buf, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - bool restart, - orte_rmcast_seq_t seq_num) -{ - int rc; - uint8_t flag; - - if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, ORTE_PROC_MY_NAME, 1, ORTE_NAME))) { - ORTE_ERROR_LOG(rc); - return rc; - } - - if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &channel, 1, ORTE_RMCAST_CHANNEL_T))) { - ORTE_ERROR_LOG(rc); - return rc; - } - - if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &tag, 1, ORTE_RMCAST_TAG_T))) { - ORTE_ERROR_LOG(rc); - return rc; - } - - if (restart) { - flag = 1; - } else { - flag = 0; - } - if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &flag, 1, OPAL_UINT8))) { - ORTE_ERROR_LOG(rc); - return rc; - } - - if (ORTE_SUCCESS != (rc = opal_dss.pack(buf, &seq_num, 1, ORTE_RMCAST_SEQ_T))) { - ORTE_ERROR_LOG(rc); - } - return rc; -} - -#define ORTE_RMCAST_PRINT_MAX_SIZE 50 -#define ORTE_RMCAST_PRINT_NUM_BUFS 16 - -static bool fns_init=false; -static opal_tsd_key_t print_tsd_key; -static char* orte_rmcast_print_null = "NULL"; -typedef struct { - char *buffers[ORTE_RMCAST_PRINT_NUM_BUFS]; - int cntr; -} orte_rmcast_print_buffers_t; - -void orte_rmcast_print_buffer_finalize(void) -{ - if (fns_init) { - opal_tsd_key_delete(print_tsd_key); - } -} - -static void buffer_cleanup(void *value) -{ - int i; - orte_rmcast_print_buffers_t *ptr; - - if (NULL != value) { - ptr = (orte_rmcast_print_buffers_t*)value; - for (i=0; i < ORTE_RMCAST_PRINT_NUM_BUFS; i++) { - free(ptr->buffers[i]); - } - } -} - -static orte_rmcast_print_buffers_t *get_print_buffer(void) -{ - orte_rmcast_print_buffers_t *ptr; - int ret, i; - - if (!fns_init) { - /* setup the print_args function */ - if (ORTE_SUCCESS != (ret = opal_tsd_key_create(&print_tsd_key, buffer_cleanup))) { - ORTE_ERROR_LOG(ret); - return NULL; - } - fns_init = true; - } - - ret = opal_tsd_getspecific(print_tsd_key, (void**)&ptr); - if (OPAL_SUCCESS != ret) return NULL; - - if (NULL == ptr) { - ptr = (orte_rmcast_print_buffers_t*)malloc(sizeof(orte_rmcast_print_buffers_t)); - for (i=0; i < ORTE_RMCAST_PRINT_NUM_BUFS; i++) { - ptr->buffers[i] = (char *) malloc((ORTE_RMCAST_PRINT_MAX_SIZE+1) * sizeof(char)); - } - ptr->cntr = 0; - ret = opal_tsd_setspecific(print_tsd_key, (void*)ptr); - } - - return (orte_rmcast_print_buffers_t*) ptr; -} - -char* orte_rmcast_base_print_channel(orte_rmcast_channel_t channel) -{ - char *ret; - orte_rmcast_print_buffers_t *ptr; - - switch(channel) { - case ORTE_RMCAST_GROUP_INPUT_CHANNEL: - return "INPUT"; - case ORTE_RMCAST_GROUP_OUTPUT_CHANNEL: - return "OUTPUT"; - case ORTE_RMCAST_WILDCARD_CHANNEL: - return "WILDCARD"; - case ORTE_RMCAST_INVALID_CHANNEL: - return "INVALID"; - case ORTE_RMCAST_SYS_CHANNEL: - return "SYSTEM"; - case ORTE_RMCAST_APP_PUBLIC_CHANNEL: - return "PUBLIC"; - case ORTE_RMCAST_DATA_SERVER_CHANNEL: - return "DATA_SERVER"; - case ORTE_RMCAST_ERROR_CHANNEL: - return "ERROR"; - case ORTE_RMCAST_HEARTBEAT_CHANNEL: - return "HEARTBEAT"; - default: - /* not a system-defined channel - so print the value out */ - ptr = get_print_buffer(); - if (NULL == ptr) { - ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); - return orte_rmcast_print_null; - } - /* cycle around the ring */ - if (ORTE_RMCAST_PRINT_NUM_BUFS == ptr->cntr) { - ptr->cntr = 0; - } - snprintf(ptr->buffers[ptr->cntr], ORTE_RMCAST_PRINT_MAX_SIZE, "%d", channel); - ret = ptr->buffers[ptr->cntr]; - ptr->cntr++; - return ret; - } -} diff --git a/orte/mca/rmcast/base/rmcast_base_open.c b/orte/mca/rmcast/base/rmcast_base_open.c deleted file mode 100644 index 239d4f132c..0000000000 --- a/orte/mca/rmcast/base/rmcast_base_open.c +++ /dev/null @@ -1,485 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - - -#include "orte_config.h" -#include "orte/constants.h" - -#if !ORTE_DISABLE_FULL_SUPPORT - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#include - -#include "opal/mca/mca.h" -#include "opal/mca/base/base.h" -#include "opal/mca/base/mca_base_param.h" -#include "opal/util/argv.h" -#include "opal/util/if.h" -#include "opal/class/opal_ring_buffer.h" -#include "opal/class/opal_list.h" - -#include "orte/mca/errmgr/errmgr.h" -#include "orte/util/name_fns.h" -#include "orte/util/parse_options.h" -#include "orte/util/show_help.h" -#include "orte/threads/threads.h" - -#include "orte/mca/rmcast/base/private.h" - -#endif - -#include "orte/mca/rmcast/base/base.h" - -/* - * The following file was created by configure. It contains extern - * statements and the definition of an array of pointers to each - * component's public mca_base_component_t struct. - */ - -#include "orte/mca/rmcast/base/static-components.h" - -#if ORTE_DISABLE_FULL_SUPPORT -/* have to include a bogus function here so that - * the build system sees at least one function - * in the library - */ -int orte_rmcast_base_open(void) -{ - return ORTE_SUCCESS; -} - -#else - -/* - * Global variables - */ -orte_rmcast_module_t orte_rmcast = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL -}; -orte_rmcast_base_t orte_rmcast_base; -static bool opened=false; - - -/** - * Function for finding and opening either all MCA components, or the one - * that was specifically requested via a MCA parameter. - */ -int orte_rmcast_base_open(void) -{ - int value, i; - char *tmp, **nets=NULL, *ptr; - int idx, lb; - struct sockaddr_in inaddr; - uint32_t addr, netaddr, netmask; - bool assigned; - int rc; - size_t j; - bool named_if; - - if (opened) { - /* ensure we don't go through here twice */ - return ORTE_SUCCESS; - } - opened = true; - orte_rmcast_base.opened = true; - - /* ensure all global values are initialized */ - OBJ_CONSTRUCT(&orte_rmcast_base.main_ctl, orte_thread_ctl_t); - OBJ_CONSTRUCT(&orte_rmcast_base.recvs, opal_list_t); - OBJ_CONSTRUCT(&orte_rmcast_base.channels, opal_list_t); - - OBJ_CONSTRUCT(&orte_rmcast_base.recv_thread, opal_thread_t); - OBJ_CONSTRUCT(&orte_rmcast_base.recv_ctl, orte_thread_ctl_t); - OBJ_CONSTRUCT(&orte_rmcast_base.recv_process, opal_thread_t); - OBJ_CONSTRUCT(&orte_rmcast_base.recv_process_ctl, orte_thread_ctl_t); - - OBJ_CONSTRUCT(&orte_rmcast_base.msg_logs, opal_list_t); - orte_rmcast_base.unreliable_xport = false; - - orte_rmcast_base.xmit_network = 0; - orte_rmcast_base.my_group_name = NULL; - orte_rmcast_base.my_group_number = 0; - orte_rmcast_base.interface = 0; - orte_rmcast_base.ports.start = NULL; - orte_rmcast_base.ports.end = NULL; - orte_rmcast_base.my_output_channel = NULL; - orte_rmcast_base.my_input_channel = NULL; - - /* public multicast channel for this job */ - mca_base_param_reg_string_name("rmcast", "base_multicast_network", - "Network to use for multicast xmissions [link (default) | site | org | global | tuple-addr]", - false, false, "link", &tmp); - rc = ORTE_ERR_SILENT; - if (0 == strcasecmp(tmp, "site")) { - rc = opal_iftupletoaddr("239.255.0.150", &orte_rmcast_base.xmit_network, NULL); - } else if (0 == strcasecmp(tmp, "org")) { - rc = opal_iftupletoaddr("239.192.0.150", &orte_rmcast_base.xmit_network, NULL); - } else if (0 == strcasecmp(tmp, "global")) { - rc = opal_iftupletoaddr("224.0.1.150", &orte_rmcast_base.xmit_network, NULL); - } else if (0 == strcasecmp(tmp, "link")) { - /* default to link */ - rc = opal_iftupletoaddr("224.0.0.150", &orte_rmcast_base.xmit_network, NULL); - } else if (NULL != strchr(tmp, '.')) { - /* must have been given an actual network address */ - rc = opal_iftupletoaddr(tmp, &orte_rmcast_base.xmit_network, NULL); - } - free(tmp); - - if (ORTE_SUCCESS != rc) { - orte_show_help("help-rmcast-base.txt", "unrecognized-network", true, tmp); - return ORTE_ERR_SILENT; - } - - /* channel offset */ - mca_base_param_reg_string_name("rmcast", "base_group", - "Multicast group of this process (name:number)", - false, false, NULL, &tmp); - /* parse the value */ - if (NULL != tmp) { - if (NULL == (ptr = strrchr(tmp, ':'))) { - orte_show_help("help-rmcast-base.txt", "value-out-of-range", true, - tmp, "string-name:number"); - return ORTE_ERR_SILENT; - } - *ptr = '\0'; - orte_rmcast_base.my_group_name = strdup(tmp); - ptr++; - value = strtoul(ptr, NULL, 10); - if (value < 2 || value > 255) { - orte_show_help("help-rmcast-base.txt", "value-out-of-range", true, - ptr, "2-255"); - return ORTE_ERR_SILENT; - } - orte_rmcast_base.my_group_number = value; - free(tmp); - } - - - /* multicast interfaces */ - mca_base_param_reg_string_name("rmcast", "base_if_include", - "Comma-separated list of interfaces to use for multicast messages", - false, false, NULL, &tmp); - /* if nothing was provided, default to first non-loopback interface */ - lb = -1; - if (NULL == tmp) { - idx = opal_ifbegin(); - while (0 < idx) { - /* ignore the loopback interface */ - if (opal_ifisloopback(idx)) { - /* save the loopback index */ - lb = idx; - /* look at next one */ - idx = opal_ifnext(idx); - continue; - } - if (ORTE_SUCCESS != (rc = opal_ifindextoaddr(idx, (struct sockaddr*)&inaddr, sizeof(inaddr)))) { - ORTE_ERROR_LOG(rc); - return rc; - } - orte_rmcast_base.interface = ntohl(inaddr.sin_addr.s_addr); - break; - } - if (idx < 0) { - /* if we didn't at least find a loopback, punt */ - if (lb < 0) { - orte_show_help("help-rmcast-base.txt", "no-avail-interfaces", true); - return ORTE_ERR_SILENT; - } - /* use the loopback device */ - if (ORTE_SUCCESS != (rc = opal_ifindextoaddr(lb, (struct sockaddr*)&inaddr, sizeof(inaddr)))) { - ORTE_ERROR_LOG(rc); - return rc; - } - orte_rmcast_base.interface = ntohl(inaddr.sin_addr.s_addr); - } - } else { - /* separate the list */ - nets = opal_argv_split(tmp, ','); - free(tmp); - idx = -1; - assigned = false; - for (i=0; NULL != nets[i] && !assigned; i++) { - OPAL_OUTPUT_VERBOSE((5, orte_rmcast_base.rmcast_output, - "%s rmcast:base checking interface %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), nets[i])); - /* if the specified interface contains letters in it, then it - * was given as an interface name and not an IP tuple - */ - named_if = false; - for (j=0; j < strlen(nets[i]); j++) { - if (isalpha(nets[i][j]) && '.' != nets[i][j]) { - named_if = true; - break; - } - } - if (named_if) { - if (0 > (idx = opal_ifnametoindex(nets[i]))) { - continue; - } - if (ORTE_SUCCESS != (rc = opal_ifindextoaddr(idx, (struct sockaddr*)&inaddr, sizeof(inaddr)))) { - ORTE_ERROR_LOG(rc); - return rc; - } - OPAL_OUTPUT_VERBOSE((5, orte_rmcast_base.rmcast_output, - "%s rmcast:base using named interface %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), nets[i])); - orte_rmcast_base.interface = ntohl(inaddr.sin_addr.s_addr); - assigned = true; - break; - } else { - if (ORTE_SUCCESS != (rc = opal_iftupletoaddr(nets[i], &netaddr, &netmask))) { - orte_show_help("help-rmcast-base.txt", "invalid-net-mask", true, nets[i], ORTE_ERROR_NAME(rc)); - return ORTE_ERR_SILENT; - } - /* search for a matching interface - take the first one within the returned scope */ - idx = opal_ifbegin(); - while (0 < idx) { - /* ignore the loopback interface */ - if (opal_ifisloopback(idx)) { - idx = opal_ifnext(idx); - continue; - } - if (ORTE_SUCCESS != (rc = opal_ifindextoaddr(idx, (struct sockaddr*)&inaddr, sizeof(inaddr)))) { - ORTE_ERROR_LOG(rc); - return rc; - } - addr = ntohl(inaddr.sin_addr.s_addr); - if (netaddr == (addr & netmask)) { - OPAL_OUTPUT_VERBOSE((5, orte_rmcast_base.rmcast_output, - "%s rmcast:base using IP interface %03d.%03d.%03d.%03d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), OPAL_IF_FORMAT_ADDR(addr))); - orte_rmcast_base.interface = ntohl(inaddr.sin_addr.s_addr); - assigned = true; - break; - } - idx = opal_ifnext(idx); - } - } - } - opal_argv_free(nets); - if (!assigned) { - orte_show_help("help-rmcast-base.txt", "no-avail-interfaces", true); - return ORTE_ERR_SILENT; - } - } - - /* range of available ports */ - mca_base_param_reg_string_name("rmcast", "base_multicast_ports", - "Ports available for multicast channels (default: 6900-7155)", - false, false, "6900-7154", &tmp); - orte_util_get_ranges(tmp, &orte_rmcast_base.ports.start, &orte_rmcast_base.ports.end); - - /* send cache size */ - mca_base_param_reg_int_name("rmcast", "base_cache_size", - "Number of messages to be held in send cache (default: 16)", - false, false, 16, &orte_rmcast_base.cache_size); - - /* Debugging / verbose output. Always have stream open, with - verbose set by the mca open system... */ - orte_rmcast_base.rmcast_output = opal_output_open(NULL); - - /* Open up all available components */ - if (ORTE_SUCCESS != - mca_base_components_open("rmcast", orte_rmcast_base.rmcast_output, - mca_rmcast_base_static_components, - &orte_rmcast_base.rmcast_opened, true)) { - return ORTE_ERROR; - } - - /* All done */ - return ORTE_SUCCESS; -} - -/**** CLASS INSTANCES ****/ -static void send_construct(rmcast_base_send_t *ptr) -{ - ptr->retransmit = false; - ptr->iovec_array = NULL; - ptr->iovec_count = 0; - ptr->buf = NULL; - ptr->tag = ORTE_RMCAST_TAG_INVALID; - ptr->cbfunc_iovec = NULL; - ptr->cbfunc_buffer = NULL; - ptr->cbdata = NULL; - OBJ_CONSTRUCT(&ptr->ctl, orte_thread_ctl_t); -} -static void send_destruct(rmcast_base_send_t *ptr) -{ - OBJ_DESTRUCT(&ptr->ctl); -} -OBJ_CLASS_INSTANCE(rmcast_base_send_t, - opal_list_item_t, - send_construct, - send_destruct); - -static void recv_construct(rmcast_base_recv_t *ptr) -{ - ptr->name.jobid = ORTE_JOBID_INVALID; - ptr->name.vpid = ORTE_VPID_INVALID; - ORTE_EPOCH_SET(ptr->name.epoch,ORTE_EPOCH_MIN); - ptr->channel = ORTE_RMCAST_INVALID_CHANNEL; - OBJ_CONSTRUCT(&ptr->ctl, orte_thread_ctl_t); - ptr->seq_num = ORTE_RMCAST_SEQ_INVALID; - ptr->tag = ORTE_RMCAST_TAG_INVALID; - ptr->flags = ORTE_RMCAST_NON_PERSISTENT; /* default */ - ptr->iovec_array = NULL; - ptr->iovec_count = 0; - ptr->buf = NULL; - ptr->cbfunc_buffer = NULL; - ptr->cbfunc_iovec = NULL; - ptr->cbdata = NULL; -} -static void recv_destruct(rmcast_base_recv_t *ptr) -{ - int i; - - OBJ_DESTRUCT(&ptr->ctl); - if (NULL != ptr->iovec_array) { - for (i=0; i < ptr->iovec_count; i++) { - if (NULL != ptr->iovec_array[i].iov_base) { - free(ptr->iovec_array[i].iov_base); - } - } - free(ptr->iovec_array); - } - if (NULL != ptr->buf) { - OBJ_RELEASE(ptr->buf); - } -} -OBJ_CLASS_INSTANCE(rmcast_base_recv_t, - opal_list_item_t, - recv_construct, - recv_destruct); - -static void channel_construct(rmcast_base_channel_t *ptr) -{ - ptr->name = NULL; - ptr->channel = ORTE_RMCAST_INVALID_CHANNEL; - ptr->network = 0; - ptr->port = 0; - ptr->interface = 0; - ptr->xmit = -1; - ptr->restart = true; - ptr->seq_num = ORTE_RMCAST_SEQ_INVALID; - ptr->recv = -1; - memset(&ptr->addr, 0, sizeof(ptr->addr)); - memset(&ptr->recv_ev, 0, sizeof(opal_event_t)); - OBJ_CONSTRUCT(&ptr->cache, opal_ring_buffer_t); - opal_ring_buffer_init(&ptr->cache, orte_rmcast_base.cache_size); -} -static void channel_destruct(rmcast_base_channel_t *ptr) -{ - rmcast_send_log_t *rb; - - /* cleanup the recv side */ - if (0 < ptr->recv) { - opal_event_del(&ptr->recv_ev); - CLOSE_THE_SOCKET(ptr->recv); - } - /* release the channel name */ - if (NULL != ptr->name) { - free(ptr->name); - } - /* clear the cache */ - while (NULL != (rb = (rmcast_send_log_t*)opal_ring_buffer_pop(&ptr->cache))) { - OBJ_RELEASE(rb); - } - OBJ_DESTRUCT(&ptr->cache); -} -OBJ_CLASS_INSTANCE(rmcast_base_channel_t, - opal_list_item_t, - channel_construct, - channel_destruct); - -static void trk_construct(rmcast_seq_tracker_t *ptr) -{ - ptr->channel = ORTE_RMCAST_INVALID_CHANNEL; - ptr->seq_num = ORTE_RMCAST_SEQ_INVALID; - ptr->recovering = false; -} -OBJ_CLASS_INSTANCE(rmcast_seq_tracker_t, - opal_list_item_t, - trk_construct, NULL); - -static void recvlog_construct(rmcast_recv_log_t *ptr) -{ - ptr->name.jobid = ORTE_JOBID_INVALID; - ptr->name.vpid = ORTE_VPID_INVALID; - ORTE_EPOCH_SET(ptr->name.epoch,ORTE_EPOCH_MIN); - OBJ_CONSTRUCT(&ptr->last_msg, opal_list_t); -} -static void recvlog_destruct(rmcast_recv_log_t *ptr) -{ - opal_list_item_t *item; - - ptr->name.jobid = ORTE_JOBID_INVALID; - ptr->name.vpid = ORTE_VPID_INVALID; - ORTE_EPOCH_SET(ptr->name.epoch,ORTE_EPOCH_INVALID); - while (NULL != (item = opal_list_remove_first(&ptr->last_msg))) { - OBJ_RELEASE(item); - } - OBJ_DESTRUCT(&ptr->last_msg); -} -OBJ_CLASS_INSTANCE(rmcast_recv_log_t, - opal_list_item_t, - recvlog_construct, - recvlog_destruct); - -static void sendlog_construct(rmcast_send_log_t *ptr) -{ - ptr->channel = ORTE_RMCAST_INVALID_CHANNEL; - ptr->seq_num = ORTE_RMCAST_SEQ_INVALID; - ptr->buf = OBJ_NEW(opal_buffer_t); -} -static void sendlog_destruct(rmcast_send_log_t *ptr) -{ - if (NULL != ptr->buf) { - OBJ_RELEASE(ptr->buf); - } -} -OBJ_CLASS_INSTANCE(rmcast_send_log_t, - opal_object_t, - sendlog_construct, - sendlog_destruct); - -static void msg_construct(orte_rmcast_msg_t *ptr) -{ - ptr->buf = OBJ_NEW(opal_buffer_t); -} -static void msg_destruct(orte_rmcast_msg_t *ptr) -{ - if (NULL != ptr->buf) { - OBJ_RELEASE(ptr->buf); - } -} -OBJ_CLASS_INSTANCE(orte_rmcast_msg_t, - opal_object_t, - msg_construct, - msg_destruct); - -#endif /* ORTE_DISABLE_FULL_SUPPORT */ diff --git a/orte/mca/rmcast/base/rmcast_base_select.c b/orte/mca/rmcast/base/rmcast_base_select.c deleted file mode 100644 index 8365b29596..0000000000 --- a/orte/mca/rmcast/base/rmcast_base_select.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include "opal/mca/mca.h" -#include "opal/mca/base/base.h" - -#include "orte/mca/errmgr/errmgr.h" - -#include "orte/mca/rmcast/base/base.h" -#include "orte/mca/rmcast/base/private.h" - -static bool selected = false; - -/* - * Select one RMCAST component from all those that are available. - */ -int orte_rmcast_base_select(void) -{ - mca_base_component_t *best_component = NULL; - orte_rmcast_module_t *best_module = NULL; - int rc; - - if (selected) { - /* ensure we don't do this twice */ - return ORTE_SUCCESS; - } - selected = true; - - /* - * Select the best component - */ - if( OPAL_SUCCESS != mca_base_select("rmcast", orte_rmcast_base.rmcast_output, - &orte_rmcast_base.rmcast_opened, - (mca_base_module_t **) &best_module, - (mca_base_component_t **) &best_component) ) { - /* it is okay if no component was selected - just - * leave the default NULL module in place - */ - return ORTE_SUCCESS; - } - - orte_rmcast = *best_module; - - /* init the selected module */ - if (NULL != orte_rmcast.init) { - if (ORTE_SUCCESS != (rc = orte_rmcast.init())) { - ORTE_ERROR_LOG(rc); - return rc; - } - } - - return ORTE_SUCCESS; -} diff --git a/orte/mca/rmcast/base/rmcast_base_threads.c b/orte/mca/rmcast/base/rmcast_base_threads.c deleted file mode 100644 index 7ce46ab620..0000000000 --- a/orte/mca/rmcast/base/rmcast_base_threads.c +++ /dev/null @@ -1,516 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "orte_config.h" -#include "orte/constants.h" - -#include - -#include "opal/mca/mca.h" -#include "opal/mca/base/base.h" -#include "opal/util/fd.h" - -#include "orte/mca/errmgr/errmgr.h" -#include "orte/mca/rml/rml.h" -#include "orte/util/name_fns.h" -#include "orte/runtime/orte_globals.h" -#include "orte/threads/threads.h" - -#include "orte/mca/rmcast/base/base.h" -#include "orte/mca/rmcast/base/private.h" - -static void* rcv_processing_thread(opal_object_t *obj); -static int extract_hdr(opal_buffer_t *buf, - orte_process_name_t *name, - orte_rmcast_channel_t *channel, - orte_rmcast_tag_t *tag, - bool *restart, - orte_rmcast_seq_t *seq_num); - -int orte_rmcast_base_start_threads(void) -{ - int rc; - - if (!orte_rmcast_base.recv_process_ctl.running) { - OPAL_OUTPUT_VERBOSE((5, orte_rmcast_base.rmcast_output, - "%s rmcast:base: starting recv processing thread", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - /* setup a pipe that we will use to signal the thread that a message - * is waiting to be processed - don't define an event for it - */ - if (pipe(orte_rmcast_base.recv_pipe) < 0) { - opal_output(0, "%s Cannot open recv processing thread ctl pipe", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); - return ORTE_ERR_OUT_OF_RESOURCE; - } - /* start the thread - we will send it a NULL msg pointer when - * we want it to stop - */ - orte_rmcast_base.recv_process.t_run = rcv_processing_thread; - if (ORTE_SUCCESS != (rc = opal_thread_start(&orte_rmcast_base.recv_process))) { - ORTE_ERROR_LOG(rc); - orte_rmcast_base.recv_process_ctl.running = false; - return rc; - } - - OPAL_OUTPUT_VERBOSE((5, orte_rmcast_base.rmcast_output, - "%s rmcast:base: recv processing thread started", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - } - - return ORTE_SUCCESS; -} - -void orte_rmcast_base_stop_threads(void) -{ - opal_buffer_t *msg=NULL; - - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.recv_process_ctl); - if (orte_rmcast_base.recv_process_ctl.running) { - ORTE_RELEASE_THREAD(&orte_rmcast_base.recv_process_ctl); - if (orte_abnormal_term_ordered) { - OPAL_OUTPUT_VERBOSE((5, orte_rmcast_base.rmcast_output, - "%s rmcast:base: killing recv processing thread", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - opal_thread_kill(&orte_rmcast_base.recv_process, SIGTERM); - orte_rmcast_base.recv_process_ctl.running = false; - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.recv_process_ctl); - } else { - OPAL_OUTPUT_VERBOSE((5, orte_rmcast_base.rmcast_output, - "%s rmcast:base: stopping recv processing thread", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - opal_fd_write(orte_rmcast_base.recv_pipe[1], sizeof(opal_buffer_t*), &msg); - opal_thread_join(&orte_rmcast_base.recv_process, NULL); - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.recv_process_ctl); - } - } - ORTE_RELEASE_THREAD(&orte_rmcast_base.recv_process_ctl); - - OPAL_OUTPUT_VERBOSE((5, orte_rmcast_base.rmcast_output, - "%s rmcast:base: all threads stopped", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); -} - -static void cbfunc(int status, - orte_process_name_t *peer, - opal_buffer_t *buffer, - orte_rml_tag_t tag, - void* cbdata) -{ - OBJ_RELEASE(buffer); -} - -void orte_rmcast_base_process_msg(orte_rmcast_msg_t *msg) -{ - orte_rmcast_channel_t channel; - rmcast_base_recv_t *ptr, *recv=NULL; - orte_process_name_t name; - orte_rmcast_tag_t tag; - int8_t flag; - struct iovec *iovec_array=NULL; - int32_t iovec_count=0, i, n, isz; - int rc=ORTE_SUCCESS; - orte_rmcast_seq_t recvd_seq_num; - opal_list_item_t *item; - rmcast_seq_tracker_t *trkr, *tptr; - rmcast_recv_log_t *log, *logptr; - bool restart; - opal_buffer_t *alert; - - /* extract the header */ - if (ORTE_SUCCESS != (rc = extract_hdr(msg->buf, &name, &channel, &tag, &restart, &recvd_seq_num))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - - /* if this message is from myself, ignore it */ - if (name.jobid == ORTE_PROC_MY_NAME->jobid && name.vpid == ORTE_PROC_MY_NAME->vpid) { - OPAL_OUTPUT_VERBOSE((10, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv sent from myself: %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(&name))); - goto cleanup; - } - - /* if this is a heartbeat and I am not a daemon or a scheduler, then ignore it - * to avoid swamping tools - */ - if (!(ORTE_PROC_IS_DAEMON || ORTE_PROC_IS_SCHEDULER) && ORTE_RMCAST_TAG_HEARTBEAT == tag) { - OPAL_OUTPUT_VERBOSE((10, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv ignoring heartbeat", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - goto cleanup; - } - - /* if this message is from a different job family, ignore it unless - * it is on the system channel. We ignore these messages to avoid - * confusion between different jobs since we all may be sharing - * multicast channels. The system channel is left open to support - * cross-job communications for detecting multiple conflicting DVMs. - */ - if (ORTE_JOB_FAMILY(name.jobid) != ORTE_JOB_FAMILY(ORTE_PROC_MY_NAME->jobid) && - (ORTE_RMCAST_SYS_CHANNEL != channel)) { - /* if we are not the HNP or a daemon, then we ignore this */ - if (ORTE_PROC_IS_HNP || ORTE_PROC_IS_DAEMON) { - OPAL_OUTPUT_VERBOSE((10, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv from a different job family: %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(&name))); - } else { - goto cleanup; - } - } - - if (orte_rmcast_base.unreliable_xport) { - /* if the message is not on a system-specified channel, then check to see if we - * are missing any messages and need a resend - */ - if (ORTE_RMCAST_DYNAMIC_CHANNELS <= channel) { - log = NULL; - for (item = opal_list_get_first(&orte_rmcast_base.msg_logs); - item != opal_list_get_end(&orte_rmcast_base.msg_logs); - item = opal_list_get_next(item)) { - logptr = (rmcast_recv_log_t*)item; - /* look for this source */ - if (name.jobid == logptr->name.jobid && - name.vpid == logptr->name.vpid) { - log = logptr; - break; - } - } - if (NULL == log) { - /* new source */ - log = OBJ_NEW(rmcast_recv_log_t); - log->name.jobid = name.jobid; - log->name.vpid = name.vpid; - opal_list_append(&orte_rmcast_base.msg_logs, &log->super); - } - /* look for the channel */ - trkr = NULL; - for (item = opal_list_get_first(&log->last_msg); - item != opal_list_get_end(&log->last_msg); - item = opal_list_get_next(item)) { - tptr = (rmcast_seq_tracker_t*)item; - if (channel == tptr->channel) { - trkr = tptr; - break; - } - } - if (NULL == trkr) { - /* new channel */ - trkr = OBJ_NEW(rmcast_seq_tracker_t); - trkr->channel = channel; - opal_list_append(&log->last_msg, &trkr->super); - OPAL_OUTPUT_VERBOSE((10, orte_rmcast_base.rmcast_output, - "%s NEW CHANNEL: %d SENDER: %s SEQ %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - channel, ORTE_NAME_PRINT(&log->name), recvd_seq_num)); - } else if (ORTE_RMCAST_SEQ_INVALID != trkr->seq_num && !restart) { - /* if this is a repeat msg, ignore it */ - if (recvd_seq_num <= trkr->seq_num) { - OPAL_OUTPUT_VERBOSE((1, orte_rmcast_base.rmcast_output, - "%s Repeat msg %d on channel %d from source %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), recvd_seq_num, channel, - ORTE_NAME_PRINT(&name))); - goto cleanup; - } - if (1 != (recvd_seq_num - trkr->seq_num) || - (ORTE_RMCAST_SEQ_MAX == trkr->seq_num && 0 != recvd_seq_num)) { - /* if we are already recovering, don't bother complaining again - this - * let's us drain the pipe of any messages we receive prior to the - * recovery message stream starting. So if (ahem) someone holds us in gdb, - * for example, then we need to jetison all the messages that might have - * stacked up in the interim or else we'll generate a bunch of recovery - * requests. - */ - if (trkr->recovering) { - goto cleanup; - } - /* missing a message - request it */ - opal_output(0, "%s Missed msg %d (%d) on channel %d from source %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), recvd_seq_num, - trkr->seq_num, channel, ORTE_NAME_PRINT(&name)); - trkr->recovering = true; - alert = OBJ_NEW(opal_buffer_t); - if (ORTE_SUCCESS != (rc = opal_dss.pack(alert, &channel, 1, ORTE_RMCAST_CHANNEL_T))) { - ORTE_ERROR_LOG(rc); - exit(1); - } - if (ORTE_SUCCESS != (rc = opal_dss.pack(alert, &trkr->seq_num, 1, ORTE_RMCAST_SEQ_T))) { - ORTE_ERROR_LOG(rc); - exit(1); - } - if (0 > (rc = orte_rml.send_buffer_nb(&name, alert, ORTE_RML_TAG_MISSED_MSG, 0, cbfunc, NULL))) { - ORTE_ERROR_LOG(rc); - exit(1); - } - goto cleanup; - } - OPAL_OUTPUT_VERBOSE((10, orte_rmcast_base.rmcast_output, - "%s CHANNEL: %d SENDER: %s SEQ: %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - channel, ORTE_NAME_PRINT(&log->name), recvd_seq_num)); - } - trkr->seq_num = recvd_seq_num; - /* always reset the recovering flag so we will bark if - * another message is lost - */ - trkr->recovering = false; - } - } - - /* unpack the iovec vs buf flag */ - n=1; - if (ORTE_SUCCESS != (rc = opal_dss.unpack(msg->buf, &flag, &n, OPAL_INT8))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - - OPAL_OUTPUT_VERBOSE((5, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv sender: %s channel: %d tag: %d %s seq_num: %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(&name), channel, (int)tag, - (0 == flag) ? "iovecs" : "buffer", recvd_seq_num)); - - - /* find the recv for this channel, tag, and type */ - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.main_ctl); - for (item = opal_list_get_first(&orte_rmcast_base.recvs); - item != opal_list_get_end(&orte_rmcast_base.recvs); - item = opal_list_get_next(item)) { - ptr = (rmcast_base_recv_t*)item; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv checking channel %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - (int)ptr->channel, (int)ptr->tag)); - - if (channel != ptr->channel) { - continue; - } - - if (tag != ptr->tag && ORTE_RMCAST_TAG_WILDCARD != ptr->tag) { - continue; - } - - ptr->seq_num = recvd_seq_num; - recv = ptr; - break; - } - - if (NULL == recv) { - /* recv not found - dump msg */ - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - goto cleanup; - } - - if (!(ORTE_RMCAST_PERSISTENT & recv->flags)) { - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv removing non-persistent recv", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - opal_list_remove_item(&orte_rmcast_base.recvs, &recv->item); - } - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv delivering message to channel %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), recv->channel, (int)tag)); - - /* we have a matching recv - unpack the data */ - if (0 == flag) { - /* get the number of iovecs in the buffer */ - n=1; - if (ORTE_SUCCESS != (rc = opal_dss.unpack(msg->buf, &iovec_count, &n, OPAL_INT32))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - /* malloc the required space */ - iovec_array = (struct iovec *)malloc(iovec_count * sizeof(struct iovec)); - /* unpack the iovecs */ - for (i=0; i < iovec_count; i++) { - /* unpack the number of bytes in this iovec */ - n=1; - if (ORTE_SUCCESS != (rc = opal_dss.unpack(msg->buf, &isz, &n, OPAL_INT32))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - iovec_array[i].iov_base = NULL; - iovec_array[i].iov_len = isz; - if (0 < isz) { - /* allocate the space */ - iovec_array[i].iov_base = (IOVBASE_TYPE*)malloc(isz); - /* unpack the data */ - if (ORTE_SUCCESS != (rc = opal_dss.unpack(msg->buf, iovec_array[i].iov_base, &isz, OPAL_UINT8))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - } - } - if (NULL != recv->cbfunc_iovec) { - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv delivering iovecs to channel %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), recv->channel, (int)tag)); - recv->cbfunc_iovec(ORTE_SUCCESS, recv->channel, recv->seq_num, tag, - &name, iovec_array, iovec_count, recv->cbdata); - } else { - /* if something is already present, then we have a problem */ - if (NULL != recv->iovec_array) { - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv blocking recv already fulfilled", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - goto cleanup; - } - /* copy over the iovec array since it will be released by - * the blocking recv - */ - recv->iovec_array = (struct iovec *)malloc(iovec_count * sizeof(struct iovec)); - recv->iovec_count = iovec_count; - for (i=0; i < iovec_count; i++) { - recv->iovec_array[i].iov_base = (IOVBASE_TYPE*)malloc(iovec_array[i].iov_len); - recv->iovec_array[i].iov_len = iovec_array[i].iov_len; - memcpy(recv->iovec_array[i].iov_base, iovec_array[i].iov_base, iovec_array[i].iov_len); - } - /* release blocking recv */ - ORTE_WAKEUP_THREAD(&recv->ctl); - } - } else { - if (NULL != recv->cbfunc_buffer) { - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv delivering buffer to channel %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), recv->channel, (int)tag)); - recv->cbfunc_buffer(ORTE_SUCCESS, recv->channel, recv->seq_num, tag, - &name, msg->buf, recv->cbdata); - } else { - /* if something is already present, then we have a problem */ - if (NULL != recv->buf) { - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv blocking recv already fulfilled", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - goto cleanup; - } - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:base:process_recv copying buffer for blocking recv", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - /* copy the buffer across since it will be released - * by the blocking recv - */ - recv->buf = OBJ_NEW(opal_buffer_t); - if (ORTE_SUCCESS != (rc = opal_dss.copy_payload(recv->buf, msg->buf))) { - ORTE_ERROR_LOG(rc); - goto cleanup; - } - /* release blocking recv */ - ORTE_WAKEUP_THREAD(&recv->ctl); - } - } - - cleanup: - if (NULL != iovec_array) { - for (i=0; i < iovec_count; i++) { - free(iovec_array[i].iov_base); - } - free(iovec_array); - iovec_array = NULL; - iovec_count = 0; - } - if (NULL != msg) { - OBJ_RELEASE(msg); - } - return; -} - - -static void* rcv_processing_thread(opal_object_t *obj) -{ - orte_rmcast_msg_t *msg; - int rc; - struct timespec tp={0, 10}; - - OPAL_OUTPUT_VERBOSE((5, orte_rmcast_base.rmcast_output, - "%s rmcast:base: recv processing thread operational", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.recv_process_ctl); - orte_rmcast_base.recv_process_ctl.running = true; - ORTE_RELEASE_THREAD(&orte_rmcast_base.recv_process_ctl); - - while (1) { - /* block here until a trigger arrives */ - if (0 > (rc = opal_fd_read(orte_rmcast_base.recv_pipe[0], - sizeof(orte_rmcast_msg_t*), &msg))) { - /* if something bad happened, punt */ - opal_output(0, "%s PUNTING THREAD", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.recv_process_ctl); - orte_rmcast_base.recv_process_ctl.running = false; - ORTE_RELEASE_THREAD(&orte_rmcast_base.recv_process_ctl); - /* give a little delay to ensure the main thread gets into - * opal_thread_join before we exit - */ - nanosleep(&tp, NULL); - return OPAL_THREAD_CANCELLED; - } - /* check to see if we were told to stop */ - if (NULL == msg) { - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.recv_process_ctl); - orte_rmcast_base.recv_process_ctl.running = false; - ORTE_RELEASE_THREAD(&orte_rmcast_base.recv_process_ctl); - return OPAL_THREAD_CANCELLED; - } - - /* process it - processing function releases the msg */ - orte_rmcast.process_msg(msg); - } -} - -static int extract_hdr(opal_buffer_t *buf, - orte_process_name_t *name, - orte_rmcast_channel_t *channel, - orte_rmcast_tag_t *tag, - bool *restart, - orte_rmcast_seq_t *seq_num) -{ - int rc; - int32_t n; - uint8_t flag; - - n=1; - if (ORTE_SUCCESS != (rc = opal_dss.unpack(buf, name, &n, ORTE_NAME))) { - ORTE_ERROR_LOG(rc); - return rc; - } - - n=1; - if (ORTE_SUCCESS != (rc = opal_dss.unpack(buf, channel, &n, ORTE_RMCAST_CHANNEL_T))) { - ORTE_ERROR_LOG(rc); - return rc; - } - - n=1; - if (ORTE_SUCCESS != (rc = opal_dss.unpack(buf, tag, &n, ORTE_RMCAST_TAG_T))) { - ORTE_ERROR_LOG(rc); - return rc; - } - - n=1; - if (ORTE_SUCCESS != (rc = opal_dss.unpack(buf, &flag, &n, OPAL_UINT8))) { - ORTE_ERROR_LOG(rc); - return rc; - } - if (flag) { - *restart = true; - } else { - *restart = false; - } - - n=1; - if (ORTE_SUCCESS != (rc = opal_dss.unpack(buf, seq_num, &n, ORTE_RMCAST_SEQ_T))) { - ORTE_ERROR_LOG(rc); - } - return rc; -} diff --git a/orte/mca/rmcast/rmcast.h b/orte/mca/rmcast/rmcast.h deleted file mode 100644 index a4485469f9..0000000000 --- a/orte/mca/rmcast/rmcast.h +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -/** - * @file - * - * Reliable Multicast Framework. - */ - - -#ifndef ORTE_MCA_RMCAST_H_ -#define ORTE_MCA_RMCAST_H_ - -#include "orte_config.h" -#include "orte/types.h" - -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_UIO_H -#include -#endif - -#include "opal/mca/mca.h" -#include "opal/dss/dss_types.h" - -#include "orte/mca/rmcast/rmcast_types.h" - -BEGIN_C_DECLS - - -/* ******************************************************************** */ - - -/* initialize the selected module */ -typedef int (*orte_rmcast_base_module_init_fn_t)(void); - -/* finalize the selected module */ -typedef void (*orte_rmcast_base_module_finalize_fn_t)(void); - -/* send a buffered message across a multicast channel */ -typedef int (*orte_rmcast_base_module_send_buffer_fn_t)(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - opal_buffer_t *buf); - -/* non-blocking send messages from a multicast channel */ -typedef int (*orte_rmcast_base_module_send_buffer_nb_fn_t)(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - opal_buffer_t *buf, - orte_rmcast_callback_buffer_fn_t cbfunc, - void *cbdata); - -/* send iovec message across a multicast channel */ -typedef int (*orte_rmcast_base_module_send_fn_t)(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - struct iovec *msg, int count); - -/* non-blocking send iovec message across a multicast channel */ -typedef int (*orte_rmcast_base_module_send_nb_fn_t)(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - struct iovec *msg, int count, - orte_rmcast_callback_fn_t cbfunc, - void *cbdata); - -/* blocking buffer receive from a multicast channel */ -typedef int (*orte_rmcast_base_module_recv_buffer_fn_t)(orte_process_name_t *sender, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_seq_t *seq_num, - opal_buffer_t *buf); - -/* non-blocking receive buffer messages from a multicast channel */ -typedef int (*orte_rmcast_base_module_recv_buffer_nb_fn_t)(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_buffer_fn_t cbfunc, - void *cbdata); - -/* receive iovec messages from a multicast channel */ -typedef int (*orte_rmcast_base_module_recv_fn_t)(orte_process_name_t *sender, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_seq_t *seq_num, - struct iovec **msg, int *count); - -/* non-blocking receive iovec messages from a multicast channel */ -typedef int (*orte_rmcast_base_module_recv_nb_fn_t)(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_fn_t cbfunc, - void *cbdata); - -/* cancel a receive */ -typedef void (*orte_rmcast_base_module_cancel_recv_fn_t)(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag); - -/* open the specified channel */ -typedef int (*orte_rmcast_base_module_open_channel_fn_t)(orte_rmcast_channel_t channel, char *name, - char *network, int port, char *interface, uint8_t direction); - -/* close the channel */ -typedef int (*orte_rmcast_base_module_close_channel_fn_t)(orte_rmcast_channel_t channel); - -/* return my group's channels */ -typedef int (*orte_rmcast_base_module_query_channel_fn_t)(orte_rmcast_channel_t *output, - orte_rmcast_channel_t *input); - -/* process a recvd message */ -typedef void (*orte_rmcast_base_module_process_msg_fn_t)(orte_rmcast_msg_t *msg); - -/* - * rmcast component - */ -struct orte_rmcast_base_component_1_0_0_t { - /** component version */ - mca_base_component_t version; - /** component data */ - mca_base_component_data_t base_data; -}; -/** Convenience typedef */ -typedef struct orte_rmcast_base_component_1_0_0_t orte_rmcast_base_component_1_0_0_t; -/** Convenience typedef */ -typedef orte_rmcast_base_component_1_0_0_t orte_rmcast_base_component_t; - -/* disable comm - includes terminating all threads. This is - * required for clean shutdown of codes that use this framework - * as otherwise rmcast can segfault if it is executing a cbfunc - * for a recvd message and the receiver goes away! - */ -typedef void (*orte_rmcast_base_module_disable_comm_fn_t)(void); - -/* reverses the effect */ -typedef void (*orte_rmcast_base_module_enable_comm_fn_t)(void); - -/* - * Component modules Ver 1.0 - */ -struct orte_rmcast_base_module_t { - orte_rmcast_base_module_init_fn_t init; - orte_rmcast_base_module_finalize_fn_t finalize; - orte_rmcast_base_module_send_fn_t send; - orte_rmcast_base_module_send_nb_fn_t send_nb; - orte_rmcast_base_module_send_buffer_fn_t send_buffer; - orte_rmcast_base_module_send_buffer_nb_fn_t send_buffer_nb; - orte_rmcast_base_module_recv_fn_t recv; - orte_rmcast_base_module_recv_nb_fn_t recv_nb; - orte_rmcast_base_module_recv_buffer_fn_t recv_buffer; - orte_rmcast_base_module_recv_buffer_nb_fn_t recv_buffer_nb; - orte_rmcast_base_module_cancel_recv_fn_t cancel_recv; - orte_rmcast_base_module_open_channel_fn_t open_channel; - orte_rmcast_base_module_close_channel_fn_t close_channel; - orte_rmcast_base_module_query_channel_fn_t query_channel; - orte_rmcast_base_module_enable_comm_fn_t enable_comm; - orte_rmcast_base_module_disable_comm_fn_t disable_comm; - orte_rmcast_base_module_process_msg_fn_t process_msg; -}; -/** Convienence typedef */ -typedef struct orte_rmcast_base_module_t orte_rmcast_module_t; - -/** Interface for RMCAST communication */ -ORTE_DECLSPEC extern orte_rmcast_module_t orte_rmcast; - - -/* ******************************************************************** */ - - -/** Macro for use in components that are of type rmcast */ -#define ORTE_RMCAST_BASE_VERSION_1_0_0 \ - MCA_BASE_VERSION_2_0_0, \ - "rmcast", 1, 0, 0 - - -/* ******************************************************************** */ - - -END_C_DECLS - -#endif diff --git a/orte/mca/rmcast/rmcast_types.h b/orte/mca/rmcast/rmcast_types.h deleted file mode 100644 index 61aa5d4625..0000000000 --- a/orte/mca/rmcast/rmcast_types.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** @file: - * - * Contains the typedefs for the use of the rmcast - */ - -#ifndef MCA_RMCAST_TYPES_H_ -#define MCA_RMCAST_TYPES_H_ - -#include "orte_config.h" -#include "orte/constants.h" -#include "orte/types.h" - -#ifdef HAVE_SYS_UIO_H -#include -#endif - -#include "opal/dss/dss_types.h" - -BEGIN_C_DECLS - -/* Data structure for passing messages to recv processing */ -typedef struct { - opal_object_t super; - orte_process_name_t sender; - opal_buffer_t *buf; -} orte_rmcast_msg_t; -ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_rmcast_msg_t); - -/* channel type */ -typedef uint32_t orte_rmcast_channel_t; -#define ORTE_RMCAST_CHANNEL_T OPAL_UINT32 - -/* ORTE IP multicast channels */ -#define ORTE_RMCAST_GROUP_INPUT_CHANNEL 0 -#define ORTE_RMCAST_GROUP_OUTPUT_CHANNEL 1 -#define ORTE_RMCAST_WILDCARD_CHANNEL 2 -#define ORTE_RMCAST_INVALID_CHANNEL 3 -#define ORTE_RMCAST_SYS_CHANNEL 4 -#define ORTE_RMCAST_APP_PUBLIC_CHANNEL 5 -#define ORTE_RMCAST_DATA_SERVER_CHANNEL 6 -#define ORTE_RMCAST_ERROR_CHANNEL 7 -#define ORTE_RMCAST_HEARTBEAT_CHANNEL 8 - -#define ORTE_RMCAST_DYNAMIC_CHANNELS 10 - - -/* define channel directions */ -#define ORTE_RMCAST_XMIT 0x01 -#define ORTE_RMCAST_RECV 0x02 -#define ORTE_RMCAST_BIDIR 0x03 - -/* define channel flags */ -#define ORTE_RMCAST_MY_INPUT 0x10 -#define ORTE_RMCAST_MY_OUTPUT 0x20 - -/* Message matching tag */ -typedef int32_t orte_rmcast_tag_t; -#define ORTE_RMCAST_TAG_T OPAL_INT32 - -/* tag values for well-known services */ -#define ORTE_RMCAST_TAG_WILDCARD 0 -#define ORTE_RMCAST_TAG_INVALID 1 -#define ORTE_RMCAST_TAG_BOOTSTRAP 2 -#define ORTE_RMCAST_TAG_ANNOUNCE 3 -#define ORTE_RMCAST_TAG_OUTPUT 4 -#define ORTE_RMCAST_TAG_PS 5 -#define ORTE_RMCAST_TAG_MSG 6 -#define ORTE_RMCAST_TAG_TOOL 7 -#define ORTE_RMCAST_TAG_IOF 8 -#define ORTE_RMCAST_TAG_DATA 9 -#define ORTE_RMCAST_TAG_CMD_ACK 10 -#define ORTE_RMCAST_TAG_HEARTBEAT 11 -#define ORTE_RMCAST_TAG_COMMAND 12 -#define ORTE_RMCAST_TAG_ERRMGR 13 -#define ORTE_RMCAST_TAG_UPDATE_STATE 14 -#define ORTE_RMCAST_TAG_TERMINATE 15 - -/* starting value for dynamically assignable tags */ -#define ORTE_RMCAST_TAG_DYNAMIC 100 - - -/* persistence of recv requests */ -typedef uint8_t orte_rmcast_flag_t; -#define ORTE_RMCAST_NON_PERSISTENT 0x00 -#define ORTE_RMCAST_PERSISTENT 0x01 - -/* message sequence number */ -typedef int32_t orte_rmcast_seq_t; -#define ORTE_RMCAST_SEQ_MAX INT32_MAX -#define ORTE_RMCAST_SEQ_INVALID -1 -#define ORTE_RMCAST_SEQ_T OPAL_INT32 - -/** - * Function prototypes for callback from receiving multicast messages - */ -typedef void (*orte_rmcast_callback_buffer_fn_t)(int status, - orte_rmcast_channel_t channel, - orte_rmcast_seq_t seq_num, - orte_rmcast_tag_t tag, - orte_process_name_t *sender, - opal_buffer_t *buf, void* cbdata); - -typedef void (*orte_rmcast_callback_fn_t)(int status, - orte_rmcast_channel_t channel, - orte_rmcast_seq_t seq_num, - orte_rmcast_tag_t tag, - orte_process_name_t *sender, - struct iovec *msg, int count, void* cbdata); - - -END_C_DECLS - - -#endif /* MCA_RMCAST_TYPES_H_ */ diff --git a/orte/mca/rmcast/tcp/Makefile.am b/orte/mca/rmcast/tcp/Makefile.am deleted file mode 100644 index 44a9941bd3..0000000000 --- a/orte/mca/rmcast/tcp/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -if MCA_BUILD_orte_rmcast_tcp_DSO -component_noinst = -component_install = mca_rmcast_tcp.la -else -component_noinst = libmca_rmcast_tcp.la -component_install = -endif - -rmcast_tcp_SOURCES = \ - rmcast_tcp.c \ - rmcast_tcp.h \ - rmcast_tcp_component.c - -mcacomponentdir = $(pkglibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_rmcast_tcp_la_SOURCES = $(rmcast_tcp_SOURCES) -mca_rmcast_tcp_la_LDFLAGS = -module -avoid-version - -noinst_LTLIBRARIES = $(component_noinst) -libmca_rmcast_tcp_la_SOURCES = $(rmcast_tcp_SOURCES) -libmca_rmcast_tcp_la_LIBADD = -libmca_rmcast_tcp_la_LDFLAGS = -module -avoid-version diff --git a/orte/mca/rmcast/tcp/configure.m4 b/orte/mca/rmcast/tcp/configure.m4 deleted file mode 100644 index 812bc5bb83..0000000000 --- a/orte/mca/rmcast/tcp/configure.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# MCA_rmcast_tcp_CONFIG([action-if-found], [action-if-not-found]) -# ----------------------------------------------------------- -AC_DEFUN([MCA_orte_rmcast_tcp_CONFIG], [ - AC_CONFIG_FILES([orte/mca/rmcast/tcp/Makefile]) - - # if we don't want reliable multicast, don't compile - # this component - AS_IF([test "$orte_want_multicast" = "1"], - [$1], [$2]) -])dnl - diff --git a/orte/mca/rmcast/tcp/rmcast_tcp.c b/orte/mca/rmcast/tcp/rmcast_tcp.c deleted file mode 100644 index a279a9da10..0000000000 --- a/orte/mca/rmcast/tcp/rmcast_tcp.c +++ /dev/null @@ -1,1034 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2004-2011 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -#include "orte_config.h" -#include "orte/constants.h" -#include "opal/types.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#include -#include - -#include "opal/class/opal_list.h" -#include "opal/opal_socket_errno.h" -#include "opal/util/output.h" -#include "opal/util/argv.h" -#include "opal/util/if.h" -#include "opal/util/net.h" -#include "opal/dss/dss.h" - -#include "orte/runtime/orte_globals.h" -#include "orte/runtime/orte_wait.h" -#include "orte/mca/errmgr/errmgr.h" -#include "orte/util/name_fns.h" -#include "orte/util/show_help.h" -#include "orte/mca/grpcomm/grpcomm.h" -#include "orte/mca/rml/rml.h" -#include "orte/mca/rml/base/rml_contact.h" -#include "orte/mca/odls/odls_types.h" -#include "orte/threads/threads.h" - -#include "orte/mca/rmcast/base/private.h" -#include "orte/mca/rmcast/base/base.h" -#include "rmcast_tcp.h" - -/* LOCAL DATA */ -static bool init_completed = false; -static orte_job_t *daemons=NULL; -static bool comm_enabled = false; -static orte_thread_ctl_t ctl; -static opal_list_t tools; - -/* LOCAL FUNCTIONS */ -static void recv_handler(int status, orte_process_name_t* sender, - opal_buffer_t* buffer, orte_rml_tag_t tag, - void* cbdata); - -static int send_data(rmcast_base_send_t *snd, orte_rmcast_channel_t channel); - -/* API FUNCTIONS */ -static int init(void); - -static void finalize(void); - -static int tcp_send_buffer(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - opal_buffer_t *buf); - -static int tcp_send_buffer_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - opal_buffer_t *buf, - orte_rmcast_callback_buffer_fn_t cbfunc, - void *cbdata); - -static int tcp_send(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - struct iovec *msg, int count); - -static int tcp_send_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - struct iovec *msg, int count, - orte_rmcast_callback_fn_t cbfunc, - void *cbdata); - -static int tcp_recv_buffer(orte_process_name_t *sender, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_seq_t *seq_num, - opal_buffer_t *buf); - -static int tcp_recv_buffer_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_buffer_fn_t cbfunc, - void *cbdata); - -static int tcp_recv(orte_process_name_t *sender, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_seq_t *seq_num, - struct iovec **msg, int *count); - -static int tcp_recv_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_fn_t cbfunc, - void *cbdata); - -static int open_channel(orte_rmcast_channel_t channel, char *name, - char *network, int port, char *interface, uint8_t direction); - -static void enable_comm(void); - -static void disable_comm(void); - -static void process_msg(orte_rmcast_msg_t *msg); - -/* Define the module */ - -orte_rmcast_module_t orte_rmcast_tcp_module = { - init, - finalize, - tcp_send, - tcp_send_nb, - tcp_send_buffer, - tcp_send_buffer_nb, - tcp_recv, - tcp_recv_nb, - tcp_recv_buffer, - tcp_recv_buffer_nb, - orte_rmcast_base_cancel_recv, - open_channel, - orte_rmcast_base_close_channel, - orte_rmcast_base_query, - enable_comm, - disable_comm, - process_msg -}; - -/* during init, we setup two channels for both xmit and recv: - * (a) a public address announcement channel. There are two variants - * of this: - * (1) system processes - e.g., daemons, tools. This channel - * is reserved solely for their use in performing admin - * functions - * (2) application processes. This channel is used to announce - * their existence and contact info for auto-wireup - * (b) our own group's channel, which is where our own output - * will be sent. At this time, we assume that we always - * want to hear our peers, so this channels is also - * bidirectional - * - * In addition, the HNP opens a third channel which is used solely - * for cmd-control purposes. This is where a tool, for example, might - * send a cmd to the HNP to take some action - there is no point in - * having that cmd echo around to every daemon and/or other tool - * in the system. - */ -static int init(void) -{ - int rc; - - if (init_completed) { - return ORTE_SUCCESS; - } - init_completed = true; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp: init called", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - - /* setup local ctl */ - OBJ_CONSTRUCT(&ctl, orte_thread_ctl_t); - OBJ_CONSTRUCT(&tools, opal_list_t); - - /* setup the respective public address channel */ - if (ORTE_PROC_IS_TOOL) { - /* tools only open the sys channel */ - if (ORTE_SUCCESS != (rc = open_channel(ORTE_RMCAST_SYS_CHANNEL, "system", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - orte_rmcast_base.my_output_channel = (rmcast_base_channel_t*)opal_list_get_last(&orte_rmcast_base.channels); - orte_rmcast_base.my_input_channel = NULL; - } else if (ORTE_PROC_IS_HNP || ORTE_PROC_IS_DAEMON || ORTE_PROC_IS_SCHEDULER) { - /* daemons and hnp open the sys and data server channels */ - if (ORTE_SUCCESS != (rc = open_channel(ORTE_RMCAST_SYS_CHANNEL, "system", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - orte_rmcast_base.my_output_channel = (rmcast_base_channel_t*)opal_list_get_last(&orte_rmcast_base.channels); - orte_rmcast_base.my_input_channel = NULL; - if (ORTE_SUCCESS != (rc = open_channel(ORTE_RMCAST_DATA_SERVER_CHANNEL, "data-server", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - /* open the error reporting channel */ - if (ORTE_SUCCESS != (rc = open_channel(ORTE_RMCAST_ERROR_CHANNEL, "error", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - /* open the app public channel so we can hear app announcements and commands */ - if (ORTE_SUCCESS != (rc = open_channel(ORTE_RMCAST_APP_PUBLIC_CHANNEL, "app-announce", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - /* open the heartbeat channel */ - if (ORTE_SUCCESS != (rc = open_channel(ORTE_RMCAST_HEARTBEAT_CHANNEL, "heartbeat", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - } else if (ORTE_PROC_IS_APP) { - /* apps open the app public and data server channels */ - if (ORTE_SUCCESS != (rc = open_channel(ORTE_RMCAST_APP_PUBLIC_CHANNEL, "app-announce", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - if (ORTE_SUCCESS != (rc = open_channel(ORTE_RMCAST_DATA_SERVER_CHANNEL, "data-server", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - /* open the error reporting channel */ - if (ORTE_SUCCESS != (rc = open_channel(ORTE_RMCAST_ERROR_CHANNEL, "error", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - /* finally, setup our grp xmit/recv channels, if given */ - if (NULL != orte_rmcast_base.my_group_name) { - if (ORTE_SUCCESS != (rc = open_channel(orte_rmcast_base.my_group_number, - "recv", NULL, -1, NULL, ORTE_RMCAST_RECV))) { - ORTE_ERROR_LOG(rc); - return rc; - } - orte_rmcast_base.my_input_channel = (rmcast_base_channel_t*)opal_list_get_last(&orte_rmcast_base.channels); - if (ORTE_SUCCESS != (rc = open_channel(orte_rmcast_base.my_group_number+1, - "xmit", NULL, -1, NULL, ORTE_RMCAST_XMIT))) { - ORTE_ERROR_LOG(rc); - return rc; - } - orte_rmcast_base.my_output_channel = (rmcast_base_channel_t*)opal_list_get_last(&orte_rmcast_base.channels); - } - } else { - opal_output(0, "rmcast:tcp:init - unknown process type"); - return ORTE_ERR_SILENT; - } - - if (ORTE_JOBID_WILDCARD == orte_process_info.my_hnp.jobid) { - /* set the HNP info in our contact table */ - if (ORTE_SUCCESS != (rc = orte_rml.set_contact_info(orte_process_info.my_hnp_uri))) { - orte_show_help("help-orcm-ps.txt", "orcm-ps:hnp-uri-bad", true, orte_process_info.my_hnp_uri); - return rc; - } - /* extract the name */ - if (ORTE_SUCCESS != (rc = orte_rml_base_parse_uris(orte_process_info.my_hnp_uri, - &orte_process_info.my_hnp, NULL))) { - orte_show_help("help-orcm-ps.txt", "orcm-ps:hnp-uri-bad", true, orte_process_info.my_hnp_uri); - return rc; - } - } - - /* start the processing thread */ - if (ORTE_SUCCESS != (rc = orte_rmcast_base_start_threads())) { - ORTE_ERROR_LOG(rc); - return rc; - } - - /* now activate the non-blocking recv so we catch messages */ - if (ORTE_SUCCESS != (rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, - ORTE_RML_TAG_MULTICAST, - ORTE_RML_PERSISTENT, - recv_handler, - NULL))) { - ORTE_ERROR_LOG(rc); - return rc; - } - - comm_enabled = true; - return ORTE_SUCCESS; -} - -static void finalize(void) -{ - opal_list_item_t *item; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp: finalize called", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - - /* stop the chatter */ - comm_enabled = false; - - orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_MULTICAST); - - /* stop the processing thread */ - orte_rmcast_base_stop_threads(); - - while (NULL != (item = opal_list_remove_first(&tools))) { - OBJ_RELEASE(item); - } - OBJ_DESTRUCT(&tools); - - OBJ_DESTRUCT(&ctl); - return; -} - -static void enable_comm(void) -{ - ORTE_ACQUIRE_THREAD(&ctl); - orte_rmcast_base_start_threads(); - comm_enabled = true; - ORTE_RELEASE_THREAD(&ctl); -} - -static void disable_comm(void) -{ - ORTE_ACQUIRE_THREAD(&ctl); - comm_enabled = false; - orte_rmcast_base_stop_threads(); - ORTE_RELEASE_THREAD(&ctl); -} - -static void cbfunc(int status, - struct orte_process_name_t* peer, - struct opal_buffer_t* buffer, - orte_rml_tag_t tag, - void* cbdata) -{ - OBJ_RELEASE(buffer); -} - - -static int send_data(rmcast_base_send_t *snd, - orte_rmcast_channel_t channel) -{ - opal_list_item_t *item, *next; - orte_proc_t *proc; - orte_odls_child_t *child; - int rc, v; - opal_buffer_t *buf; - rmcast_base_channel_t *ch; - orte_namelist_t *tool; - - if (!comm_enabled) { - return ORTE_ERR_COMM_DISABLED; - } - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp: send of %d %s" - " called on multicast channel %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - (NULL == snd->iovec_array) ? (int)snd->buf->bytes_used : (int)snd->iovec_count, - (NULL == snd->iovec_array) ? "bytes" : "iovecs", - (int)channel)); - - /* setup the message for xmission */ - if (ORTE_SUCCESS != (rc = orte_rmcast_base_queue_xmit(snd, channel, &buf, &ch))) { - ORTE_ERROR_LOG(rc); - ORTE_RELEASE_THREAD(&ctl); - return rc; - } - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp multicasting %d bytes to channel %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (int)buf->bytes_used, - (int)ch->channel, (int)snd->tag)); - - if (ORTE_PROC_IS_HNP || ORTE_PROC_IS_DAEMON) { - /* if we are a daemon, then we have to send it to the HNP - * for relay to all other daemons - we cannot send it - * ourselves as, at startup, we won't know who else is - * out there until -after- a startup handshake is - * exchanged via multicast - */ - if (ORTE_PROC_IS_DAEMON) { - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp sending to %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(ORTE_PROC_MY_HNP))); - /* ignore errors */ - OBJ_RETAIN(buf); - if (0 > (rc = orte_rml.send_buffer_nb(ORTE_PROC_MY_HNP, buf, ORTE_RML_TAG_MULTICAST, 0, cbfunc, NULL))) { - if (ORTE_ERR_ADDRESSEE_UNKNOWN != rc && ORTE_ERR_UNREACH != rc) { - ORTE_ERROR_LOG(rc); - } - rc = ORTE_SUCCESS; /* don't confuse up-stream client */ - } - } else { - /* if we don't already have it, get the daemon object */ - if (NULL == daemons) { - daemons = orte_get_job_data_object(ORTE_PROC_MY_NAME->jobid); - } - /* send it to each daemon other than myself */ - for (v=1; v < daemons->procs->size; v++) { - if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(daemons->procs, v))) { - continue; - } - if (NULL == proc->rml_uri) { - /* not ready yet - don't know contact info */ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp dont have path to %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(&proc->name))); - continue; - } - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp sending to %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(&proc->name))); - /* ignore errors */ - OBJ_RETAIN(buf); - if (0 > (rc = orte_rml.send_buffer_nb(&proc->name, buf, ORTE_RML_TAG_MULTICAST, 0, cbfunc, NULL))) { - if (ORTE_ERR_ADDRESSEE_UNKNOWN != rc && ORTE_ERR_UNREACH != rc) { - ORTE_ERROR_LOG(rc); - } - rc = ORTE_SUCCESS; /* don't confuse up-stream client */ - } - - /* now send it to all attached tools */ - item = opal_list_get_first(&tools); - while (item != opal_list_get_end(&tools)) { - tool = (orte_namelist_t*)item; - next = opal_list_get_next(item); - OBJ_RETAIN(buf); - if (0 > (rc = orte_rml.send_buffer_nb(&tool->name, buf, ORTE_RML_TAG_MULTICAST, 0, cbfunc, NULL))) { - if (ORTE_ERR_ADDRESSEE_UNKNOWN != rc && ORTE_ERR_UNREACH != rc) { - ORTE_ERROR_LOG(rc); - } - opal_list_remove_item(&tools, item); - OBJ_RELEASE(item); - OBJ_RELEASE(buf); - rc = ORTE_SUCCESS; /* don't confuse up-stream client */ - } - item = next; - } - } - } - /* send the message to my children */ - for (item = opal_list_get_first(&orte_local_children); - item != opal_list_get_end(&orte_local_children); - item = opal_list_get_next(item)) { - child = (orte_odls_child_t*)item; - if (!child->alive) { - continue; - } - if (NULL == child->rml_uri) { - /* race condition - hasn't reported in yet */ - continue; - } - /* ignore errors */ - OBJ_RETAIN(buf); - if (0 > (rc = orte_rml.send_buffer_nb(child->name, buf, ORTE_RML_TAG_MULTICAST, 0, cbfunc, NULL))) { - if (ORTE_ERR_ADDRESSEE_UNKNOWN != rc && ORTE_ERR_UNREACH != rc) { - ORTE_ERROR_LOG(rc); - } - rc = ORTE_SUCCESS; /* don't confuse up-stream client */ - } - } - rc = ORTE_SUCCESS; - } else { - /* I am a tool or an app - send it to my HNP for relay */ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp sending multicast to HNP %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(ORTE_PROC_MY_HNP))); - OBJ_RETAIN(buf); - if (0 > (rc = orte_rml.send_buffer_nb(ORTE_PROC_MY_HNP, buf, ORTE_RML_TAG_MULTICAST, 0, cbfunc, NULL))) { - orte_errmgr.abort(rc, "%s Failed to send message to multicast channel %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), (int)ch->channel); - goto cleanup; - } - rc = ORTE_SUCCESS; - } - - if (NULL != snd->buf) { - /* call the cbfunc if required */ - if (NULL != snd->cbfunc_buffer) { - snd->cbfunc_buffer(rc, channel, ch->seq_num, snd->tag, - ORTE_PROC_MY_NAME, - snd->buf, snd->cbdata); - } - } else { - /* call the cbfunc if required */ - if (NULL != snd->cbfunc_iovec) { - snd->cbfunc_iovec(rc, channel, ch->seq_num, snd->tag, - ORTE_PROC_MY_NAME, - snd->iovec_array, snd->iovec_count, snd->cbdata); - } - } - - cleanup: - OBJ_RELEASE(buf); - - return rc; -} - -static int tcp_send(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - struct iovec *msg, int count) -{ - rmcast_base_send_t snd; - int ret; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - /* queue it to be sent - preserves order! */ - OBJ_CONSTRUCT(&snd, rmcast_base_send_t); - snd.iovec_array = msg; - snd.iovec_count = count; - snd.tag = tag; - - if (ORTE_SUCCESS != (ret = send_data(&snd, channel))) { - ORTE_ERROR_LOG(ret); - } - - /* carefully cleanup */ - snd.iovec_array = NULL; - snd.iovec_count = 0; - OBJ_DESTRUCT(&snd); - - ORTE_RELEASE_THREAD(&ctl); - return ret; -} - -static int tcp_send_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - struct iovec *msg, int count, - orte_rmcast_callback_fn_t cbfunc, - void *cbdata) -{ - int ret; - rmcast_base_send_t snd; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - /* queue it to be sent - preserves order! */ - OBJ_CONSTRUCT(&snd, rmcast_base_send_t); - snd.iovec_array = msg; - snd.iovec_count = count; - snd.tag = tag; - snd.cbfunc_iovec = cbfunc; - snd.cbdata = cbdata; - - if (ORTE_SUCCESS != (ret = send_data(&snd, channel))) { - ORTE_ERROR_LOG(ret); - } - - /* carefully cleanup */ - snd.iovec_array = NULL; - snd.iovec_count = 0; - OBJ_DESTRUCT(&snd); - - ORTE_RELEASE_THREAD(&ctl); - return ret; -} - -static int tcp_send_buffer(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - opal_buffer_t *buf) -{ - int ret; - rmcast_base_send_t snd; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - /* queue it to be sent - preserves order! */ - OBJ_CONSTRUCT(&snd, rmcast_base_send_t); - snd.buf = buf; - snd.tag = tag; - - if (ORTE_SUCCESS != (ret = send_data(&snd, channel))) { - ORTE_ERROR_LOG(ret); - } - - /* carefully cleanup */ - snd.buf = NULL; - OBJ_DESTRUCT(&snd); - - ORTE_RELEASE_THREAD(&ctl); - return ORTE_SUCCESS; -} - -static int tcp_send_buffer_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - opal_buffer_t *buf, - orte_rmcast_callback_buffer_fn_t cbfunc, - void *cbdata) -{ - int ret; - rmcast_base_send_t snd; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - /* queue it to be sent - preserves order! */ - OBJ_CONSTRUCT(&snd, rmcast_base_send_t); - snd.buf = buf; - snd.tag = tag; - snd.cbfunc_buffer = cbfunc; - snd.cbdata = cbdata; - - if (ORTE_SUCCESS != (ret = send_data(&snd, channel))) { - ORTE_ERROR_LOG(ret); - } - - /* carefully cleanup */ - snd.buf = NULL; - OBJ_DESTRUCT(&snd); - - ORTE_RELEASE_THREAD(&ctl); - return ret; -} - -static int tcp_recv(orte_process_name_t *name, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_seq_t *seq_num, - struct iovec **msg, int *count) -{ - rmcast_base_recv_t *recvptr; - int ret; - orte_rmcast_channel_t chan; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - if (ORTE_RMCAST_GROUP_INPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_input_channel->channel; - } else if (ORTE_RMCAST_GROUP_OUTPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_output_channel->channel; - } else { - chan = channel; - } - - if (ORTE_SUCCESS != (ret = orte_rmcast_base_queue_recv(&recvptr, chan, tag, - ORTE_RMCAST_NON_PERSISTENT, - NULL, NULL, NULL, true))) { - ORTE_ERROR_LOG(ret); - return ret; - } - ORTE_RELEASE_THREAD(&ctl); - - recvptr->ctl.active = true; - ORTE_ACQUIRE_THREAD(&recvptr->ctl); - - /* xfer the data */ - if (NULL != name) { - /* caller requested id of sender */ - name->jobid = recvptr->name.jobid; - name->vpid = recvptr->name.vpid; - ORTE_EPOCH_SET(name->epoch,recvptr->name.epoch); - } - *seq_num = recvptr->seq_num; - *msg = recvptr->iovec_array; - *count = recvptr->iovec_count; - - /* remove the recv */ - recvptr->iovec_array = NULL; - recvptr->iovec_count = 0; - OBJ_RELEASE(recvptr); - - return ORTE_SUCCESS; -} - -static int tcp_recv_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_fn_t cbfunc, void *cbdata) -{ - int ret; - orte_rmcast_channel_t chan; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp: recv_nb called on channel %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel)); - - ORTE_ACQUIRE_THREAD(&ctl); - - if (ORTE_RMCAST_GROUP_INPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_input_channel->channel; - } else if (ORTE_RMCAST_GROUP_OUTPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_output_channel->channel; - } else { - chan = channel; - } - - if (ORTE_SUCCESS != (ret = orte_rmcast_base_queue_recv(NULL, chan, tag, flags, - cbfunc, NULL, cbdata, false))) { - if (ORTE_EXISTS == ret) { - ret = ORTE_SUCCESS; - } else { - ORTE_ERROR_LOG(ret); - } - } - - ORTE_RELEASE_THREAD(&ctl); - return ret; -} - -static int tcp_recv_buffer(orte_process_name_t *name, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_seq_t *seq_num, - opal_buffer_t *buf) -{ - rmcast_base_recv_t *recvptr; - int ret; - orte_rmcast_channel_t chan; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp: recv_buffer called on multicast channel %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel)); - - if (ORTE_RMCAST_GROUP_INPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_input_channel->channel; - } else if (ORTE_RMCAST_GROUP_OUTPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_output_channel->channel; - } else { - chan = channel; - } - - if (ORTE_SUCCESS != (ret = orte_rmcast_base_queue_recv(&recvptr, chan, tag, - ORTE_RMCAST_NON_PERSISTENT, - NULL, NULL, NULL, true))) { - ORTE_ERROR_LOG(ret); - ORTE_RELEASE_THREAD(&ctl); - return ret; - } - ORTE_RELEASE_THREAD(&ctl); - - recvptr->ctl.active = true; - ORTE_ACQUIRE_THREAD(&recvptr->ctl); - - /* xfer the data */ - if (NULL != name) { - /* caller requested id of sender */ - name->jobid = recvptr->name.jobid; - name->vpid = recvptr->name.vpid; - ORTE_EPOCH_SET(name->epoch,recvptr->name.epoch); - } - *seq_num = recvptr->seq_num; - if (ORTE_SUCCESS != (ret = opal_dss.copy_payload(buf, recvptr->buf))) { - ORTE_ERROR_LOG(ret); - } - /* release the recv */ - OBJ_RELEASE(recvptr); - - return ret; -} - -static int tcp_recv_buffer_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_buffer_fn_t cbfunc, void *cbdata) -{ - int ret; - orte_rmcast_channel_t chan; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp: recv_buffer_nb called on multicast channel %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel, tag)); - - ORTE_ACQUIRE_THREAD(&ctl); - - if (ORTE_RMCAST_GROUP_INPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_input_channel->channel; - } else if (ORTE_RMCAST_GROUP_OUTPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_output_channel->channel; - } else { - chan = channel; - } - - if (ORTE_SUCCESS != (ret = orte_rmcast_base_queue_recv(NULL, chan, tag, flags, - NULL, cbfunc, cbdata, false))) { - if (ORTE_EXISTS == ret) { - ret = ORTE_SUCCESS; - } else { - ORTE_ERROR_LOG(ret); - } - } - ORTE_RELEASE_THREAD(&ctl); - - return ret; -} - -/* for the tcp module, we will be using the RML to "fake" a - * multicast in combination with the grpcomm "xcast" interface. - * We cannot control the network and interface in this - * combination as it gets auto-picked well before us, so we - * ignore that info here - */ -static int open_channel(orte_rmcast_channel_t channel, char *name, - char *network, int port, char *interface, uint8_t direction) -{ - opal_list_item_t *item; - rmcast_base_channel_t *chan; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s opening channel %d for %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel, name)); - - /* see if this name has already been assigned a channel on the specified network */ - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.main_ctl); - for (item = opal_list_get_first(&orte_rmcast_base.channels); - item != opal_list_get_end(&orte_rmcast_base.channels); - item = opal_list_get_next(item)) { - chan = (rmcast_base_channel_t*)item; - - if (0 == strcasecmp(chan->name, name)) { - /* check the channel, if one was given */ - if (ORTE_RMCAST_INVALID_CHANNEL != channel) { - if (ORTE_RMCAST_INVALID_CHANNEL == chan->channel) { - chan->channel = channel; - } else if (chan->channel != channel) { - /* another channel for this name */ - goto newchan; - } - } - /* all setup - nothing to do */ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp using existing channel", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - return ORTE_SUCCESS; - } - } - - newchan: - /* we didn't find an existing match, so create a new channel */ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s creating new channel %d for %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel, name)); - - chan = OBJ_NEW(rmcast_base_channel_t); - chan->name = strdup(name); - chan->channel = channel; - /* add to list of known channels */ - opal_list_append(&orte_rmcast_base.channels, &chan->item); - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp opening new channel for%s%s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - (ORTE_RMCAST_RECV & direction) ? " RECV" : " ", - (ORTE_RMCAST_XMIT & direction) ? " XMIT" : " ")); - - return ORTE_SUCCESS; -} - - -static void process_msg(orte_rmcast_msg_t *msg) -{ - int rc; - opal_list_item_t *item, *next; - int v; - orte_proc_t *proc; - orte_odls_child_t *child; - opal_buffer_t *buf; - orte_namelist_t *tool; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp processing message from %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(&msg->sender))); - - buf = OBJ_NEW(opal_buffer_t); - opal_dss.copy_payload(buf, msg->buf); - - if (ORTE_PROC_IS_HNP) { - /* if this message came from a different job family, then we have - * to track the sender so we can relay mcast messages to them as - * they won't be a member of the daemon job - */ - if (ORTE_JOB_FAMILY(msg->sender.jobid) != ORTE_JOB_FAMILY(ORTE_PROC_MY_NAME->jobid)) { - tool = OBJ_NEW(orte_namelist_t); - tool->name.jobid = msg->sender.jobid; - tool->name.vpid = msg->sender.vpid; - opal_list_append(&tools, &tool->item); - } - - /* if we don't already have it, get the daemon object */ - if (NULL == daemons) { - daemons = orte_get_job_data_object(ORTE_PROC_MY_NAME->jobid); - } - /* relay msg to each daemon excluding myself and whomever sent this to me */ - for (v=1; v < daemons->procs->size; v++) { - if (NULL == (proc = (orte_proc_t*)opal_pointer_array_get_item(daemons->procs, v))) { - continue; - } - if (NULL == proc->rml_uri) { - /* not ready yet - don't know contact info */ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp dont have path to %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(&proc->name))); - continue; - } - if (msg->sender.jobid == proc->name.jobid && - msg->sender.vpid == proc->name.vpid) { - continue; - } - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp relaying msg to %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(&proc->name))); - /* ignore errors */ - OBJ_RETAIN(buf); - if (0 > (rc = orte_rml.send_buffer_nb(&proc->name, buf, ORTE_RML_TAG_MULTICAST, 0, cbfunc, NULL))) { - if (ORTE_ERR_ADDRESSEE_UNKNOWN != rc && ORTE_ERR_UNREACH != rc) { - ORTE_ERROR_LOG(rc); - } - rc = ORTE_SUCCESS; /* don't confuse up-stream client */ - } - /* now send it to all attached tools except whomever sent it to me, if applicable */ - item = opal_list_get_first(&tools); - while (item != opal_list_get_end(&tools)) { - tool = (orte_namelist_t*)item; - next = opal_list_get_next(item); - if (msg->sender.jobid == tool->name.jobid && - msg->sender.vpid == tool->name.vpid) { - item = next; - continue; - } - OBJ_RETAIN(buf); - if (0 > (rc = orte_rml.send_buffer_nb(&tool->name, buf, ORTE_RML_TAG_MULTICAST, 0, cbfunc, NULL))) { - if (ORTE_ERR_ADDRESSEE_UNKNOWN != rc && ORTE_ERR_UNREACH != rc) { - ORTE_ERROR_LOG(rc); - } - opal_list_remove_item(&tools, item); - OBJ_RELEASE(item); - OBJ_RELEASE(buf); - rc = ORTE_SUCCESS; /* don't confuse up-stream client */ - } - item = next; - } - } - } - - if (ORTE_PROC_IS_HNP || ORTE_PROC_IS_DAEMON) { - /* need to relay this to my children */ - for (item = opal_list_get_first(&orte_local_children); - item != opal_list_get_end(&orte_local_children); - item = opal_list_get_next(item)) { - child = (orte_odls_child_t*)item; - if (!child->alive) { - continue; - } - if (NULL == child->rml_uri) { - /* race condition */ - continue; - } - if (msg->sender.jobid == child->name->jobid && - msg->sender.vpid == child->name->vpid) { - continue; - } - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s relaying multicast to %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(child->name))); - - /* ignore errors */ - OBJ_RETAIN(buf); - if (0 > (rc = orte_rml.send_buffer_nb(child->name, buf, ORTE_RML_TAG_MULTICAST, 0, cbfunc, NULL))) { - if (ORTE_ERR_ADDRESSEE_UNKNOWN != rc && ORTE_ERR_UNREACH != rc) { - ORTE_ERROR_LOG(rc); - } - rc = ORTE_SUCCESS; /* don't confuse up-stream client */ - } - } - } - OBJ_RELEASE(buf); - - /* now process it myself - this releases the msg */ - orte_rmcast_base_process_msg(msg); -} - - /**** LOCAL FUNCTIONS ****/ -static void recv_handler(int status, orte_process_name_t* sender, - opal_buffer_t* buffer, orte_rml_tag_t tag, - void* cbdata) -{ - if (!comm_enabled) { - return; - } - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:tcp recvd multicast msg", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - - /* clear the way for the next message */ - ORTE_MULTICAST_MESSAGE_EVENT(sender, buffer); - - return; -} diff --git a/orte/mca/rmcast/tcp/rmcast_tcp.h b/orte/mca/rmcast/tcp/rmcast_tcp.h deleted file mode 100644 index cbd476c215..0000000000 --- a/orte/mca/rmcast/tcp/rmcast_tcp.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - * - */ - -#ifndef ORTE_RMCAST_TCP_H -#define ORTE_RMCAST_TCP_H - -#include "orte_config.h" - -#include "opal/mca/mca.h" -#include "opal/mca/base/base.h" - -#include "orte/mca/rmcast/rmcast.h" - - -BEGIN_C_DECLS - -ORTE_MODULE_DECLSPEC extern orte_rmcast_base_component_t mca_rmcast_tcp_component; -extern orte_rmcast_module_t orte_rmcast_tcp_module; - -END_C_DECLS - -#endif diff --git a/orte/mca/rmcast/tcp/rmcast_tcp_component.c b/orte/mca/rmcast/tcp/rmcast_tcp_component.c deleted file mode 100644 index e6b90974c3..0000000000 --- a/orte/mca/rmcast/tcp/rmcast_tcp_component.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "orte_config.h" - -#include "opal/mca/base/base.h" - -#include "orte/util/proc_info.h" -#include "orte/runtime/orte_globals.h" - -#include "rmcast_tcp.h" - -/* - * Local functions - */ -static int orte_rmcast_tcp_open(void); -static int orte_rmcast_tcp_close(void); -static int orte_rmcast_tcp_query(mca_base_module_t **module, int *priority); - -/* - * Local variables - */ -static bool initialized = false; - -/* - * Public string showing the iof hnp component version number - */ -const char *mca_rmcast_tcp_component_version_string = - "Open MPI tcp rmcast MCA component version " ORTE_VERSION; - -orte_rmcast_base_component_t mca_rmcast_tcp_component = { - { - ORTE_RMCAST_BASE_VERSION_1_0_0, - - "tcp", /* MCA component name */ - ORTE_MAJOR_VERSION, /* MCA component major version */ - ORTE_MINOR_VERSION, /* MCA component minor version */ - ORTE_RELEASE_VERSION, /* MCA component release version */ - - /* Component open, close, and query functions */ - orte_rmcast_tcp_open, - orte_rmcast_tcp_close, - orte_rmcast_tcp_query - }, - { - /* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - } -}; - -/** - * component open/close/init function - */ -static int orte_rmcast_tcp_open(void) -{ - return ORTE_SUCCESS; -} - - -static int orte_rmcast_tcp_close(void) -{ - return ORTE_SUCCESS; -} - -/** - * Module query - */ - -static int orte_rmcast_tcp_query(mca_base_module_t **module, int *priority) -{ - if (!ORTE_PROC_IS_HNP && NULL == orte_process_info.my_hnp_uri) { - /* cannot operate */ - *priority = 0; - *module = NULL; - return ORTE_ERROR; - } - - /* selected by choice */ - *priority = 50; - *module = (mca_base_module_t *) &orte_rmcast_tcp_module; - initialized = true; - - return ORTE_SUCCESS; -} diff --git a/orte/mca/rmcast/udp/Makefile.am b/orte/mca/rmcast/udp/Makefile.am deleted file mode 100644 index a8f8360385..0000000000 --- a/orte/mca/rmcast/udp/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -# -# Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# Make the output library in this directory, and name it either -# mca__.la (for DSO builds) or libmca__.la -# (for static builds). - -if MCA_BUILD_orte_rmcast_udp_DSO -component_noinst = -component_install = mca_rmcast_udp.la -else -component_noinst = libmca_rmcast_udp.la -component_install = -endif - -dist_pkgdata_DATA = help-orte-rmcast-udp.txt - -rmcast_udp_SOURCES = \ - rmcast_udp.c \ - rmcast_udp.h \ - rmcast_udp_component.c - -mcacomponentdir = $(pkglibdir) -mcacomponent_LTLIBRARIES = $(component_install) -mca_rmcast_udp_la_SOURCES = $(rmcast_udp_SOURCES) -mca_rmcast_udp_la_LDFLAGS = -module -avoid-version - -noinst_LTLIBRARIES = $(component_noinst) -libmca_rmcast_udp_la_SOURCES = $(rmcast_udp_SOURCES) -libmca_rmcast_udp_la_LIBADD = -libmca_rmcast_udp_la_LDFLAGS = -module -avoid-version diff --git a/orte/mca/rmcast/udp/configure.m4 b/orte/mca/rmcast/udp/configure.m4 deleted file mode 100644 index 5ceda025f7..0000000000 --- a/orte/mca/rmcast/udp/configure.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# -*- shell-script -*- -# -# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -# $COPYRIGHT$ -# -# Additional copyrights may follow -# -# $HEADER$ -# - -# MCA_rmcast_udp_CONFIG([action-if-found], [action-if-not-found]) -# ----------------------------------------------------------- -AC_DEFUN([MCA_orte_rmcast_udp_CONFIG], [ - AC_CONFIG_FILES([orte/mca/rmcast/udp/Makefile]) - - # if we don't want reliable multicast, don't compile - # this component - AS_IF([test "$orte_want_multicast" = "1"], - [$1], [$2]) -])dnl - diff --git a/orte/mca/rmcast/udp/help-orte-rmcast-udp.txt b/orte/mca/rmcast/udp/help-orte-rmcast-udp.txt deleted file mode 100644 index 9e2094b505..0000000000 --- a/orte/mca/rmcast/udp/help-orte-rmcast-udp.txt +++ /dev/null @@ -1,30 +0,0 @@ -# -*- text -*- -# -# 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$ -# -# Additional copyrights may follow -# -# $HEADER$ -# -# This is the US/English general help file for Open RTE. -# -[orte-rmcast-udp:msg-too-large] -A multicast message that exceeds size limits is attempting to be sent: - - Process: %s - Channel: %03d.%03d.%03d.%03d - bytes: %d - limit: %d - -The message will not be sent - please revise your program. - diff --git a/orte/mca/rmcast/udp/rmcast_udp.c b/orte/mca/rmcast/udp/rmcast_udp.c deleted file mode 100644 index 8ca9097773..0000000000 --- a/orte/mca/rmcast/udp/rmcast_udp.c +++ /dev/null @@ -1,1184 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2004-2011 The University of Tennessee and The University - * of Tennessee Research Foundation. All rights - * reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -#include "orte_config.h" -#include "orte/constants.h" -#include "opal/types.h" - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#include -#include - -#include "opal/class/opal_list.h" -#include "opal/class/opal_ring_buffer.h" -#include "opal/opal_socket_errno.h" -#include "opal/util/output.h" -#include "opal/util/argv.h" -#include "opal/util/if.h" -#include "opal/util/net.h" -#include "opal/dss/dss.h" - -#include "orte/runtime/orte_globals.h" -#include "orte/runtime/orte_wait.h" -#include "orte/mca/errmgr/errmgr.h" -#include "orte/mca/rml/rml.h" -#include "orte/util/name_fns.h" -#include "orte/util/show_help.h" -#include "orte/threads/threads.h" - -#include "orte/mca/rmcast/base/private.h" -#include "orte/mca/rmcast/base/base.h" -#include "rmcast_udp.h" - -/* LOCAL DATA */ -static bool init_completed = false; -static bool comm_enabled = false; -static orte_thread_ctl_t ctl; - -/* LOCAL FUNCTIONS */ -static void recv_handler(int sd, short flags, void* user); - -static int setup_channel(rmcast_base_channel_t *chan, uint8_t direction); - -static int setup_socket(int *sd, rmcast_base_channel_t *chan, bool recvsocket); - -static int send_data(rmcast_base_send_t *snd, orte_rmcast_channel_t channel); - -static void resend_data(int status, orte_process_name_t* sender, - opal_buffer_t* buffer, orte_rml_tag_t tag, - void* cbdata); - -static void missed_msg(int status, orte_process_name_t* sender, - opal_buffer_t* buffer, orte_rml_tag_t tag, - void* cbdata); - -/* API FUNCTIONS */ -static int init(void); - -static void finalize(void); - -static int udp_send_buffer(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - opal_buffer_t *buf); - -static int udp_send_buffer_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - opal_buffer_t *buf, - orte_rmcast_callback_buffer_fn_t cbfunc, - void *cbdata); - -static int udp_send(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - struct iovec *msg, int count); - -static int udp_send_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - struct iovec *msg, int count, - orte_rmcast_callback_fn_t cbfunc, - void *cbdata); - -static int udp_recv_buffer(orte_process_name_t *sender, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_seq_t *seq_num, - opal_buffer_t *buf); - -static int udp_recv_buffer_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_buffer_fn_t cbfunc, - void *cbdata); - -static int udp_recv(orte_process_name_t *sender, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_seq_t *seq_num, - struct iovec **msg, int *count); - -static int udp_recv_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_fn_t cbfunc, - void *cbdata); - -static int open_channel(orte_rmcast_channel_t channel, char *name, - char *network, int port, char *interface, uint8_t direction); - -static void enable_comm(void); - -static void disable_comm(void); - -/* Define the module */ - -orte_rmcast_module_t orte_rmcast_udp_module = { - init, - finalize, - udp_send, - udp_send_nb, - udp_send_buffer, - udp_send_buffer_nb, - udp_recv, - udp_recv_nb, - udp_recv_buffer, - udp_recv_buffer_nb, - orte_rmcast_base_cancel_recv, - open_channel, - orte_rmcast_base_close_channel, - orte_rmcast_base_query, - enable_comm, - disable_comm, - orte_rmcast_base_process_msg -}; - -/* during init, we setup two channels for both xmit and recv: - * (a) a public address announcement channel. There are two variants - * of this: - * (1) system processes - e.g., daemons, tools. This channel - * is reserved solely for their use in performing admin - * functions - * (2) application processes. This channel is used to announce - * their existence and contact info for auto-wireup - * (b) our own group's channel, which is where our own output - * will be sent. At this time, we assume that we always - * want to hear our peers, so this channels is also - * bidirectional - * - * In addition, the HNP opens a third channel which is used solely - * for cmd-control purposes. This is where a tool, for example, might - * send a cmd to the HNP to take some action - there is no point in - * having that cmd echo around to every daemon and/or other tool - * in the system. - */ -static int init(void) -{ - int rc; - - if (init_completed) { - return ORTE_SUCCESS; - } - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, "%s rmcast:udp: init called", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - - /* setup local ctl */ - OBJ_CONSTRUCT(&ctl, orte_thread_ctl_t); - - /* flag that we are unreliable and need help */ - orte_rmcast_base.unreliable_xport = true; - - if (ORTE_PROC_IS_HNP || ORTE_PROC_IS_DAEMON || ORTE_PROC_IS_SCHEDULER) { - /* open the system channel - it will be our input/output channel as well */ - if (ORTE_SUCCESS != (rc = open_channel(ORTE_RMCAST_SYS_CHANNEL, - "SYSTEM", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - orte_rmcast_base.my_input_channel = (rmcast_base_channel_t*)opal_list_get_last(&orte_rmcast_base.channels); - orte_rmcast_base.my_output_channel = orte_rmcast_base.my_input_channel; - - /* open the heartbeat channel */ - if (ORTE_SUCCESS != (rc = open_channel(ORTE_RMCAST_HEARTBEAT_CHANNEL, "heartbeat", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - } else if (ORTE_PROC_IS_APP) { - /* setup our grp xmit/recv channels, if given */ - if (NULL != orte_rmcast_base.my_group_name) { - if (ORTE_SUCCESS != (rc = open_channel(orte_rmcast_base.my_group_number, - "recv", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - orte_rmcast_base.my_input_channel = (rmcast_base_channel_t*)opal_list_get_last(&orte_rmcast_base.channels); - if (ORTE_SUCCESS != (rc = open_channel(orte_rmcast_base.my_group_number+1, - "xmit", - NULL, -1, NULL, ORTE_RMCAST_BIDIR))) { - ORTE_ERROR_LOG(rc); - return rc; - } - orte_rmcast_base.my_output_channel = (rmcast_base_channel_t*)opal_list_get_last(&orte_rmcast_base.channels); - } - } - - /* setup the recv for missed message replacement */ - if (ORTE_SUCCESS != (rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, - ORTE_RML_TAG_MISSED_MSG, - ORTE_RML_PERSISTENT, - resend_data, - NULL))) { - ORTE_ERROR_LOG(rc); - return rc; - } - if (ORTE_SUCCESS != (rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, - ORTE_RML_TAG_MULTICAST, - ORTE_RML_PERSISTENT, - missed_msg, - NULL))) { - ORTE_ERROR_LOG(rc); - return rc; - } - - /* start the recv threads */ - if (ORTE_SUCCESS != (rc = orte_rmcast_base_start_threads())) { - ORTE_ERROR_LOG(rc); - return rc; - } - - init_completed = true; - comm_enabled = true; - - return ORTE_SUCCESS; -} - -static void finalize(void) -{ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, "%s rmcast:udp: finalize called", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME))); - - /* stop the chatter */ - comm_enabled = false; - - /* stop the missed msg recv */ - orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_MISSED_MSG); - orte_rml.recv_cancel(ORTE_NAME_WILDCARD, ORTE_RML_TAG_MULTICAST); - - /* stop the threads */ - orte_rmcast_base_stop_threads(); - - OBJ_DESTRUCT(&ctl); - init_completed = false; - return; -} - -static void enable_comm(void) -{ - ORTE_ACQUIRE_THREAD(&ctl); - orte_rmcast_base_start_threads(); - comm_enabled = true; - ORTE_RELEASE_THREAD(&ctl); -} - -static void disable_comm(void) -{ - ORTE_ACQUIRE_THREAD(&ctl); - comm_enabled = false; - orte_rmcast_base_stop_threads(); - ORTE_RELEASE_THREAD(&ctl); -} - -static int udp_send(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - struct iovec *msg, int count) -{ - rmcast_base_send_t snd; - int ret; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - /* queue it to be sent - preserves order! */ - OBJ_CONSTRUCT(&snd, rmcast_base_send_t); - snd.iovec_array = msg; - snd.iovec_count = count; - snd.tag = tag; - - if (ORTE_SUCCESS != (ret = send_data(&snd, channel))) { - ORTE_ERROR_LOG(ret); - } - - /* carefully release the send */ - snd.iovec_array = NULL; - snd.iovec_count = 0; - OBJ_DESTRUCT(&snd); - - ORTE_RELEASE_THREAD(&ctl); - return ret; -} - -static int udp_send_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - struct iovec *msg, int count, - orte_rmcast_callback_fn_t cbfunc, - void *cbdata) -{ - int ret; - rmcast_base_send_t snd; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - /* queue it to be sent - preserves order! */ - OBJ_CONSTRUCT(&snd, rmcast_base_send_t); - snd.iovec_array = msg; - snd.iovec_count = count; - snd.tag = tag; - snd.cbfunc_iovec = cbfunc; - snd.cbdata = cbdata; - - if (ORTE_SUCCESS != (ret = send_data(&snd, channel))) { - ORTE_ERROR_LOG(ret); - } - - /* carefully release the send */ - snd.iovec_array = NULL; - snd.iovec_count = 0; - OBJ_DESTRUCT(&snd); - - ORTE_RELEASE_THREAD(&ctl); - return ret; -} - -static int udp_send_buffer(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - opal_buffer_t *buf) -{ - int ret; - rmcast_base_send_t snd; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - /* queue it to be sent - preserves order! */ - OBJ_CONSTRUCT(&snd, rmcast_base_send_t); - snd.buf = buf; - snd.tag = tag; - - if (ORTE_SUCCESS != (ret = send_data(&snd, channel))) { - ORTE_ERROR_LOG(ret); - } - - /* carefully release the send */ - snd.buf = NULL; - OBJ_DESTRUCT(&snd); - - ORTE_RELEASE_THREAD(&ctl); - return ret; -} - -static int udp_send_buffer_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - opal_buffer_t *buf, - orte_rmcast_callback_buffer_fn_t cbfunc, - void *cbdata) -{ - int ret; - rmcast_base_send_t snd; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - /* queue it to be sent - preserves order! */ - OBJ_CONSTRUCT(&snd, rmcast_base_send_t); - snd.buf = buf; - snd.tag = tag; - snd.cbfunc_buffer = cbfunc; - snd.cbdata = cbdata; - - if (ORTE_SUCCESS != (ret = send_data(&snd, channel))) { - ORTE_ERROR_LOG(ret); - } - - /* carefully release the send */ - snd.buf = NULL; - OBJ_DESTRUCT(&snd); - - ORTE_RELEASE_THREAD(&ctl); - return ret; -} - -static int udp_recv(orte_process_name_t *name, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_seq_t *seq_num, - struct iovec **msg, int *count) -{ - rmcast_base_recv_t *recvptr; - int ret; - orte_rmcast_channel_t chan; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - if (ORTE_RMCAST_GROUP_INPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_input_channel->channel; - } else if (ORTE_RMCAST_GROUP_OUTPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_output_channel->channel; - } else { - chan = channel; - } - - if (ORTE_SUCCESS != (ret = orte_rmcast_base_queue_recv(&recvptr, chan, tag, - ORTE_RMCAST_NON_PERSISTENT, - NULL, NULL, NULL, true))) { - ORTE_ERROR_LOG(ret); - ORTE_RELEASE_THREAD(&ctl); - return ret; - } - ORTE_RELEASE_THREAD(&ctl); - - recvptr->ctl.active = true; - ORTE_ACQUIRE_THREAD(&recvptr->ctl); - - /* xfer the data */ - if (NULL != name) { - /* caller requested id of sender */ - name->jobid = recvptr->name.jobid; - name->vpid = recvptr->name.vpid; - ORTE_EPOCH_SET(name->epoch,recvptr->name.epoch); - } - *seq_num = recvptr->seq_num; - *msg = recvptr->iovec_array; - *count = recvptr->iovec_count; - - /* carefully release the recv */ - recvptr->iovec_array = NULL; - recvptr->iovec_count = 0; - OBJ_RELEASE(recvptr); - - return ORTE_SUCCESS; -} - -static int udp_recv_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_fn_t cbfunc, void *cbdata) -{ - orte_rmcast_channel_t chan; - int ret; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:udp: recv_nb called on channel %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel)); - - ORTE_ACQUIRE_THREAD(&ctl); - - if (ORTE_RMCAST_GROUP_INPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_input_channel->channel; - } else if (ORTE_RMCAST_GROUP_OUTPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_output_channel->channel; - } else { - chan = channel; - } - - if (ORTE_SUCCESS != (ret = orte_rmcast_base_queue_recv(NULL, chan, tag, flags, - cbfunc, NULL, cbdata, false))) { - if (ORTE_EXISTS != ret) { - ORTE_ERROR_LOG(ret); - } - } - - ORTE_RELEASE_THREAD(&ctl); - return ret; -} - -static int udp_recv_buffer(orte_process_name_t *name, - orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_seq_t *seq_num, - opal_buffer_t *buf) -{ - rmcast_base_recv_t *recvptr; - int ret; - orte_rmcast_channel_t chan; - - ORTE_ACQUIRE_THREAD(&ctl); - - if (!comm_enabled) { - ORTE_RELEASE_THREAD(&ctl); - return ORTE_ERR_COMM_DISABLED; - } - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:udp: recv_buffer called on multicast channel %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel)); - - if (ORTE_RMCAST_GROUP_INPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_input_channel->channel; - } else if (ORTE_RMCAST_GROUP_OUTPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_output_channel->channel; - } else { - chan = channel; - } - - if (ORTE_SUCCESS != (ret = orte_rmcast_base_queue_recv(&recvptr, chan, tag, - ORTE_RMCAST_NON_PERSISTENT, - NULL, NULL, NULL, true))) { - ORTE_ERROR_LOG(ret); - ORTE_RELEASE_THREAD(&ctl); - return ret; - } - ORTE_RELEASE_THREAD(&ctl); - - recvptr->ctl.active = true; - ORTE_ACQUIRE_THREAD(&recvptr->ctl); - - /* xfer the data */ - if (NULL != name) { - /* caller requested id of sender */ - name->jobid = recvptr->name.jobid; - name->vpid = recvptr->name.vpid; - ORTE_EPOCH_SET(name->epoch,recvptr->name.epoch); - } - *seq_num = recvptr->seq_num; - if (ORTE_SUCCESS != (ret = opal_dss.copy_payload(buf, recvptr->buf))) { - ORTE_ERROR_LOG(ret); - } - /* release the data */ - OBJ_RELEASE(recvptr); - - return ret; -} - -static int udp_recv_buffer_nb(orte_rmcast_channel_t channel, - orte_rmcast_tag_t tag, - orte_rmcast_flag_t flags, - orte_rmcast_callback_buffer_fn_t cbfunc, void *cbdata) -{ - orte_rmcast_channel_t chan; - int ret; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:udp: recv_buffer_nb called on multicast channel %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel, tag)); - - ORTE_ACQUIRE_THREAD(&ctl); - - if (ORTE_RMCAST_GROUP_INPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_input_channel->channel; - } else if (ORTE_RMCAST_GROUP_OUTPUT_CHANNEL == channel) { - chan = orte_rmcast_base.my_output_channel->channel; - } else { - chan = channel; - } - - if (ORTE_SUCCESS != (ret = orte_rmcast_base_queue_recv(NULL, chan, tag, flags, - NULL, cbfunc, cbdata, false))) { - if (ORTE_EXISTS == ret) { - ret = ORTE_SUCCESS; - } else { - ORTE_ERROR_LOG(ret); - } - } - ORTE_RELEASE_THREAD(&ctl); - - return ret; -} - -static int open_channel(orte_rmcast_channel_t channel, char *name, - char *network, int port, char *interface, uint8_t direction) -{ - opal_list_item_t *item; - rmcast_base_channel_t *nchan, *chan; - uint32_t netaddr=0, netmask=0, intr=0; - int rc; - unsigned int i, n, start, end, range; - bool port_assigned; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s opening channel %d for %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel, name)); - - /* parse the network, if provided */ - if (NULL != network) { - if (ORTE_SUCCESS != (rc = opal_iftupletoaddr(network, &netaddr, &netmask))) { - orte_show_help("help-rmcast-base.txt", "invalid-net-mask", true, network, ORTE_ERROR_NAME(rc)); - return ORTE_ERR_SILENT; - } - } - - /* parse the interface, if provided */ - if (NULL != interface) { - if (ORTE_SUCCESS != (rc = opal_iftupletoaddr(interface, &intr, NULL))) { - orte_show_help("help-rmcast-base.txt", "invalid-net-mask", true, interface, ORTE_ERROR_NAME(rc)); - return ORTE_ERR_SILENT; - } - } - - /* see if this name has already been assigned a channel on the specified network */ - OPAL_OUTPUT_VERBOSE((7, orte_rmcast_base.rmcast_output, - "%s open_channel: searching for %s:%d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), name, channel)); - - chan = NULL; - ORTE_ACQUIRE_THREAD(&orte_rmcast_base.main_ctl); - for (item = opal_list_get_first(&orte_rmcast_base.channels); - item != opal_list_get_end(&orte_rmcast_base.channels); - item = opal_list_get_next(item)) { - nchan = (rmcast_base_channel_t*)item; - - OPAL_OUTPUT_VERBOSE((7, orte_rmcast_base.rmcast_output, - "%s open_channel: channel %s:%d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - nchan->name, channel)); - - if (nchan->channel == channel || - 0 == strcasecmp(nchan->name, name)) { - chan = nchan; - break; - } - } - - if (NULL != chan) { - /* already exists - check that the requested - * sockets are setup - */ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:udp using existing channel %s:%d network %03d.%03d.%03d.%03d port %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - chan->name, chan->channel, - OPAL_IF_FORMAT_ADDR(chan->network), - (int)chan->port)); - - if (ORTE_SUCCESS != (rc = setup_channel(chan, direction))) { - ORTE_ERROR_LOG(rc); - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - return rc; - } - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - return ORTE_SUCCESS; - } - - /* we didn't find an existing match, so create a new channel */ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s creating new channel %s for %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - orte_rmcast_base_print_channel(channel), name)); - - chan = OBJ_NEW(rmcast_base_channel_t); - chan->name = strdup(name); - chan->channel = channel; - /* if we were not given a network, use the default */ - if (NULL == network) { - chan->network = orte_rmcast_base.xmit_network; - } else { - chan->network = netaddr; - } - /* if we were not given an interface, use the default */ - if (NULL == interface) { - chan->interface = orte_rmcast_base.interface; - } else { - chan->interface = intr; - } - /* if we were not given a port, use a default one */ - if (port < 0) { - /* cycle thru the port ranges until we find the - * port corresponding to this channel number - */ - n=0; - port_assigned = false; - for (i=0; NULL != orte_rmcast_base.ports.start[i]; i++) { - /* how many ports are in this range? */ - start = strtol(orte_rmcast_base.ports.start[i], NULL, 10); - end = strtol(orte_rmcast_base.ports.end[i], NULL, 10); - range = end - start + 1; - if (chan->channel < (n + range)) { - /* take the corresponding port */ - chan->port = start + (chan->channel - n); - port_assigned = true; - break; - } - n += range; - } - if (!port_assigned) { - opal_output(0, "%s CANNOT ASSIGN PORT TO CHANNEL %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - orte_rmcast_base_print_channel(chan->channel)); - return ORTE_ERROR; - } - } else { - chan->port = port; - } - opal_list_append(&orte_rmcast_base.channels, &chan->item); - ORTE_RELEASE_THREAD(&orte_rmcast_base.main_ctl); - - /* if this is my input, set that value */ - if (ORTE_RMCAST_MY_INPUT & direction) { - orte_rmcast_base.my_input_channel = chan; - } - - /* if this is my output, set that value */ - if (ORTE_RMCAST_MY_OUTPUT & direction) { - orte_rmcast_base.my_output_channel = chan; - } - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:udp opening new channel %s:%s network %03d.%03d.%03d.%03d port %d for%s%s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - chan->name, orte_rmcast_base_print_channel(chan->channel), - OPAL_IF_FORMAT_ADDR(chan->network), - (int)chan->port, - (ORTE_RMCAST_RECV & direction) ? " RECV" : " ", - (ORTE_RMCAST_XMIT & direction) ? " XMIT" : " ")); - - if (ORTE_SUCCESS != (rc = setup_channel(chan, direction))) { - ORTE_ERROR_LOG(rc); - return rc; - } - - return ORTE_SUCCESS; -} - -/**** LOCAL FUNCTIONS ****/ -static void recv_handler(int sd, short flags, void* cbdata) -{ - uint8_t *data; - ssize_t sz; - rmcast_base_channel_t *chan = (rmcast_base_channel_t*)cbdata; - opal_buffer_t buf; - - /* read the data */ - data = (uint8_t*)malloc(orte_rmcast_udp_sndbuf_size * sizeof(uint8_t)); - sz = read(sd, data, orte_rmcast_udp_sndbuf_size); - - if (!comm_enabled) { - free(data); - return; - } - - if (sz <= 0) { - /* this shouldn't happen - report the errno */ - opal_output(0, "%s Error on multicast recv socket event: %s(%d)", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), strerror(errno), errno); - return; - } - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:udp recvd %d bytes from channel %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - (int)sz, (int)chan->channel)); - - /* clear the way for the next message */ - OBJ_CONSTRUCT(&buf, opal_buffer_t); - opal_dss.load(&buf, (void*)data, sz); - ORTE_MULTICAST_MESSAGE_EVENT(ORTE_NAME_INVALID, &buf); - OBJ_DESTRUCT(&buf); - return; -} - -static void missed_msg(int status, orte_process_name_t* sender, - opal_buffer_t* buffer, orte_rml_tag_t tag, - void* cbdata) -{ - ORTE_MULTICAST_MESSAGE_EVENT(sender, buffer); -} - -static int setup_channel(rmcast_base_channel_t *chan, uint8_t direction) -{ - int rc; - int xmitsd, recvsd; - - if (0 <= chan->xmit && 0 <= chan->recv) { - /* already setup */ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s setup:channel %d already setup", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - chan->channel)); - return ORTE_SUCCESS; - } - - /* setup the IPv4 addr info */ - chan->addr.sin_family = AF_INET; - chan->addr.sin_addr.s_addr = htonl(chan->network); - chan->addr.sin_port = htons(chan->port); - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s setup:channel addr %03d.%03d.%03d.%03d port %d for %s:%s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - OPAL_IF_FORMAT_ADDR(chan->network), (int)chan->port, - (ORTE_RMCAST_RECV & direction) ? " RECV" : " ", - (ORTE_RMCAST_XMIT & direction) ? " XMIT" : " ")); - - if (0 > chan->xmit && (ORTE_RMCAST_XMIT & direction)) { - /* create a xmit socket */ - if (ORTE_SUCCESS != (rc = setup_socket(&xmitsd, chan, false))) { - ORTE_ERROR_LOG(rc); - return rc; - } - chan->xmit = xmitsd; - } - - if (0 > chan->recv && (ORTE_RMCAST_RECV & direction)) { - /* create a recv socket */ - if (ORTE_SUCCESS != (rc = setup_socket(&recvsd, chan, true))) { - ORTE_ERROR_LOG(rc); - return rc; - } - chan->recv = recvsd; - - /* setup an event to catch messages */ - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s setup:channel activating recv event on fd %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),(int)chan->recv)); - - opal_event_set(opal_event_base, &chan->recv_ev, chan->recv, - OPAL_EV_READ|OPAL_EV_PERSIST, recv_handler, chan); - opal_event_add(&chan->recv_ev, 0); - } - - return ORTE_SUCCESS; -} - -static int setup_socket(int *sd, rmcast_base_channel_t *chan, bool recvsocket) -{ - uint8_t ttl = 1; - struct sockaddr_in inaddr; - struct ip_mreq req; - int addrlen; - int target_sd; - int flags; - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "setup:socket addr %03d.%03d.%03d.%03d port %d", - OPAL_IF_FORMAT_ADDR(chan->network), (int)chan->port)); - - target_sd = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); - if(target_sd < 0) { - if (EAFNOSUPPORT != opal_socket_errno) { - opal_output(0,"rmcast:init: socket() failed: %s (%d)", - strerror(opal_socket_errno), opal_socket_errno); - } - return ORTE_ERR_IN_ERRNO; - } - - /* set the multicast flags */ - if ((setsockopt(target_sd, IPPROTO_IP, IP_MULTICAST_TTL, - (void *)&ttl, sizeof(ttl))) < 0) { - opal_output(0,"rmcast:init: socketopt() failed on MULTICAST_TTL: %s (%d)", - strerror(opal_socket_errno), opal_socket_errno); - return ORTE_ERR_IN_ERRNO; - } - - /* enable port sharing */ - flags = 1; - if (setsockopt (target_sd, SOL_SOCKET, SO_REUSEADDR, (const char *)&flags, sizeof(flags)) < 0) { - opal_output(0, "rmcast:udp: unable to set the " - "SO_REUSEADDR option (%s:%d)\n", - strerror(opal_socket_errno), opal_socket_errno); - CLOSE_THE_SOCKET(target_sd); - return ORTE_ERROR; - } - - /* if this is the recv side... */ - if (recvsocket) { - memset(&inaddr, 0, sizeof(inaddr)); - inaddr.sin_family = AF_INET; - inaddr.sin_addr.s_addr = htonl(chan->network); - inaddr.sin_port = htons(chan->port); - addrlen = sizeof(struct sockaddr_in); - - /* bind the socket */ - if (bind(target_sd, (struct sockaddr*)&inaddr, addrlen) < 0) { - opal_output(0, "%s rmcast:init: bind() failed for addr %03d.%03d.%03d.%03d port %d\n\tError: %s (%d)", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), OPAL_IF_FORMAT_ADDR(chan->network), (int)chan->port, - strerror(opal_socket_errno), opal_socket_errno); - CLOSE_THE_SOCKET(target_sd); - return ORTE_ERROR; - } - /* set membership on the multicast interface */ - memset(&req, 0, sizeof (req)); - req.imr_multiaddr.s_addr = htonl(chan->network); - req.imr_interface.s_addr = htonl(chan->interface); - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "setup:socket:membership addr %03d.%03d.%03d.%03d interface %03d.%03d.%03d.%03d", - OPAL_IF_FORMAT_ADDR(chan->network), OPAL_IF_FORMAT_ADDR(chan->interface))); - - if ((setsockopt(target_sd, IPPROTO_IP, IP_ADD_MEMBERSHIP, - (void *)&req, sizeof (req))) < 0) { - opal_output(0, "%s rmcast:init: setsockopt() failed on ADD_MEMBERSHIP\n" - "\tfor multicast network %03d.%03d.%03d.%03d interface %03d.%03d.%03d.%03d\n\tError: %s (%d)", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - OPAL_IF_FORMAT_ADDR(chan->network), OPAL_IF_FORMAT_ADDR(chan->interface), - strerror(opal_socket_errno), opal_socket_errno); - CLOSE_THE_SOCKET(target_sd); - return ORTE_ERROR; - } - /* set the recvbuf size */ - if ((setsockopt(target_sd, SOL_SOCKET, SO_RCVBUF, - &orte_rmcast_udp_rcvbuf_size, sizeof(orte_rmcast_udp_rcvbuf_size))) < 0) { - opal_output(0, "%s rmcast:init: setsockopt() failed on SO_RCVBUF\n" - "\tfor multicast network %03d.%03d.%03d.%03d interface %03d.%03d.%03d.%03d\n\tError: %s (%d)", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - OPAL_IF_FORMAT_ADDR(chan->network), OPAL_IF_FORMAT_ADDR(chan->interface), - strerror(opal_socket_errno), opal_socket_errno); - CLOSE_THE_SOCKET(target_sd); - return ORTE_ERROR; - } - } else { - /* on the xmit side, need to set the interface */ - memset(&inaddr, 0, sizeof(inaddr)); - inaddr.sin_addr.s_addr = htonl(chan->interface); - addrlen = sizeof(struct sockaddr_in); - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "setup:socket:xmit interface %03d.%03d.%03d.%03d", - OPAL_IF_FORMAT_ADDR(chan->interface))); - - if ((setsockopt(target_sd, IPPROTO_IP, IP_MULTICAST_IF, - (void *)&inaddr, addrlen)) < 0) { - opal_output(0, "%s rmcast:init: setsockopt() failed on MULTICAST_IF\n" - "\tfor multicast network %03d.%03d.%03d.%03d interface %03d.%03d.%03d.%03d\n\tError: %s (%d)", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - OPAL_IF_FORMAT_ADDR(chan->network), OPAL_IF_FORMAT_ADDR(chan->interface), - strerror(opal_socket_errno), opal_socket_errno); - CLOSE_THE_SOCKET(target_sd); - return ORTE_ERROR; - } - /* set the sendbuf size */ - if ((setsockopt(target_sd, SOL_SOCKET, SO_SNDBUF, - &orte_rmcast_udp_sndbuf_size, sizeof(orte_rmcast_udp_sndbuf_size))) < 0) { - opal_output(0, "%s rmcast:init: setsockopt() failed on SO_SNDBUF\n" - "\tfor multicast network %03d.%03d.%03d.%03d interface %03d.%03d.%03d.%03d\n\tError: %s (%d)", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - OPAL_IF_FORMAT_ADDR(chan->network), OPAL_IF_FORMAT_ADDR(chan->interface), - strerror(opal_socket_errno), opal_socket_errno); - CLOSE_THE_SOCKET(target_sd); - return ORTE_ERROR; - } - } - - /* set socket up to be non-blocking */ - if((flags = fcntl(target_sd, F_GETFL, 0)) < 0) { - opal_output(0, "rmcast:init: fcntl(F_GETFL) failed: %s (%d)", - strerror(opal_socket_errno), opal_socket_errno); - return ORTE_ERROR; - } else { - flags |= O_NONBLOCK; - if(fcntl(target_sd, F_SETFL, flags) < 0) { - opal_output(0, "rmcast:init: fcntl(F_SETFL) failed: %s (%d)", - strerror(opal_socket_errno), opal_socket_errno); - return ORTE_ERROR; - } - } - - /* return the socket */ - *sd = target_sd; - - return ORTE_SUCCESS; -} - -static int send_data(rmcast_base_send_t *snd, orte_rmcast_channel_t channel) -{ - char *bytes=NULL; - int32_t sz; - int rc; - opal_buffer_t *buf=NULL; - rmcast_base_channel_t *chan; - rmcast_send_log_t *log, *lg; - - if (!comm_enabled) { - return ORTE_ERR_COMM_DISABLED; - } - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s transmitting data for channel %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), channel)); - - /* setup the message for xmission */ - if (ORTE_SUCCESS != (rc = orte_rmcast_base_queue_xmit(snd, channel, &buf, &chan))) { - ORTE_ERROR_LOG(rc); - goto CLEANUP; - } - - /* store the working buf in the send ring buffer in case we - * need to retransmit it later - */ - log = OBJ_NEW(rmcast_send_log_t); - log->channel = chan->channel; - log->seq_num = chan->seq_num; - opal_dss.copy_payload(log->buf, buf); - if (NULL != (lg = (rmcast_send_log_t*)opal_ring_buffer_push(&chan->cache, log))) { - /* release the old message */ - OPAL_OUTPUT_VERBOSE((5, orte_rmcast_base.rmcast_output, - "%s releasing message %d channel %d from log", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - lg->seq_num, lg->channel)); - OBJ_RELEASE(lg); - } - - /* unload the working buf to obtain the payload */ - if (ORTE_SUCCESS != (rc = opal_dss.unload(buf, (void**)&bytes, &sz))) { - ORTE_ERROR_LOG(rc); - goto CLEANUP; - } - - OPAL_OUTPUT_VERBOSE((2, orte_rmcast_base.rmcast_output, - "%s rmcast:udp multicasting %d bytes to network %03d.%03d.%03d.%03d port %d tag %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), sz, - OPAL_IF_FORMAT_ADDR(chan->network), (int)chan->port, (int)snd->tag)); - - if (sz != (rc = sendto(chan->xmit, bytes, sz, 0, - (struct sockaddr *)&(chan->addr), sizeof(struct sockaddr_in)))) { - /* didn't get the message out */ - opal_output(0, "%s failed to send message to multicast network %03d.%03d.%03d.%03d on\n\terror %s(%d)", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), OPAL_IF_FORMAT_ADDR(chan->network), - strerror(errno), errno); - rc = ORTE_ERR_COMM_FAILURE; - } else { - rc = ORTE_SUCCESS; - } - - if (NULL != snd->buf) { - /* call the cbfunc if required */ - if (NULL != snd->cbfunc_buffer) { - snd->cbfunc_buffer(rc, chan->channel, chan->seq_num, snd->tag, - ORTE_PROC_MY_NAME, snd->buf, snd->cbdata); - } - } else { - /* call the cbfunc if required */ - if (NULL != snd->cbfunc_iovec) { - snd->cbfunc_iovec(rc, chan->channel, chan->seq_num, snd->tag, ORTE_PROC_MY_NAME, - snd->iovec_array, snd->iovec_count, snd->cbdata); - } - } - - CLEANUP: - if (NULL != buf) { - OBJ_RELEASE(buf); - } - if (NULL != bytes) { - free(bytes); - } - return rc; -} - -static void cbfunc(int status, - struct orte_process_name_t* peer, - struct opal_buffer_t* buffer, - orte_rml_tag_t tag, - void* cbdata) -{ - OBJ_RELEASE(buffer); -} - -static void resend_data(int status, orte_process_name_t* sender, - opal_buffer_t* buffer, orte_rml_tag_t tag, - void* cbdata) -{ - int n, rc; - orte_rmcast_channel_t channel; - orte_rmcast_seq_t start; - rmcast_base_channel_t *ch; - rmcast_send_log_t *log; - opal_buffer_t *recover; - - /* block any further ops until we complete the missing - * message repair - */ - ORTE_ACQUIRE_THREAD(&ctl); - - n=1; - if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &channel, &n, ORTE_RMCAST_CHANNEL_T))) { - ORTE_ERROR_LOG(rc); - goto release; - } - - /* if the channel is UINT32_MAX, then we know that this is a - * a response from a sender telling us that our request for - * missing messages is too far behind, so we should just - * abort - */ - if (UINT32_MAX == channel) { - opal_output(0, "%s CANNOT RECOVER FROM LOST MESSAGE - TOO FAR BEHIND - ABORTING", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME)); - orte_errmgr.abort(1, NULL); - goto release; - } - - n=1; - if (ORTE_SUCCESS != (rc = opal_dss.unpack(buffer, &start, &n, ORTE_RMCAST_SEQ_T))) { - ORTE_ERROR_LOG(rc); - goto release; - } - - opal_output(0, "%s request resend data from %s for channel %d start %d", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - ORTE_NAME_PRINT(sender), channel, start); - - /* get the referenced channel object */ - if (NULL == (ch = orte_rmcast_base_get_channel(channel))) { - ORTE_ERROR_LOG(ORTE_ERR_NOT_FOUND); - goto release; - } - - /* see if we can bring the proc up to date - if it is too - * far behind, then there is no hope of recovery - */ - log = (rmcast_send_log_t*)opal_ring_buffer_poke(&ch->cache, 0); - if (NULL == log || start < log->seq_num) { - /* no hope - tell them */ - channel = UINT32_MAX; - recover = OBJ_NEW(opal_buffer_t); - if (ORTE_SUCCESS != (rc = opal_dss.pack(recover, &channel, 1, ORTE_RMCAST_CHANNEL_T))) { - ORTE_ERROR_LOG(rc); - goto release; - } - if (0 > (rc = orte_rml.send_buffer_nb(sender, recover, ORTE_RML_TAG_MULTICAST, 0, cbfunc, NULL))) { - ORTE_ERROR_LOG(rc); - OBJ_RELEASE(recover); - } - goto release; - } - - /* search its ring buffer for the starting message - function - * automatically starts at the oldest message and works up - * from there - */ - for (n=0; n < ch->cache.size; n++) { - log = (rmcast_send_log_t*)opal_ring_buffer_poke(&ch->cache, n); - if (NULL == log || - log->seq_num <= start) { - continue; - } - OPAL_OUTPUT_VERBOSE((0, orte_rmcast_base.rmcast_output, - "%s resending msg %d to %s", - ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), - log->seq_num, ORTE_NAME_PRINT(sender))); - recover = OBJ_NEW(opal_buffer_t); - opal_dss.copy_payload(recover, log->buf); - if (0 > (rc = orte_rml.send_buffer_nb(sender, recover, ORTE_RML_TAG_MULTICAST, 0, cbfunc, NULL))) { - OBJ_RELEASE(recover); - ORTE_ERROR_LOG(rc); - goto release; - } - } - - release: - ORTE_RELEASE_THREAD(&ctl); -} diff --git a/orte/mca/rmcast/udp/rmcast_udp.h b/orte/mca/rmcast/udp/rmcast_udp.h deleted file mode 100644 index 37d9d182c7..0000000000 --- a/orte/mca/rmcast/udp/rmcast_udp.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ -/** - * @file - * - */ - -#ifndef ORTE_RMCAST_UDP_H -#define ORTE_RMCAST_UDP_H - -#include "orte_config.h" - -#include "opal/mca/mca.h" -#include "opal/mca/base/base.h" - -#include "orte/mca/rmcast/rmcast.h" - - -BEGIN_C_DECLS - -#define ORTE_RMCAST_UDP_DEFAULT_SNDBUF_SIZE 65536 - -ORTE_MODULE_DECLSPEC extern orte_rmcast_base_component_t mca_rmcast_udp_component; -extern orte_rmcast_module_t orte_rmcast_udp_module; - -ORTE_MODULE_DECLSPEC extern int orte_rmcast_udp_sndbuf_size; -ORTE_MODULE_DECLSPEC extern int orte_rmcast_udp_rcvbuf_size; -END_C_DECLS - -#endif diff --git a/orte/mca/rmcast/udp/rmcast_udp_component.c b/orte/mca/rmcast/udp/rmcast_udp_component.c deleted file mode 100644 index b542048255..0000000000 --- a/orte/mca/rmcast/udp/rmcast_udp_component.c +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. - * $COPYRIGHT$ - * - * Additional copyrights may follow - * - * $HEADER$ - */ - -#include "orte_config.h" - -#include "opal/mca/base/base.h" -#include "opal/util/output.h" -#include "opal/mca/base/mca_base_param.h" - -#include "orte/util/proc_info.h" -#include "orte/mca/rml/rml.h" -#include "orte/mca/rml/rml_types.h" -#include "orte/mca/errmgr/errmgr.h" -#include "orte/runtime/orte_globals.h" - -#include "orte/mca/iof/base/base.h" -#include "rmcast_udp.h" - -/* - * Local functions - */ -static int orte_rmcast_udp_open(void); -static int orte_rmcast_udp_close(void); -static int orte_rmcast_udp_query(mca_base_module_t **module, int *priority); - -/* - * Local variables - */ -static bool initialized = false; -int orte_rmcast_udp_sndbuf_size; -int orte_rmcast_udp_rcvbuf_size; - -/* - * Public string showing the rmcast udp component version number - */ -const char *mca_rmcast_udp_component_version_string = - "Open MPI udp rmcast MCA component version " ORTE_VERSION; - -orte_rmcast_base_component_t mca_rmcast_udp_component = { - { - ORTE_RMCAST_BASE_VERSION_1_0_0, - - "udp", /* MCA component name */ - ORTE_MAJOR_VERSION, /* MCA component major version */ - ORTE_MINOR_VERSION, /* MCA component minor version */ - ORTE_RELEASE_VERSION, /* MCA component release version */ - - /* Component open, close, and query functions */ - orte_rmcast_udp_open, - orte_rmcast_udp_close, - orte_rmcast_udp_query - }, - { - /* The component is checkpoint ready */ - MCA_BASE_METADATA_PARAM_CHECKPOINT - } -}; - -/** - * component open/close/init function - */ -static int orte_rmcast_udp_open(void) -{ - mca_base_component_t *c = &mca_rmcast_udp_component.version; - int value; - - mca_base_param_reg_int(c, "sndbuf_size", - "Size of send buffer in Kbytes (must be > 0)", - false, false, - ORTE_RMCAST_UDP_DEFAULT_SNDBUF_SIZE, &value); - if (ORTE_RMCAST_UDP_DEFAULT_SNDBUF_SIZE != value) { - orte_rmcast_udp_sndbuf_size = 1024*value; - } else { - orte_rmcast_udp_sndbuf_size = ORTE_RMCAST_UDP_DEFAULT_SNDBUF_SIZE; - } - - - orte_rmcast_udp_rcvbuf_size = 16 * orte_rmcast_udp_sndbuf_size; - mca_base_param_reg_int(c, "rcvbuf_size", - "Size of recv buffer in Kbytes (default: 16xsndbuf)", - false, false, - orte_rmcast_udp_rcvbuf_size, &value); - if (value != orte_rmcast_udp_rcvbuf_size) { - orte_rmcast_udp_rcvbuf_size = 1024 * value; - } - - return ORTE_SUCCESS; -} - - -static int orte_rmcast_udp_close(void) -{ - return ORTE_SUCCESS; -} - -/** - * Module query - */ - -static int orte_rmcast_udp_query(mca_base_module_t **module, int *priority) -{ - /* selected by default */ - *priority = 100; - *module = (mca_base_module_t *) &orte_rmcast_udp_module; - initialized = true; - - return ORTE_SUCCESS; -} diff --git a/orte/mca/rml/ftrm/configure.m4 b/orte/mca/rml/ftrm/configure.m4 index 99ee95dee6..4fd07d60ff 100644 --- a/orte/mca/rml/ftrm/configure.m4 +++ b/orte/mca/rml/ftrm/configure.m4 @@ -22,7 +22,7 @@ AC_DEFUN([MCA_orte_rml_ftrm_CONFIG],[ AC_CONFIG_FILES([orte/mca/rml/ftrm/Makefile]) # If we don't want FT, don't compile this component - AS_IF([test "$opal_want_ft_cr" = "1"], + AS_IF([test "$opal_want_ft_cr" = "1" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/rml/oob/configure.m4 b/orte/mca/rml/oob/configure.m4 new file mode 100644 index 0000000000..cce42facea --- /dev/null +++ b/orte/mca/rml/oob/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_rml_oob_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_rml_oob_CONFIG], [ + AC_CONFIG_FILES([orte/mca/rml/oob/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/rml/oob/rml_oob_component.c b/orte/mca/rml/oob/rml_oob_component.c index fcb5b67187..5d62d27688 100644 --- a/orte/mca/rml/oob/rml_oob_component.c +++ b/orte/mca/rml/oob/rml_oob_component.c @@ -29,7 +29,6 @@ #include "opal/mca/base/base.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/backtrace/backtrace.h" #include "opal/mca/event/event.h" @@ -410,7 +409,7 @@ rml_oob_queued_progress(int fd, short event, void *arg) qmsg); if (ORTE_SUCCESS != ret) { - if (ORTE_ERR_ADDRESSEE_UNKNOWN == OPAL_SOS_GET_ERROR_CODE(ret)) { + if (ORTE_ERR_ADDRESSEE_UNKNOWN == ret) { /* still no route -- try again */ ORTE_RML_OOB_MSG_HEADER_NTOH(*hdr); OPAL_THREAD_LOCK(&orte_rml_oob_module.queued_lock); @@ -530,7 +529,7 @@ rml_oob_recv_route_callback(int status, NULL); if (ORTE_SUCCESS != ret) { - if (ORTE_ERR_ADDRESSEE_UNKNOWN == OPAL_SOS_GET_ERROR_CODE(ret)) { + if (ORTE_ERR_ADDRESSEE_UNKNOWN == ret) { /* no route -- queue and hope we find a route */ orte_rml_oob_queued_msg_t *qmsg = OBJ_NEW(orte_rml_oob_queued_msg_t); OPAL_OUTPUT_VERBOSE((1, orte_rml_base_output, diff --git a/orte/mca/rml/oob/rml_oob_contact.c b/orte/mca/rml/oob/rml_oob_contact.c index e6196aa9bd..6e105c7d36 100644 --- a/orte/mca/rml/oob/rml_oob_contact.c +++ b/orte/mca/rml/oob/rml_oob_contact.c @@ -15,7 +15,6 @@ #include "orte_config.h" #include "opal/util/argv.h" -#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/rml/base/rml_contact.h" diff --git a/orte/mca/rml/oob/rml_oob_ping.c b/orte/mca/rml/oob/rml_oob_ping.c index 5f5471e49f..bc77855187 100644 --- a/orte/mca/rml/oob/rml_oob_ping.c +++ b/orte/mca/rml/oob/rml_oob_ping.c @@ -11,7 +11,6 @@ #include "rml_oob.h" #include "opal/util/argv.h" -#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/rml/oob/rml_oob_send.c b/orte/mca/rml/oob/rml_oob_send.c index 65f87f8a72..72a3862ea4 100644 --- a/orte/mca/rml/oob/rml_oob_send.c +++ b/orte/mca/rml/oob/rml_oob_send.c @@ -23,7 +23,6 @@ #include "orte/mca/routed/routed.h" #include "opal/dss/dss.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/rml/base/base.h" #include "orte/mca/rml/rml_types.h" diff --git a/orte/mca/routed/base/routed_base_register_sync.c b/orte/mca/routed/base/routed_base_register_sync.c index a991578ce5..6ca973d398 100644 --- a/orte/mca/routed/base/routed_base_register_sync.c +++ b/orte/mca/routed/base/routed_base_register_sync.c @@ -21,7 +21,6 @@ #include "orte/constants.h" #include "orte/types.h" -#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "opal/threads/threads.h" @@ -106,7 +105,7 @@ int orte_routed_base_register_sync(bool setup) sync_recvd = false; rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_SYNC, ORTE_RML_NON_PERSISTENT, report_sync, NULL); - if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); return rc; } @@ -187,7 +186,7 @@ int orte_routed_base_process_callback(orte_jobid_t job, opal_buffer_t *buffer) &proc->name, ORTE_PROC_STATE_RUNNING, 0, 0); cnt = 1; } - if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != OPAL_SOS_GET_ERROR_CODE(rc)) { + if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { ORTE_ERROR_LOG(rc); return rc; } diff --git a/orte/mca/routed/binomial/configure.m4 b/orte/mca/routed/binomial/configure.m4 new file mode 100644 index 0000000000..111be3a555 --- /dev/null +++ b/orte/mca/routed/binomial/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_routed_binomial_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_routed_binomial_CONFIG], [ + AC_CONFIG_FILES([orte/mca/routed/binomial/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/routed/binomial/routed_binomial.c b/orte/mca/routed/binomial/routed_binomial.c index 1aa847abf4..041d8a5cf4 100644 --- a/orte/mca/routed/binomial/routed_binomial.c +++ b/orte/mca/routed/binomial/routed_binomial.c @@ -22,7 +22,6 @@ #include "opal/class/opal_bitmap.h" #include "opal/util/bit_ops.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/ess/ess.h" diff --git a/orte/mca/routed/cm/configure.m4 b/orte/mca/routed/cm/configure.m4 new file mode 100644 index 0000000000..4545e044b2 --- /dev/null +++ b/orte/mca/routed/cm/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_routed_cm_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_routed_cm_CONFIG], [ + AC_CONFIG_FILES([orte/mca/routed/cm/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/routed/cm/routed_cm.c b/orte/mca/routed/cm/routed_cm.c index 107937831f..8e93ff89e1 100644 --- a/orte/mca/routed/cm/routed_cm.c +++ b/orte/mca/routed/cm/routed_cm.c @@ -25,7 +25,6 @@ #include "opal/class/opal_bitmap.h" #include "opal/util/bit_ops.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/ess/ess.h" diff --git a/orte/mca/routed/direct/configure.m4 b/orte/mca/routed/direct/configure.m4 new file mode 100644 index 0000000000..a33ec0f356 --- /dev/null +++ b/orte/mca/routed/direct/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_routed_direct_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_routed_direct_CONFIG], [ + AC_CONFIG_FILES([orte/mca/routed/direct/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/routed/direct/routed_direct.c b/orte/mca/routed/direct/routed_direct.c index 9ba7a575ed..c4be101769 100644 --- a/orte/mca/routed/direct/routed_direct.c +++ b/orte/mca/routed/direct/routed_direct.c @@ -17,7 +17,6 @@ #include "opal/threads/condition.h" #include "opal/dss/dss_types.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/rml/rml.h" diff --git a/orte/mca/routed/linear/configure.m4 b/orte/mca/routed/linear/configure.m4 new file mode 100644 index 0000000000..ea45331424 --- /dev/null +++ b/orte/mca/routed/linear/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_routed_linear_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_routed_linear_CONFIG], [ + AC_CONFIG_FILES([orte/mca/routed/linear/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/routed/linear/routed_linear.c b/orte/mca/routed/linear/routed_linear.c index baeba63366..b6dd3cc20b 100644 --- a/orte/mca/routed/linear/routed_linear.c +++ b/orte/mca/routed/linear/routed_linear.c @@ -21,7 +21,6 @@ #include "opal/class/opal_bitmap.h" #include "opal/class/opal_hash_table.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/ess/ess.h" diff --git a/orte/mca/routed/radix/configure.m4 b/orte/mca/routed/radix/configure.m4 new file mode 100644 index 0000000000..b0cc21ad6f --- /dev/null +++ b/orte/mca/routed/radix/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_routed_radix_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_routed_radix_CONFIG], [ + AC_CONFIG_FILES([orte/mca/routed/radix/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/routed/radix/routed_radix.c b/orte/mca/routed/radix/routed_radix.c index 1f7d7283c3..f802b96bbc 100644 --- a/orte/mca/routed/radix/routed_radix.c +++ b/orte/mca/routed/radix/routed_radix.c @@ -21,7 +21,6 @@ #include "opal/class/opal_hash_table.h" #include "opal/class/opal_bitmap.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/ess/ess.h" diff --git a/orte/mca/routed/slave/configure.m4 b/orte/mca/routed/slave/configure.m4 new file mode 100644 index 0000000000..c797b9b57d --- /dev/null +++ b/orte/mca/routed/slave/configure.m4 @@ -0,0 +1,19 @@ +# -*- shell-script -*- +# +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# +# MCA_routed_slave_CONFIG([action-if-found], [action-if-not-found]) +# ----------------------------------------------------------- +AC_DEFUN([MCA_orte_routed_slave_CONFIG], [ + AC_CONFIG_FILES([orte/mca/routed/slave/Makefile]) + + AS_IF([test "$orte_without_full_support" = 0], + [$1], + [$2]) +]) diff --git a/orte/mca/routed/slave/routed_slave.c b/orte/mca/routed/slave/routed_slave.c index 87ed3462ce..1bfbc52d89 100644 --- a/orte/mca/routed/slave/routed_slave.c +++ b/orte/mca/routed/slave/routed_slave.c @@ -16,7 +16,6 @@ #include "opal/threads/condition.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/ess/ess.h" diff --git a/orte/mca/sensor/file/configure.m4 b/orte/mca/sensor/file/configure.m4 index 3a97b7f213..e99f1bd424 100644 --- a/orte/mca/sensor/file/configure.m4 +++ b/orte/mca/sensor/file/configure.m4 @@ -1,6 +1,8 @@ # -*- shell-script -*- # # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -15,7 +17,7 @@ AC_DEFUN([MCA_orte_sensor_file_CONFIG], [ # if we don't want sensors, don't compile # this component - AS_IF([test "$orte_want_sensors" = "1"], + AS_IF([test "$orte_want_sensors" = "1" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/sensor/ft_tester/configure.m4 b/orte/mca/sensor/ft_tester/configure.m4 index 1c7b4199ab..18ba731004 100644 --- a/orte/mca/sensor/ft_tester/configure.m4 +++ b/orte/mca/sensor/ft_tester/configure.m4 @@ -1,6 +1,8 @@ # -*- shell-script -*- # # Copyright (c) 2011 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -15,7 +17,7 @@ AC_DEFUN([MCA_orte_sensor_ft_tester_CONFIG], [ # if we don't want sensors, don't compile # this component - AS_IF([test "$orte_want_sensors" = "1"], + AS_IF([test "$orte_want_sensors" = "1" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/sensor/heartbeat/.ompi_ignore b/orte/mca/sensor/heartbeat/.ompi_ignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/orte/mca/sensor/heartbeat/configure.m4 b/orte/mca/sensor/heartbeat/configure.m4 index 3ad8c5b573..7f5b729c20 100644 --- a/orte/mca/sensor/heartbeat/configure.m4 +++ b/orte/mca/sensor/heartbeat/configure.m4 @@ -1,6 +1,8 @@ # -*- shell-script -*- # # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -15,7 +17,7 @@ AC_DEFUN([MCA_orte_sensor_heartbeat_CONFIG], [ # if we don't want heartbeats, don't compile # this component - AS_IF([test "$orte_want_heartbeats" = "1"], + AS_IF([test "$orte_want_heartbeats" = "1" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/sensor/resusage/configure.m4 b/orte/mca/sensor/resusage/configure.m4 index 4b72477ae0..90b4c66912 100644 --- a/orte/mca/sensor/resusage/configure.m4 +++ b/orte/mca/sensor/resusage/configure.m4 @@ -1,6 +1,8 @@ # -*- shell-script -*- # # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -15,7 +17,7 @@ AC_DEFUN([MCA_orte_sensor_resusage_CONFIG], [ # if we don't want sensors, don't compile # this component - AS_IF([test "$orte_want_sensors" = "1"], + AS_IF([test "$orte_want_sensors" = "1" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/snapc/base/snapc_base_fns.c b/orte/mca/snapc/base/snapc_base_fns.c index d3b165f0be..f55a3d746e 100644 --- a/orte/mca/snapc/base/snapc_base_fns.c +++ b/orte/mca/snapc/base/snapc_base_fns.c @@ -44,7 +44,6 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/util/os_dirpath.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/util/show_help.h" #include "opal/util/basename.h" #include "opal/util/argv.h" diff --git a/orte/mca/snapc/full/configure.m4 b/orte/mca/snapc/full/configure.m4 index e4521a1987..f4219fa6b8 100644 --- a/orte/mca/snapc/full/configure.m4 +++ b/orte/mca/snapc/full/configure.m4 @@ -8,7 +8,9 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. -dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -22,7 +24,7 @@ AC_DEFUN([MCA_orte_snapc_full_CONFIG],[ AC_CONFIG_FILES([orte/mca/snapc/full/Makefile]) # If we don't want FT, don't compile this component - AS_IF([test "$opal_want_ft_cr" = "1"], + AS_IF([test "$opal_want_ft_cr" = "1" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/snapc/full/snapc_full.h b/orte/mca/snapc/full/snapc_full.h index a7ea49a99f..9eff5e4b71 100644 --- a/orte/mca/snapc/full/snapc_full.h +++ b/orte/mca/snapc/full/snapc_full.h @@ -29,7 +29,6 @@ #include "opal/mca/mca.h" #include "opal/mca/event/event.h" -#include "opal/util/opal_sos.h" #include "orte/mca/sstore/sstore.h" #include "orte/mca/snapc/snapc.h" diff --git a/orte/mca/sstore/central/configure.m4 b/orte/mca/sstore/central/configure.m4 index 32386afb04..9c7e0e3185 100644 --- a/orte/mca/sstore/central/configure.m4 +++ b/orte/mca/sstore/central/configure.m4 @@ -2,6 +2,8 @@ # # Copyright (c) 2010 The Trustees of Indiana University. # All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # # $COPYRIGHT$ # @@ -16,7 +18,7 @@ AC_DEFUN([MCA_orte_sstore_central_CONFIG],[ AC_CONFIG_FILES([orte/mca/sstore/central/Makefile]) # If we don't want FT, don't compile this component - AS_IF([test "$opal_want_ft_cr" = "1"], + AS_IF([test "$opal_want_ft_cr" = "1" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/mca/sstore/stage/configure.m4 b/orte/mca/sstore/stage/configure.m4 index 6cc6c21f4e..52941b857a 100644 --- a/orte/mca/sstore/stage/configure.m4 +++ b/orte/mca/sstore/stage/configure.m4 @@ -2,6 +2,8 @@ # # Copyright (c) 2010 The Trustees of Indiana University. # All rights reserved. +# Copyright (c) 2011 Los Alamos National Security, LLC. +# All rights reserved. # # $COPYRIGHT$ # @@ -16,7 +18,7 @@ AC_DEFUN([MCA_orte_sstore_stage_CONFIG],[ AC_CONFIG_FILES([orte/mca/sstore/stage/Makefile]) # If we don't want FT, don't compile this component - AS_IF([test "$opal_want_ft_cr" = "1"], + AS_IF([test "$opal_want_ft_cr" = "1" -a "$orte_without_full_support" = 0], [$1], [$2]) ])dnl diff --git a/orte/orted/orted_comm.c b/orte/orted/orted_comm.c index c4c1a95a15..27baac99ab 100644 --- a/orte/orted/orted_comm.c +++ b/orte/orted/orted_comm.c @@ -47,7 +47,6 @@ #include "opal/mca/event/event.h" #include "opal/mca/base/base.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/util/opal_environ.h" #include "opal/runtime/opal.h" #include "opal/runtime/opal_progress.h" @@ -69,7 +68,6 @@ #include "orte/mca/plm/base/plm_private.h" #include "orte/mca/routed/routed.h" #include "orte/mca/ess/ess.h" -#include "orte/mca/rmcast/rmcast.h" #include "orte/mca/odls/base/odls_private.h" @@ -347,7 +345,7 @@ CLEANUP: /* reissue the non-blocking receive */ ret = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_DAEMON, ORTE_RML_NON_PERSISTENT, orte_daemon_recv, NULL); - if (ret != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(ret) != ORTE_ERR_NOT_IMPLEMENTED) { + if (ret != ORTE_SUCCESS && ret != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(ret); } diff --git a/orte/runtime/data_type_support/orte_dt_copy_fns.c b/orte/runtime/data_type_support/orte_dt_copy_fns.c index 759d45ce97..a5a3a6eda2 100644 --- a/orte/runtime/data_type_support/orte_dt_copy_fns.c +++ b/orte/runtime/data_type_support/orte_dt_copy_fns.c @@ -27,7 +27,6 @@ #endif #include "opal/util/argv.h" -#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/runtime/data_type_support/orte_dt_support.h" diff --git a/orte/runtime/data_type_support/orte_dt_size_fns.c b/orte/runtime/data_type_support/orte_dt_size_fns.c index 24d96dc4af..01228a4001 100644 --- a/orte/runtime/data_type_support/orte_dt_size_fns.c +++ b/orte/runtime/data_type_support/orte_dt_size_fns.c @@ -25,7 +25,6 @@ #endif #include "opal/util/argv.h" -#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/constants.h" diff --git a/orte/runtime/data_type_support/orte_dt_support.h b/orte/runtime/data_type_support/orte_dt_support.h index e4c5898174..f58855a6f1 100644 --- a/orte/runtime/data_type_support/orte_dt_support.h +++ b/orte/runtime/data_type_support/orte_dt_support.h @@ -170,9 +170,7 @@ int orte_dt_print_map(char **output, char *prefix, orte_job_map_t *src, opal_dat #endif /** Data type release functions */ -#if !ORTE_DISABLE_FULL_SUPPORT void orte_dt_std_obj_release(opal_dss_value_t *value); -#endif void orte_dt_std_release(opal_dss_value_t *value); /** Data type size functions */ diff --git a/orte/runtime/orte_data_server.c b/orte/runtime/orte_data_server.c index 81866b97ce..22190e0031 100644 --- a/orte/runtime/orte_data_server.c +++ b/orte/runtime/orte_data_server.c @@ -31,7 +31,6 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/class/opal_pointer_array.h" #include "opal/dss/dss.h" diff --git a/orte/runtime/orte_globals.c b/orte/runtime/orte_globals.c index 52241b6e07..f782d8356f 100644 --- a/orte/runtime/orte_globals.c +++ b/orte/runtime/orte_globals.c @@ -30,7 +30,6 @@ #include "opal/mca/hwloc/hwloc.h" #include "opal/util/argv.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/class/opal_pointer_array.h" #include "opal/class/opal_value_array.h" #include "opal/dss/dss.h" diff --git a/orte/runtime/orte_mca_params.c b/orte/runtime/orte_mca_params.c index bf37286fe7..7f277d77d3 100644 --- a/orte/runtime/orte_mca_params.c +++ b/orte/runtime/orte_mca_params.c @@ -41,9 +41,12 @@ static bool passed_thru = false; int orte_register_params(void) { - int value, tmp; + int value; char *strval; - +#if !ORTE_DISABLE_FULL_SUPPORT + int tmp; +#endif + /* only go thru this once - mpirun calls it twice, which causes * any error messages to show up twice */ diff --git a/orte/runtime/orte_quit.c b/orte/runtime/orte_quit.c index b2a7940eff..ff0a061461 100644 --- a/orte/runtime/orte_quit.c +++ b/orte/runtime/orte_quit.c @@ -64,12 +64,13 @@ /* * Globals */ - +#if !ORTE_DISABLE_FULL_SUPPORT static int num_aborted = 0; static int num_killed = 0; static int num_failed_start = 0; static void dump_aborted_procs(void); +#endif void orte_jobs_complete(void) { diff --git a/orte/runtime/orte_wait.c b/orte/runtime/orte_wait.c index cb42ee02c6..4f3c46377e 100644 --- a/orte/runtime/orte_wait.c +++ b/orte/runtime/orte_wait.c @@ -52,7 +52,6 @@ #include "opal/dss/dss_types.h" #include "opal/class/opal_object.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/class/opal_list.h" #include "opal/mca/event/event.h" #include "opal/threads/mutex.h" diff --git a/orte/tools/orte-checkpoint/orte-checkpoint.c b/orte/tools/orte-checkpoint/orte-checkpoint.c index 52fb9a3d4d..2202d49228 100644 --- a/orte/tools/orte-checkpoint/orte-checkpoint.c +++ b/orte/tools/orte-checkpoint/orte-checkpoint.c @@ -56,7 +56,6 @@ #include "opal/util/output.h" #include "opal/util/argv.h" #include "opal/util/opal_environ.h" -#include "opal/util/opal_sos.h" #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/crs/crs.h" diff --git a/orte/tools/orte-info/components.c b/orte/tools/orte-info/components.c index 48c96e4174..50120e68d3 100644 --- a/orte/tools/orte-info/components.c +++ b/orte/tools/orte-info/components.c @@ -10,7 +10,7 @@ * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. * Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2010 Los Alamos National Security, LLC. + * Copyright (c) 2010-2011 Los Alamos National Security, LLC. * All rights reserved. * $COPYRIGHT$ * @@ -62,15 +62,13 @@ #include "orte/mca/errmgr/base/base.h" #include "orte/mca/grpcomm/grpcomm.h" #include "orte/mca/grpcomm/base/base.h" -#include "orte/mca/db/db.h" -#include "orte/mca/db/base/base.h" #include "orte/mca/ess/ess.h" #include "orte/mca/ess/base/base.h" -#include "orte/mca/notifier/notifier.h" -#include "orte/mca/notifier/base/base.h" #include "orte/util/show_help.h" #include "orte/util/proc_info.h" #if !ORTE_DISABLE_FULL_SUPPORT +#include "orte/mca/notifier/notifier.h" +#include "orte/mca/notifier/base/base.h" #include "orte/mca/debugger/debugger.h" #include "orte/mca/debugger/base/base.h" #include "orte/mca/iof/iof.h" @@ -83,8 +81,6 @@ #include "orte/mca/ras/base/ras_private.h" #include "orte/mca/rmaps/rmaps.h" #include "orte/mca/rmaps/base/base.h" -#include "orte/mca/rmcast/rmcast.h" -#include "orte/mca/rmcast/base/base.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/base/base.h" #include "orte/mca/routed/routed.h" @@ -360,14 +356,6 @@ void orte_info_open_components(void) map->components = &orte_grpcomm_base.components_available; opal_pointer_array_add(&component_map, map); - if (ORTE_SUCCESS != orte_db_base_open()) { - goto error; - } - map = OBJ_NEW(orte_info_component_map_t); - map->type = strdup("db"); - map->components = &orte_db_base_components_available; - opal_pointer_array_add(&component_map, map); - if (ORTE_SUCCESS != orte_ess_base_open()) { goto error; } @@ -376,6 +364,7 @@ void orte_info_open_components(void) map->components = &orte_ess_base_components_available; opal_pointer_array_add(&component_map, map); +#if !ORTE_DISABLE_FULL_SUPPORT if (ORTE_SUCCESS != orte_notifier_base_open()) { goto error; } @@ -384,7 +373,6 @@ void orte_info_open_components(void) map->components = &orte_notifier_base_components_available; opal_pointer_array_add(&component_map, map); -#if !ORTE_DISABLE_FULL_SUPPORT if (ORTE_SUCCESS != orte_debugger_base_open()) { goto error; } @@ -433,14 +421,6 @@ void orte_info_open_components(void) map->components = &orte_rmaps_base.available_components; opal_pointer_array_add(&component_map, map); - if (ORTE_SUCCESS != orte_rmcast_base_open()) { - goto error; - } - map = OBJ_NEW(orte_info_component_map_t); - map->type = strdup("rmcast"); - map->components = &orte_rmcast_base.rmcast_opened; - opal_pointer_array_add(&component_map, map); - if (ORTE_SUCCESS != orte_rml_base_open()) { goto error; } @@ -539,14 +519,13 @@ void orte_info_close_components() */ (void) orte_grpcomm_base_close(); - (void) orte_db_base_close(); - (void) orte_notifier_base_close(); (void) orte_ess_base_close(); (void) orte_show_help_finalize(); #if !ORTE_DISABLE_FULL_SUPPORT #if OPAL_ENABLE_FT_CR == 1 (void) orte_snapc_base_close(); #endif + (void) orte_notifier_base_close(); (void) orte_filem_base_close(); (void) orte_iof_base_close(); (void) orte_plm_base_close(); @@ -556,7 +535,6 @@ void orte_info_close_components() (void) orte_rml_base_close(); (void) orte_routed_base_close(); (void) mca_oob_base_close(); - (void) orte_rmcast_base_close(); #endif (void) orte_errmgr_base_close(); diff --git a/orte/tools/orte-info/orte-info.c b/orte/tools/orte-info/orte-info.c index 3761115d70..cf3bfb39de 100644 --- a/orte/tools/orte-info/orte-info.c +++ b/orte/tools/orte-info/orte-info.c @@ -211,7 +211,6 @@ int main(int argc, char *argv[]) opal_pointer_array_add(&mca_types, "odls"); opal_pointer_array_add(&mca_types, "ras"); opal_pointer_array_add(&mca_types, "rmaps"); - opal_pointer_array_add(&mca_types, "rmcast"); opal_pointer_array_add(&mca_types, "rml"); opal_pointer_array_add(&mca_types, "routed"); opal_pointer_array_add(&mca_types, "plm"); @@ -225,7 +224,6 @@ int main(int argc, char *argv[]) opal_pointer_array_add(&mca_types, "errmgr"); opal_pointer_array_add(&mca_types, "ess"); opal_pointer_array_add(&mca_types, "grpcomm"); - opal_pointer_array_add(&mca_types, "db"); opal_pointer_array_add(&mca_types, "notifier"); /* Execute the desired action(s) */ diff --git a/orte/tools/orte-top/orte-top.c b/orte/tools/orte-top/orte-top.c index cf9239a0d9..471ab885d2 100644 --- a/orte/tools/orte-top/orte-top.c +++ b/orte/tools/orte-top/orte-top.c @@ -43,7 +43,6 @@ #include "opal/mca/base/base.h" #include "opal/util/opal_environ.h" #include "opal/runtime/opal.h" -#include "opal/util/opal_sos.h" #include "opal/mca/event/event.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index 980e860f46..10e1fbdfbc 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -52,7 +52,6 @@ #include "opal/mca/base/base.h" #include "opal/util/argv.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/util/basename.h" #include "opal/util/cmd_line.h" #include "opal/util/opal_environ.h" @@ -653,6 +652,7 @@ int orterun(int argc, char *argv[]) /* cannot call ORTE_ERROR_LOG as it could be the errmgr * never got loaded! */ + fprintf(stderr, "FAILED ORTE INIT\n"); return rc; } /* finalize the OPAL utils. As they are opened again from orte_init->opal_init @@ -775,7 +775,7 @@ int orterun(int argc, char *argv[]) */ rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_DAEMON, ORTE_RML_NON_PERSISTENT, orte_daemon_recv, NULL); - if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); ORTE_UPDATE_EXIT_STATUS(ORTE_ERROR_DEFAULT_EXIT_CODE); goto DONE; diff --git a/orte/util/comm/comm.c b/orte/util/comm/comm.c index 680a49669c..ee27705850 100644 --- a/orte/util/comm/comm.c +++ b/orte/util/comm/comm.c @@ -25,7 +25,6 @@ #include #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/threads/tsd.h" #include "opal/mca/event/event.h" diff --git a/orte/util/dash_host/dash_host.c b/orte/util/dash_host/dash_host.c index 9512af12be..89cdf8884b 100644 --- a/orte/util/dash_host/dash_host.c +++ b/orte/util/dash_host/dash_host.c @@ -26,7 +26,6 @@ #include "orte/types.h" #include "orte/util/show_help.h" -#include "opal/util/opal_sos.h" #include "opal/util/argv.h" #include "opal/util/if.h" diff --git a/orte/util/error_strings.c b/orte/util/error_strings.c index f135055175..31a3f1658f 100644 --- a/orte/util/error_strings.c +++ b/orte/util/error_strings.c @@ -31,14 +31,13 @@ #endif #endif -#include "opal/util/opal_sos.h" #include "orte/util/error_strings.h" #include "orte/runtime/orte_globals.h" int orte_err2str(int errnum, const char **errmsg) { const char *retval; - switch (OPAL_SOS_GET_ERROR_CODE(errnum)) { + switch (errnum) { case ORTE_ERR_RECV_LESS_THAN_POSTED: retval = "Receive was less than posted size"; break; diff --git a/orte/util/hnp_contact.c b/orte/util/hnp_contact.c index 3155ccdc19..147a90290c 100644 --- a/orte/util/hnp_contact.c +++ b/orte/util/hnp_contact.c @@ -37,7 +37,6 @@ #include "opal/util/os_path.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/util/os_dirpath.h" #include "orte/mca/errmgr/errmgr.h" @@ -193,7 +192,7 @@ int orte_list_local_hnps(opal_list_t *hnps, bool connect) /* it is okay not to find this as there may not be any * HNP's present, and we don't write our own session dir */ - if (ORTE_ERR_NOT_FOUND != OPAL_SOS_GET_ERROR_CODE(ret)) { + if (ORTE_ERR_NOT_FOUND != ret) { ORTE_ERROR_LOG(ret); } goto cleanup; diff --git a/orte/util/name_fns.c b/orte/util/name_fns.c index f6b829f9ff..70933b5795 100644 --- a/orte/util/name_fns.c +++ b/orte/util/name_fns.c @@ -24,7 +24,6 @@ #include #include "opal/util/printf.h" -#include "opal/util/opal_sos.h" #include "opal/threads/tsd.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/util/pre_condition_transports.c b/orte/util/pre_condition_transports.c index 28ff5552e3..39859d285e 100644 --- a/orte/util/pre_condition_transports.c +++ b/orte/util/pre_condition_transports.c @@ -40,7 +40,6 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/util/opal_environ.h" -#include "opal/util/opal_sos.h" #include "orte/constants.h" #include "orte/types.h" diff --git a/orte/util/regex.c b/orte/util/regex.c index ef94f994f5..5a67b38e2e 100644 --- a/orte/util/regex.c +++ b/orte/util/regex.c @@ -43,7 +43,6 @@ #endif #include "opal/util/argv.h" -#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/odls/odls_types.h" diff --git a/orte/util/session_dir.c b/orte/util/session_dir.c index 016567d122..4a0dd77e2d 100644 --- a/orte/util/session_dir.c +++ b/orte/util/session_dir.c @@ -47,7 +47,6 @@ #include "opal/util/argv.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/util/os_path.h" #include "opal/util/os_dirpath.h" #include "opal/util/basename.h" @@ -91,7 +90,7 @@ static int orte_create_dir(char *directory) /* Sanity check before creating the directory with the proper mode, * Make sure it doesn't exist already */ if( ORTE_ERR_NOT_FOUND != - (ret = OPAL_SOS_GET_ERROR_CODE(opal_os_dirpath_access(directory, my_mode))) ) { + (ret = opal_os_dirpath_access(directory, my_mode)) ) { /* Failure because opal_os_dirpath_access() indicated that either: * - The directory exists and we can access it (no need to create it again), * return OPAL_SUCCESS, or @@ -389,7 +388,7 @@ int orte_session_dir(bool create, &frontend, hostid, batchid, proc) ) ) { - if (ORTE_ERR_FATAL == OPAL_SOS_GET_ERROR_CODE(rc)) { + if (ORTE_ERR_FATAL == rc) { /* this indicates we should abort quietly */ rc = ORTE_ERR_SILENT; goto cleanup; @@ -416,7 +415,7 @@ int orte_session_dir(bool create, /* it is okay for the path not to be found - don't error * log that case, but do error log others */ - if (ORTE_ERR_NOT_FOUND != OPAL_SOS_GET_ERROR_CODE(rc)) { + if (ORTE_ERR_NOT_FOUND != rc) { ORTE_ERROR_LOG(rc); } goto cleanup; diff --git a/orte/util/show_help.c b/orte/util/show_help.c index c3c20e9008..094a62a9da 100644 --- a/orte/util/show_help.c +++ b/orte/util/show_help.c @@ -26,7 +26,6 @@ #include "opal/util/show_help.h" #include "opal/util/output.h" -#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "opal/mca/event/event.h" @@ -490,7 +489,7 @@ static int show_help(const char *filename, const char *topic, } } /* Not already displayed */ - else if (ORTE_ERR_NOT_FOUND == OPAL_SOS_GET_ERROR_CODE(rc)) { + else if (ORTE_ERR_NOT_FOUND == rc) { if (orte_xml_output) { char *tmp; tmp = xml_format((unsigned char*)output); @@ -587,7 +586,7 @@ cleanup: /* reissue the recv */ rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_SHOW_HELP, ORTE_RML_NON_PERSISTENT, orte_show_help_recv, NULL); - if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); } }