1
1

* Forgot to update the iof null component when we revamped the IOF

framework.  Updated pointers to match current definitions.
 * Trimmed some dead wood while I was at it:
   * No need for component close function that does nothing
   * Use BEGIN/END_C_DECLS
   * Use recent MCA param register function
   * Ditch MCA param orte_iof_debug (it wasn't used anywhere)
   * Use MCA param orte_iof_override properly in the code (i.e., look
     up the value once and use the cached value later)

This commit was SVN r14981.
Этот коммит содержится в:
Jeff Squyres 2007-06-11 00:58:21 +00:00
родитель 9fb2e807a9
Коммит 1ed906a78b
3 изменённых файлов: 19 добавлений и 46 удалений

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

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* Copyright (c) 2007 Cisco, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -22,9 +23,8 @@
#define ORTE_IOF_NULL_H #define ORTE_IOF_NULL_H
#include "orte/mca/iof/iof.h" #include "orte/mca/iof/iof.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" { BEGIN_C_DECLS
#endif
int orte_iof_null_finalize(void); int orte_iof_null_finalize(void);
@ -134,7 +134,7 @@ int orte_iof_null_ft_event( int state );
*/ */
struct orte_iof_null_component_t { struct orte_iof_null_component_t {
orte_iof_base_component_t super; orte_iof_base_component_t super;
int null_debug; int null_override;
struct iovec null_iov[1]; struct iovec null_iov[1];
}; };
typedef struct orte_iof_null_component_t orte_iof_null_component_t; typedef struct orte_iof_null_component_t orte_iof_null_component_t;
@ -142,8 +142,6 @@ typedef struct orte_iof_null_component_t orte_iof_null_component_t;
ORTE_MODULE_DECLSPEC extern orte_iof_null_component_t mca_iof_null_component; ORTE_MODULE_DECLSPEC extern orte_iof_null_component_t mca_iof_null_component;
extern orte_iof_base_module_t orte_iof_null_module; extern orte_iof_base_module_t orte_iof_null_module;
#if defined(c_plusplus) || defined(__cplusplus) END_C_DECLS
}
#endif
#endif #endif

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

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* Copyright (c) 2007 Cisco, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -31,7 +32,6 @@
* Local functions * Local functions
*/ */
static int orte_iof_null_open(void); static int orte_iof_null_open(void);
static int orte_iof_null_close(void);
static orte_iof_base_module_t* orte_iof_null_init( static orte_iof_base_module_t* orte_iof_null_init(
int* priority, int* priority,
bool *allow_multi_user_threads, bool *allow_multi_user_threads,
@ -54,7 +54,7 @@ orte_iof_null_component_t mca_iof_null_component = {
ORTE_MINOR_VERSION, /* MCA component minor version */ ORTE_MINOR_VERSION, /* MCA component minor version */
ORTE_RELEASE_VERSION, /* MCA component release version */ ORTE_RELEASE_VERSION, /* MCA component release version */
orte_iof_null_open, /* component open */ orte_iof_null_open, /* component open */
orte_iof_null_close /* component close */ NULL
}, },
/* Next the MCA v1.0.0 component meta data */ /* Next the MCA v1.0.0 component meta data */
@ -69,26 +69,16 @@ orte_iof_null_component_t mca_iof_null_component = {
/*{{NULL, 0}}*/ /*{{NULL, 0}}*/
}; };
static int orte_iof_null_param_register_int( /*
const char* param_name, * component open/init function
int default_value) */
{
int id = mca_base_param_register_int("iof","null",param_name,NULL,default_value);
int param_value = default_value;
mca_base_param_lookup_int(id,&param_value);
return param_value;
}
/**
* component open/close/init function
*/
static int orte_iof_null_open(void) static int orte_iof_null_open(void)
{ {
mca_iof_null_component.null_debug = mca_base_param_reg_int(&mca_iof_null_component.super.iof_version,
orte_iof_null_param_register_int("debug", 1); "override",
mca_iof_null_component.null_debug = "Whether to use the null IOF component or not",
orte_iof_null_param_register_int("override", 0); false, false, 0,
&mca_iof_null_component.null_override);
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
@ -97,15 +87,10 @@ static orte_iof_base_module_t*
orte_iof_null_init(int* priority, bool *allow_multi_user_threads, orte_iof_null_init(int* priority, bool *allow_multi_user_threads,
bool *have_hidden_threads) bool *have_hidden_threads)
{ {
int param, override;
param = mca_base_param_find("iof", "null", "override");
mca_base_param_lookup_int(param, &override);
/* Only be used in a PBS environment -- this component is /* Only be used in a PBS environment -- this component is
currently *only* for debugging */ currently *only* for debugging */
if (0 != override || if (0 != mca_iof_null_component.null_override ||
(NULL != getenv("PBS_ENVIRONMENT") && (NULL != getenv("PBS_ENVIRONMENT") &&
NULL != getenv("PBS_JOBID"))) { NULL != getenv("PBS_JOBID"))) {
*priority = 50; *priority = 50;
@ -117,14 +102,3 @@ orte_iof_null_init(int* priority, bool *allow_multi_user_threads,
return NULL; return NULL;
} }
/**
*
*/
static int orte_iof_null_close(void)
{
return ORTE_SUCCESS;
}

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

@ -9,6 +9,7 @@
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* Copyright (c) 2007 Cisco, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
@ -37,10 +38,10 @@
orte_iof_base_module_t orte_iof_null_module = { orte_iof_base_module_t orte_iof_null_module = {
orte_iof_null_publish, orte_iof_null_publish,
orte_iof_null_unpublish, orte_iof_null_unpublish,
orte_iof_null_push,
orte_iof_null_pull,
orte_iof_null_subscribe, orte_iof_null_subscribe,
orte_iof_null_unsubscribe, orte_iof_null_unsubscribe,
orte_iof_null_push,
orte_iof_null_pull,
orte_iof_base_flush, orte_iof_base_flush,
orte_iof_null_finalize, orte_iof_null_finalize,
orte_iof_null_ft_event orte_iof_null_ft_event