1
1
openmpi/orte/mca/odls/bproc/odls_bproc_component.c
Ralph Castain 85df3bd92f Bring in the generalized xcast communication system along with the correspondingly revised orted launch. I will send a message out to developers explaining the basic changes. In brief:
1. generalize orte_rml.xcast to become a general broadcast-like messaging system. Messages can now be sent to any tag on the daemons or processes. Note that any message sent via xcast will be delivered to ALL processes in the specified job - you don't get to pick and choose. At a later date, we will introduce an augmented capability that will use the daemons as relays, but will allow you to send to a specified array of process names.

2. extended orte_rml.xcast so it supports more scalable message routing methodologies. At the moment, we support three: (a) direct, which sends the message directly to all recipients; (b) linear, which sends the message to the local daemon on each node, which then relays it to its own local procs; and (b) binomial, which sends the message via a binomial algo across all the daemons, each of which then relays to its own local procs. The crossover points between the algos are adjustable via MCA param, or you can simply demand that a specific algo be used.

3. orteds no longer exhibit two types of behavior: bootproxy or VM. Orteds now always behave like they are part of a virtual machine - they simply launch a job if mpirun tells them to do so. This is another step towards creating an "orteboot" functionality, but also provided a clean system for supporting message relaying.

Note one major impact of this commit: multiple daemons on a node cannot be supported any longer! Only a single daemon/node is now allowed.

This commit is known to break support for the following environments: POE, Xgrid, Xcpu, Windows. It has been tested on rsh, SLURM, and Bproc. Modifications for TM support have been made but could not be verified due to machine problems at LANL. Modifications for SGE have been made but could not be verified. The developers for the non-verified environments will be separately notified along with suggestions on how to fix the problems.

This commit was SVN r15007.
2007-06-12 13:28:54 +00:00

142 строки
4.3 KiB
C

/*
* Copyright (c) 2004-2007 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$
*
*/
/**
* @file:
* Takes care of the component stuff for the MCA.
*/
#include "orte_config.h"
#include "orte/orte_constants.h"
#include "opal/mca/base/mca_base_param.h"
#include "orte/util/proc_info.h"
#include "orte/mca/odls/odls.h"
#include "odls_bproc.h"
/* instance the child list object */
static void odls_bproc_child_constructor(odls_bproc_child_t *ptr)
{
ptr->name = NULL;
ptr->app_idx = -1;
ptr->alive = false;
ptr->local_rank = ORTE_VPID_INVALID;
ptr->num_procs = 0;
}
static void odls_bproc_child_destructor(odls_bproc_child_t *ptr)
{
if (NULL != ptr->name) free(ptr->name);
}
OBJ_CLASS_INSTANCE(odls_bproc_child_t,
opal_list_item_t,
odls_bproc_child_constructor,
odls_bproc_child_destructor);
/**
* The bproc component data structure used to store all the relevent data
* about this component.
*/
orte_odls_bproc_component_t mca_odls_bproc_component = {
{
/* First, the mca_component_t struct containing meta information
about the component itself */
{
/* Indicate that we are a odls v1.3.0 component (which also
implies a specific MCA version) */
ORTE_ODLS_BASE_VERSION_1_3_0,
/* Component name and version */
"bproc",
ORTE_MAJOR_VERSION,
ORTE_MINOR_VERSION,
ORTE_RELEASE_VERSION,
/* Component open and close functions */
orte_odls_bproc_component_open,
orte_odls_bproc_component_close
},
/* Next the MCA v1.0.0 component meta data */
{
/* The component is checkpoint ready */
MCA_BASE_METADATA_PARAM_CHECKPOINT
},
/* Initialization / querying functions */
orte_odls_bproc_init,
orte_odls_bproc_finalize
}
};
/**
* Opens the pls_bproc component, setting all the needed mca parameters and
* finishes setting up the component struct.
*/
int orte_odls_bproc_component_open(void)
{
/* initialize globals */
OBJ_CONSTRUCT(&mca_odls_bproc_component.lock, opal_mutex_t);
OBJ_CONSTRUCT(&mca_odls_bproc_component.cond, opal_condition_t);
OBJ_CONSTRUCT(&mca_odls_bproc_component.children, opal_list_t);
/* lookup parameters */
mca_base_param_reg_int(&mca_odls_bproc_component.super.version,
"priority", NULL, false, false, 100,
&mca_odls_bproc_component.priority);
mca_base_param_reg_int(&mca_odls_bproc_component.super.version,
"debug", "If > 0 prints library debugging information",
false, false, 0, &mca_odls_bproc_component.debug);
return ORTE_SUCCESS;
}
/**
* Initializes the module. We do not want to run unless we are not the seed,
* bproc is running, and we are not on the master node.
*/
orte_odls_base_module_t *orte_odls_bproc_init(int *priority)
{
int ret;
struct bproc_version_t version;
/* the base open/select logic protects us against operation when
* we are NOT in a daemon, so we don't have to check that here
*/
/* check to see if BProc is running here */
ret = bproc_version(&version);
if (ret != 0) {
return NULL;
}
/* only launch if we are not the master node */
if (bproc_currnode() == BPROC_NODE_MASTER) {
return NULL;
}
*priority = mca_odls_bproc_component.priority;
return &orte_odls_bproc_module;
}
/**
* Component close function.
*/
int orte_odls_bproc_component_close(void)
{
OBJ_DESTRUCT(&mca_odls_bproc_component.lock);
OBJ_DESTRUCT(&mca_odls_bproc_component.cond);
OBJ_DESTRUCT(&mca_odls_bproc_component.children);
return ORTE_SUCCESS;
}