diff --git a/opal/mca/paffinity/base/base.h b/opal/mca/paffinity/base/base.h index a83dcc5a95..a60e47e5bc 100644 --- a/opal/mca/paffinity/base/base.h +++ b/opal/mca/paffinity/base/base.h @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -31,6 +31,16 @@ BEGIN_C_DECLS +/** + * Register MCA params for the paffinity base. + * + * @retval OPAL_SUCCESS Upon success + * + * This function is invoked by opal_register_params(). It registers + * some paffinity-wide MCA parameters. + */ +OPAL_DECLSPEC int opal_paffinity_base_register_params(void); + /** * Initialize the paffinity MCA framework * diff --git a/opal/mca/paffinity/base/paffinity_base_open.c b/opal/mca/paffinity/base/paffinity_base_open.c index 71aa872a86..6a01491d93 100644 --- a/opal/mca/paffinity/base/paffinity_base_open.c +++ b/opal/mca/paffinity/base/paffinity_base_open.c @@ -9,7 +9,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2008 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -47,10 +47,9 @@ bool opal_paffinity_alone = false; char *opal_paffinity_base_slot_list; /* - * Function for finding and opening either all MCA components, or the one - * that was specifically requested via a MCA parameter. + * Register some paffinity-wide MCA params */ -int opal_paffinity_base_open(void) +int opal_paffinity_base_register_params(void) { int value, id; @@ -71,7 +70,7 @@ int opal_paffinity_base_open(void) false, false, 0, NULL); /* register the historical mpi_paffinity_alone synonym, but don't - * declare it deprecated so we don't scare the users + * declare it deprecated so we don't scare the users. * * Yes, this breaks the abstraction barrier, but as indicated * on the developer list....live with it. :-) @@ -80,6 +79,15 @@ int opal_paffinity_base_open(void) mca_base_param_lookup_int(id, &value); opal_paffinity_alone = OPAL_INT_TO_BOOL(value); + return OPAL_SUCCESS; +} + +/* + * Function for finding and opening either all MCA components, or the one + * that was specifically requested via a MCA parameter. + */ +int opal_paffinity_base_open(void) +{ opal_paffinity_base_components_opened_valid = false; mca_base_param_reg_string_name("opal", "paffinity_base_slot_list", diff --git a/opal/runtime/opal_params.c b/opal/runtime/opal_params.c index a049074e81..23a3b63a56 100644 --- a/opal/runtime/opal_params.c +++ b/opal/runtime/opal_params.c @@ -11,7 +11,7 @@ * All rights reserved. * Copyright (c) 2006 Los Alamos National Security, LLC. All rights * reserved. - * Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. * $COPYRIGHT$ * @@ -32,9 +32,12 @@ #include "opal/datatype/opal_datatype.h" #include "opal/mca/base/mca_base_param.h" #include "opal/threads/mutex.h" +#include "opal/mca/paffinity/base/base.h" int opal_register_params(void) { + int ret; + /* * This string is going to be used in opal/util/stacktrace.c */ @@ -104,5 +107,11 @@ int opal_register_params(void) } #endif /* The ddt engine has a few parameters */ - return opal_datatype_register_params(); + ret = opal_datatype_register_params(); + if (OPAL_SUCCESS != ret) { + return ret; + } + + /* Paffinity base also has some parameters */ + return opal_paffinity_base_register_params(); }