2011-10-18 00:51:22 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2011 Cisco Systems, Inc. All rights reserved.
|
Per the meeting on moving the BTLs to OPAL, move the ORTE database "db" framework to OPAL so the relocated BTLs can access it. Because the data is indexed by process, this requires that we define a new "opal_identifier_t" that corresponds to the orte_process_name_t struct. In order to support multiple run-times, this is defined in opal/mca/db/db_types.h as a uint64_t without identifying the meaning of any part of that data.
A few changes were required to support this move:
1. the PMI component used to identify rte-related data (e.g., host name, bind level) and package them as a unit to reduce the number of PMI keys. This code was moved up to the ORTE layer as the OPAL layer has no understanding of these concepts. In addition, the component locally stored data based on process jobid/vpid - this could no longer be supported (see below for the solution).
2. the hash component was updated to use the new opal_identifier_t instead of orte_process_name_t as its index for storing data in the hash tables. Previously, we did a hash on the vpid and stored the data in a 32-bit hash table. In the revised system, we don't see a separate "vpid" field - we only have a 64-bit opaque value. The orte_process_name_t hash turned out to do nothing useful, so we now store the data in a 64-bit hash table. Preliminary tests didn't show any identifiable change in behavior or performance, but we'll have to see if a move back to the 32-bit table is required at some later time.
3. the db framework was a "select one" system. However, since the PMI component could no longer use its internal storage system, the framework has now been changed to a "select many" mode of operation. This allows the hash component to handle all internal storage, while the PMI component only handles pushing/pulling things from the PMI system. This was something we had planned for some time - when fetching data, we first check internal storage to see if we already have it, and then automatically go to the global system to look for it if we don't. Accordingly, the framework was provided with a custom query function used during "select" that lets you seperately specify the "store" and "fetch" ordering.
4. the ORTE grpcomm and ess/pmi components, and the nidmap code, were updated to work with the new db framework and to specify internal/global storage options.
No changes were made to the MPI layer, except for modifying the ORTE component of the OMPI/rte framework to support the new db framework.
This commit was SVN r28112.
2013-02-26 21:50:04 +04:00
|
|
|
* Copyright (c) 2011-2013 Los Alamos National Security, LLC. All
|
2011-10-21 08:54:38 +04:00
|
|
|
* rights reserved.
|
2011-10-18 00:51:22 +04:00
|
|
|
* $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"
|
|
|
|
|
Per the meeting on moving the BTLs to OPAL, move the ORTE database "db" framework to OPAL so the relocated BTLs can access it. Because the data is indexed by process, this requires that we define a new "opal_identifier_t" that corresponds to the orte_process_name_t struct. In order to support multiple run-times, this is defined in opal/mca/db/db_types.h as a uint64_t without identifying the meaning of any part of that data.
A few changes were required to support this move:
1. the PMI component used to identify rte-related data (e.g., host name, bind level) and package them as a unit to reduce the number of PMI keys. This code was moved up to the ORTE layer as the OPAL layer has no understanding of these concepts. In addition, the component locally stored data based on process jobid/vpid - this could no longer be supported (see below for the solution).
2. the hash component was updated to use the new opal_identifier_t instead of orte_process_name_t as its index for storing data in the hash tables. Previously, we did a hash on the vpid and stored the data in a 32-bit hash table. In the revised system, we don't see a separate "vpid" field - we only have a 64-bit opaque value. The orte_process_name_t hash turned out to do nothing useful, so we now store the data in a 64-bit hash table. Preliminary tests didn't show any identifiable change in behavior or performance, but we'll have to see if a move back to the 32-bit table is required at some later time.
3. the db framework was a "select one" system. However, since the PMI component could no longer use its internal storage system, the framework has now been changed to a "select many" mode of operation. This allows the hash component to handle all internal storage, while the PMI component only handles pushing/pulling things from the PMI system. This was something we had planned for some time - when fetching data, we first check internal storage to see if we already have it, and then automatically go to the global system to look for it if we don't. Accordingly, the framework was provided with a custom query function used during "select" that lets you seperately specify the "store" and "fetch" ordering.
4. the ORTE grpcomm and ess/pmi components, and the nidmap code, were updated to work with the new db framework and to specify internal/global storage options.
No changes were made to the MPI layer, except for modifying the ORTE component of the OMPI/rte framework to support the new db framework.
This commit was SVN r28112.
2013-02-26 21:50:04 +04:00
|
|
|
#include "opal/mca/common/pmi/common_pmi.h"
|
|
|
|
|
2011-10-18 00:51:22 +04:00
|
|
|
#include "orte/util/proc_info.h"
|
|
|
|
|
|
|
|
#include "orte/mca/ess/ess.h"
|
|
|
|
#include "orte/mca/ess/pmi/ess_pmi.h"
|
|
|
|
|
|
|
|
extern orte_ess_base_module_t orte_ess_pmi_module;
|
|
|
|
|
|
|
|
static int pmi_component_open(void);
|
|
|
|
static int pmi_component_close(void);
|
|
|
|
static int pmi_component_query(mca_base_module_t **module, int *priority);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Instantiate the public struct with all of our public information
|
|
|
|
* and pointers to our public functions in it
|
|
|
|
*/
|
|
|
|
orte_ess_base_component_t mca_ess_pmi_component = {
|
|
|
|
{
|
2012-06-27 18:53:55 +04:00
|
|
|
ORTE_ESS_BASE_VERSION_3_0_0,
|
2011-10-18 00:51:22 +04:00
|
|
|
|
|
|
|
/* Component name and version */
|
|
|
|
"pmi",
|
|
|
|
ORTE_MAJOR_VERSION,
|
|
|
|
ORTE_MINOR_VERSION,
|
|
|
|
ORTE_RELEASE_VERSION,
|
|
|
|
|
|
|
|
/* Component open and close functions */
|
|
|
|
pmi_component_open,
|
|
|
|
pmi_component_close,
|
|
|
|
pmi_component_query
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* The component is checkpoint ready */
|
|
|
|
MCA_BASE_METADATA_PARAM_CHECKPOINT
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static int pmi_component_open(void)
|
|
|
|
{
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
2011-10-21 08:54:38 +04:00
|
|
|
static int pmi_component_query(mca_base_module_t **module, int *priority)
|
|
|
|
{
|
2012-01-19 00:56:53 +04:00
|
|
|
/* we are available anywhere PMI is available, but not for HNP itself */
|
2012-05-22 19:15:39 +04:00
|
|
|
if (!ORTE_PROC_IS_HNP && mca_common_pmi_init ()) {
|
2011-10-21 08:54:38 +04:00
|
|
|
/* if PMI is available, use it */
|
2012-04-06 18:23:13 +04:00
|
|
|
*priority = 35;
|
2011-10-21 08:54:38 +04:00
|
|
|
*module = (mca_base_module_t *)&orte_ess_pmi_module;
|
|
|
|
return ORTE_SUCCESS;
|
2011-10-18 00:51:22 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/* we can't run */
|
|
|
|
*priority = -1;
|
|
|
|
*module = NULL;
|
|
|
|
return ORTE_ERROR;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int pmi_component_close(void)
|
|
|
|
{
|
2012-05-22 19:15:39 +04:00
|
|
|
mca_common_pmi_finalize ();
|
2011-10-18 00:51:22 +04:00
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|