diff --git a/orte/mca/debugger/dummy/Makefile.am b/orte/mca/debugger/dummy/Makefile.am new file mode 100644 index 0000000000..835c812500 --- /dev/null +++ b/orte/mca/debugger/dummy/Makefile.am @@ -0,0 +1,34 @@ +# +# Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. +# $COPYRIGHT$ +# +# Additional copyrights may follow +# +# $HEADER$ +# + +sources = \ + dummy.h \ + dummy.c \ + dummy_component.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_debugger_dummy_DSO +component_noinst = +component_install = mca_debugger_dummy.la +else +component_noinst = libmca_debugger_dummy.la +component_install = +endif + +mcacomponentdir = $(pkglibdir) +mcacomponent_LTLIBRARIES = $(component_install) +mca_debugger_dummy_la_SOURCES = $(sources) +mca_debugger_dummy_la_LDFLAGS = -module -avoid-version + +noinst_LTLIBRARIES = $(component_noinst) +libmca_debugger_dummy_la_SOURCES =$(sources) +libmca_debugger_dummy_la_LDFLAGS = -module -avoid-version diff --git a/orte/mca/debugger/dummy/dummy.c b/orte/mca/debugger/dummy/dummy.c new file mode 100644 index 0000000000..58758245fb --- /dev/null +++ b/orte/mca/debugger/dummy/dummy.c @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2011 Los Alamos National Security, LLC. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * Test C99 struct initialization. Remove on 1/20/201 after MTT has run. + * + * $HEADER$ + */ + +#include "orte_config.h" + +#ifdef HAVE_STRING_H +#include +#endif +#include +#ifdef HAVE_STDLIB_H +#include +#endif /* HAVE_STDLIB_H */ +#ifdef HAVE_STRINGS_H +#include +#endif /* HAVE_STRINGS_H */ +#ifdef HAVE_UNISTD_H +#include +#endif /* HAVE_UNISTD_H */ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#include +#include +#include +#include + +#include "opal/util/argv.h" +#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" +#include "opal/mca/event/event.h" + +#include "orte/mca/errmgr/errmgr.h" +#include "orte/mca/rml/rml.h" +#include "orte/mca/rml/rml_types.h" +#include "orte/mca/plm/plm.h" +#include "orte/mca/plm/base/plm_private.h" +#include "orte/mca/rmaps/rmaps_types.h" +#include "orte/runtime/orte_globals.h" +#include "orte/runtime/orte_wait.h" +#include "orte/util/show_help.h" +#include "orte/util/name_fns.h" + +#include "orte/mca/debugger/base/base.h" +#include "dummy.h" + +/* Static API's */ +static int init(void); +static void finalize(void); +static void init_before_spawn(orte_job_t *jdata); + +/* Module definition */ +orte_debugger_base_module_t orte_debugger_dummy_module = { + .init = init, + .finalize = finalize, + .init_before_spawn = init_before_spawn, + .init_after_spawn = orte_debugger_base_init_after_spawn +}; + +/* local globals and functions */ + +static int init(void) +{ + return ORTE_SUCCESS; +} + +void finalize(void) +{ +} + +void init_before_spawn(orte_job_t *jdata) +{ +} diff --git a/orte/mca/debugger/dummy/dummy.h b/orte/mca/debugger/dummy/dummy.h new file mode 100644 index 0000000000..9b73bd09ad --- /dev/null +++ b/orte/mca/debugger/dummy/dummy.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2011 Los Alamos National Security, LLC. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * Test C99 struct initialization. Remove on 1/20/2011 after MTT has run. + * + * $HEADER$ + */ + +#ifndef DEBUGGER_DUMMY_H +#define DEBUGGER_DUMMY_H + +#include "orte_config.h" + +#include "orte/mca/debugger/debugger.h" + +BEGIN_C_DECLS + +ORTE_MODULE_DECLSPEC extern orte_debugger_base_component_t mca_debugger_dummy_component; +extern orte_debugger_base_module_t orte_debugger_dummy_module; + +END_C_DECLS + +#endif diff --git a/orte/mca/debugger/dummy/dummy_component.c b/orte/mca/debugger/dummy/dummy_component.c new file mode 100644 index 0000000000..ce8ceddfa3 --- /dev/null +++ b/orte/mca/debugger/dummy/dummy_component.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2011 Los Alamos National Security, LLC. + * All rights reserved. + * $COPYRIGHT$ + * + * Additional copyrights may follow + * + * Test C99 struct initialization. Remove on 1/20/2011 after MTT has run. + * + * $HEADER$ + */ + +#include "orte_config.h" +#include "orte/constants.h" + +#include "dummy.h" + +static int component_open(void); +static int component_query(mca_base_module_t **module, int *priority); + +/* + * Struct of function pointers that need to be initialized + */ +orte_debugger_base_component_t mca_debugger_dummy_component = { + .base_version = { + ORTE_DEBUGGER_BASE_VERSION_1_0_0, + + .mca_component_name = "dummy", + .mca_component_major_version = ORTE_MAJOR_VERSION, + .mca_component_minor_version = ORTE_MINOR_VERSION, + .mca_component_release_version = ORTE_RELEASE_VERSION, /* MCA module release version */ + + .mca_open_component = component_open, + .mca_close_component = NULL, + .mca_query_component = component_query + }, + .base_data = { + /* The component is checkpoint ready */ + .param_field = MCA_BASE_METADATA_PARAM_CHECKPOINT + } +}; + +static int component_open(void) +{ + mca_base_component_t *c = &mca_debugger_dummy_component.base_version; + + return ORTE_SUCCESS; +} + +static int component_query(mca_base_module_t **module, int *priority) +{ + *priority = 10; + *module = (mca_base_module_t *)&orte_debugger_dummy_module; + return ORTE_SUCCESS; +}