1
1
openmpi/orte/mca/rmgr/urm/rmgr_urm.c
Ralph Castain 54b2cf747e These changes were mostly captured in a prior RFC (except for #2 below) and are aimed specifically at improving startup performance and setting up the remaining modifications described in that RFC.
The commit has been tested for C/R and Cray operations, and on Odin (SLURM, rsh) and RoadRunner (TM). I tried to update all environments, but obviously could not test them. I know that Windows needs some work, and have highlighted what is know to be needed in the odls process component.

This represents a lot of work by Brian, Tim P, Josh, and myself, with much advice from Jeff and others. For posterity, I have appended a copy of the email describing the work that was done:

As we have repeatedly noted, the modex operation in MPI_Init is the single greatest consumer of time during startup. To-date, we have executed that operation as an ORTE stage gate that held the process until a startup message containing all required modex (and OOB contact info - see #3 below) info could be sent to it. Each process would send its data to the HNP's registry, which assembled and sent the message when all processes had reported in.

In addition, ORTE had taken responsibility for monitoring process status as it progressed through a series of "stage gates". The process reported its status at each gate, and ORTE would then send a "release" message once all procs had reported in.

The incoming changes revamp these procedures in three ways:

1. eliminating the ORTE stage gate system and cleanly delineating responsibility between the OMPI and ORTE layers for MPI init/finalize. The modex stage gate (STG1) has been replaced by a collective operation in the modex itself that performs an allgather on the required modex info. The allgather is implemented using the orte_grpcomm framework since the BTL's are not active at that point. At the moment, the grpcomm framework only has a "basic" component analogous to OMPI's "basic" coll framework - I would recommend that the MPI team create additional, more advanced components to improve performance of this step.

The other stage gates have been replaced by orte_grpcomm barrier functions. We tried to use MPI barriers instead (since the BTL's are active at that point), but - as we discussed on the telecon - these are not currently true barriers so the job would hang when we fell through while messages were still in process. Note that the grpcomm barrier doesn't actually resolve that problem, but Brian has pointed out that we are unlikely to ever see it violated. Again, you might want to spend a little time on an advanced barrier algorithm as the one in "basic" is very simplistic.

Summarizing this change: ORTE no longer tracks process state nor has direct responsibility for synchronizing jobs. This is now done via collective operations within the MPI layer, albeit using ORTE collective communication services. I -strongly- urge the MPI team to implement advanced collective algorithms to improve the performance of this critical procedure.


2. reducing the volume of data exchanged during modex. Data in the modex consisted of the process name, the name of the node where that process is located (expressed as a string), plus a string representation of all contact info. The nodename was required in order for the modex to determine if the process was local or not - in addition, some people like to have it to print pretty error messages when a connection failed.

The size of this data has been reduced in three ways:

(a) reducing the size of the process name itself. The process name consisted of two 32-bit fields for the jobid and vpid. This is far larger than any current system, or system likely to exist in the near future, can support. Accordingly, the default size of these fields has been reduced to 16-bits, which means you can have 32k procs in each of 32k jobs. Since the daemons must have a vpid, and we require one daemon/node, this also restricts the default configuration to 32k nodes.

To support any future "mega-clusters", a configuration option --enable-jumbo-apps has been added. This option increases the jobid and vpid field sizes to 32-bits. Someday, if necessary, someone can add yet another option to increase them to 64-bits, I suppose.

(b) replacing the string nodename with an integer nodeid. Since we have one daemon/node, the nodeid corresponds to the local daemon's vpid. This replaces an often lengthy string with only 2 (or at most 4) bytes, a substantial reduction.

(c) when the mca param requesting that nodenames be sent to support pretty error messages, a second mca param is now used to request FQDN - otherwise, the domain name is stripped (by default) from the message to save space. If someone wants to combine those into a single param somehow (perhaps with an argument?), they are welcome to do so - I didn't want to alter what people are already using.

While these may seem like small savings, they actually amount to a significant impact when aggregated across the entire modex operation. Since every proc must receive the modex data regardless of the collective used to send it, just reducing the size of the process name removes nearly 400MBytes of communication from a 32k proc job (admittedly, much of this comm may occur in parallel). So it does add up pretty quickly.


3. routing RML messages to reduce connections. The default messaging system remains point-to-point - i.e., each proc opens a socket to every proc it communicates with and sends its messages directly. A new option uses the orteds as routers - i.e., each proc only opens a single socket to its local orted. All messages are sent from the proc to the orted, which forwards the message to the orted on the node where the intended recipient proc is located - that orted then forwards the message to its local proc (the recipient). This greatly reduces the connection storm we have encountered during startup.

It also has the benefit of removing the sharing of every proc's OOB contact with every other proc. The orted routing tables are populated during launch since every orted gets a map of where every proc is being placed. Each proc, therefore, only needs to know the contact info for its local daemon, which is passed in via the environment when the proc is fork/exec'd by the daemon. This alone removes ~50 bytes/process of communication that was in the current STG1 startup message - so for our 32k proc job, this saves us roughly 32k*50 = 1.6MBytes sent to 32k procs = 51GBytes of messaging.

Note that you can use the new routing method by specifying -mca routed tree - if you so desire. This mode will become the default at some point in the future.


There are a few minor additional changes in the commit that I'll just note in passing:

* propagation of command line mca params to the orteds - fixes ticket #1073. See note there for details.

* requiring of "finalize" prior to "exit" for MPI procs - fixes ticket #1144. See note there for details.

* cleanup of some stale header files

This commit was SVN r16364.
2007-10-05 19:48:23 +00:00

613 строки
19 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$
*/
#include "orte_config.h"
#include "orte/orte_constants.h"
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif /* HAVE_SYS_TIME_H */
#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
#ifdef HAVE_STRING_H
#include <string.h>
#endif /* HAVE_STRING_H */
#include "opal/class/opal_list.h"
#include "opal/util/trace.h"
#include "opal/util/output.h"
#include "opal/mca/base/mca_base_param.h"
#include "opal/util/opal_environ.h"
#include "opal/threads/condition.h"
#include "orte/mca/errmgr/errmgr.h"
#include "orte/mca/rds/rds.h"
#include "orte/mca/ras/ras.h"
#include "orte/mca/rmaps/rmaps.h"
#include "orte/mca/pls/pls.h"
#include "orte/mca/gpr/gpr.h"
#include "orte/mca/iof/iof.h"
#include "orte/mca/ns/ns.h"
#include "orte/mca/smr/smr.h"
#if OPAL_ENABLE_FT == 1
#include "orte/mca/snapc/snapc.h"
#endif
#include "orte/mca/rmgr/base/rmgr_private.h"
#include "orte/mca/rmgr/base/base.h"
#include "orte/mca/rmgr/urm/rmgr_urm.h"
static int orte_rmgr_urm_setup_job(
orte_app_context_t** app_context,
orte_std_cntr_t num_context,
orte_jobid_t* jobid,
opal_list_t *attrs);
static int orte_rmgr_urm_spawn_job(
orte_app_context_t** app_context,
orte_std_cntr_t num_context,
orte_jobid_t* jobid,
orte_std_cntr_t num_connect,
orte_process_name_t *connect,
orte_rmgr_cb_fn_t cbfn,
orte_proc_state_t cb_conditions,
opal_list_t *attributes);
static int orte_rmgr_urm_module_init(void);
static int orte_rmgr_urm_module_finalize(void);
orte_rmgr_base_module_t orte_rmgr_urm_module = {
orte_rmgr_urm_module_init,
orte_rmgr_urm_setup_job,
orte_rmgr_urm_spawn_job,
orte_rmgr_base_connect,
orte_rmgr_base_disconnect,
orte_rmgr_urm_module_finalize,
/** SUPPORT FUNCTIONS ***/
orte_rmgr_base_find_attribute,
orte_rmgr_base_add_attribute,
orte_rmgr_base_merge_attributes,
orte_rmgr_base_delete_attribute,
orte_rmgr_base_get_app_context,
orte_rmgr_base_put_app_context,
orte_rmgr_base_check_context_cwd,
orte_rmgr_base_check_context_app,
orte_rmgr_base_set_proc_info,
orte_rmgr_base_get_proc_info,
orte_rmgr_base_set_universe_size,
orte_rmgr_base_get_universe_size
};
/*
* Since we were selected, complete the init
* by starting the comm system
*/
static int orte_rmgr_urm_module_init(void)
{
int rc;
if (ORTE_SUCCESS != (rc = orte_rmgr_base_comm_start())) {
ORTE_ERROR_LOG(rc);
}
return rc;
}
/*
* Setup the job
*/
static int orte_rmgr_urm_setup_job(orte_app_context_t** app_context,
orte_std_cntr_t num_context,
orte_jobid_t* jobid,
opal_list_t *attrs)
{
int rc;
orte_std_cntr_t i;
orte_attribute_t *attr;
orte_jobid_t *jptr;
OPAL_TRACE(1);
/* check for given jobid */
if (NULL != (attr = orte_rmgr.find_attribute(attrs, ORTE_RMGR_USE_GIVEN_JOBID))) {
if (ORTE_SUCCESS != (rc = orte_dss.get((void**)&jptr, attr->value, ORTE_JOBID))) {
ORTE_ERROR_LOG(rc);
return rc;
}
*jobid = *jptr;
} else {
/* allocate a jobid */
if (ORTE_SUCCESS != (rc = orte_ns.create_jobid(jobid, attrs))) {
ORTE_ERROR_LOG(rc);
return rc;
}
}
/* for each app_context, we need to purge their environment of HNP
* MCA component selection directives
*/
for (i=0; i < num_context; i++) {
orte_rmgr_base_purge_mca_params(&app_context[i]->env);
}
/* create and initialize job segment */ /* JJH C/N mapping before this */
if (ORTE_SUCCESS !=
(rc = orte_rmgr_base_put_app_context(*jobid, app_context,
num_context))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* set a default job state of INIT. We need this so that
* orterun doesn't report an error from the registry if
* the spawn fails for some reason. Otherwise, orterun
* will try to get the job state (to see why we exited)
* and will find nothing
*/
if (ORTE_SUCCESS != (rc = orte_smr.set_job_state(*jobid, ORTE_JOB_STATE_INIT))) {
ORTE_ERROR_LOG(rc);
return rc;
}
return ORTE_SUCCESS;
}
/* the xconnect functionality in this RMGR component is only utilized
* when a singleton does a dynamic spawn. Hence, the "parent" jobid
* is just my own
*/
static void orte_rmgr_urm_xconnect_callback(orte_gpr_notify_data_t *data, void *cbdata)
{
orte_gpr_value_t **values;
orte_jobid_t child;
int rc;
OPAL_TRACE(1);
/* we made sure in the subscriptions that at least one
* value is always returned
* get the jobid from the segment name in the first value
*/
values = (orte_gpr_value_t**)(data->values)->addr;
if (ORTE_SUCCESS != (rc = orte_schema.extract_jobid_from_segment_name(&child,
values[0]->segment))) {
ORTE_ERROR_LOG(rc);
return;
}
if (ORTE_SUCCESS != (rc = orte_rmgr_base_xconnect(child, ORTE_PROC_MY_NAME->jobid))) {
ORTE_ERROR_LOG(rc);
return;
}
/* signal that the application has completed xconnect */
OPAL_THREAD_LOCK(&mca_rmgr_urm_component.lock);
mca_rmgr_urm_component.xconnect = true;
/* if the launch is also done, then spawn complete */
if (mca_rmgr_urm_component.launched) {
mca_rmgr_urm_component.done = true;
mca_rmgr_urm_component.rc = ORTE_SUCCESS;
opal_condition_signal(&mca_rmgr_urm_component.cond);
}
OPAL_THREAD_UNLOCK(&mca_rmgr_urm_component.lock);
}
static void orte_rmgr_urm_wireup_stdin(orte_jobid_t jobid)
{
int rc;
orte_process_name_t name = {ORTE_JOBID_INVALID, 0};
OPAL_TRACE(1);
name.jobid = jobid;
if (ORTE_SUCCESS != (rc = orte_iof.iof_push(&name, ORTE_NS_CMP_JOBID, ORTE_IOF_STDIN, 0))) {
ORTE_ERROR_LOG(rc);
}
}
static void orte_rmgr_urm_callback(orte_gpr_notify_data_t *data, void *cbdata)
{
orte_rmgr_cb_fn_t cbfunc;
union {
orte_rmgr_cb_fn_t func;
void * ptr;
} cbfunc_union;
orte_gpr_value_t **values, *value;
orte_gpr_keyval_t** keyvals;
orte_jobid_t jobid;
orte_std_cntr_t i, j, k;
int rc;
OPAL_TRACE(1);
/* ISO C forbids conversion of object pointer to function
pointer. So we do this, which is the same thing, but without
the warning from GCC */
cbfunc_union.ptr = cbdata;
cbfunc = cbfunc_union.func;
/* we made sure in the subscriptions that at least one
* value is always returned
* get the jobid from the segment name in the first value
*/
values = (orte_gpr_value_t**)(data->values)->addr;
if (ORTE_SUCCESS != (rc =
orte_schema.extract_jobid_from_segment_name(&jobid,
values[0]->segment))) {
ORTE_ERROR_LOG(rc);
return;
}
for(i = 0, k=0; k < data->cnt &&
i < (data->values)->size; i++) {
if (NULL != values[i]) {
k++;
value = values[i];
/* determine the state change */
keyvals = value->keyvals;
for(j=0; j<value->cnt; j++) {
orte_gpr_keyval_t* keyval = keyvals[j];
if(strcmp(keyval->key, ORTE_PROC_NUM_AT_INIT) == 0) {
(*cbfunc)(jobid,ORTE_PROC_STATE_INIT);
continue;
}
if(strcmp(keyval->key, ORTE_PROC_NUM_LAUNCHED) == 0) {
(*cbfunc)(jobid,ORTE_PROC_STATE_LAUNCHED);
continue;
}
if(strcmp(keyval->key, ORTE_PROC_NUM_RUNNING) == 0) {
(*cbfunc)(jobid,ORTE_PROC_STATE_RUNNING);
continue;
}
if(strcmp(keyval->key, ORTE_PROC_NUM_AT_STG1) == 0) {
(*cbfunc)(jobid,ORTE_PROC_STATE_AT_STG1);
continue;
}
if(strcmp(keyval->key, ORTE_PROC_NUM_TERMINATED) == 0) {
#if OPAL_ENABLE_FT == 1
/* Stop tracking this job */
if(ORTE_SUCCESS != (rc = orte_snapc.release_job(jobid))) {
ORTE_ERROR_LOG(rc);
}
#endif
(*cbfunc)(jobid,ORTE_PROC_STATE_TERMINATED);
continue;
}
}
}
}
}
/**
* define a callback point for completing the wireup of the stdin for io forwarding
*/
static void orte_rmgr_urm_wireup_callback(orte_gpr_notify_data_t *data, void *cbdata)
{
orte_gpr_value_t **values;
orte_jobid_t jobid;
int rc;
OPAL_TRACE(1);
/* we made sure in the subscriptions that at least one
* value is always returned
* get the jobid from the segment name in the first value
*/
values = (orte_gpr_value_t**)(data->values)->addr;
if (ORTE_SUCCESS != (rc = orte_schema.extract_jobid_from_segment_name(&jobid, values[0]->segment))) {
ORTE_ERROR_LOG(rc);
return;
}
opal_output(orte_rmgr_base.rmgr_output, "rmgr_urm:wireup_callback called for job %ld", (long)jobid);
orte_rmgr_urm_wireup_stdin(jobid);
/* signal that we can leave */
OPAL_THREAD_LOCK(&mca_rmgr_urm_component.lock);
mca_rmgr_urm_component.launched = true;
/* if the xconnect is also done, then spawn complete */
if (mca_rmgr_urm_component.xconnect) {
mca_rmgr_urm_component.done = true;
mca_rmgr_urm_component.rc = ORTE_SUCCESS;
opal_condition_signal(&mca_rmgr_urm_component.cond);
}
OPAL_THREAD_UNLOCK(&mca_rmgr_urm_component.lock);
}
/*
* callback that tells us when we can leave the spawn function and return to caller
*/
static void app_terminated(orte_gpr_notify_data_t *data, void *cbdata)
{
/* signal that we can leave */
OPAL_THREAD_LOCK(&mca_rmgr_urm_component.lock);
mca_rmgr_urm_component.done = true;
opal_condition_signal(&mca_rmgr_urm_component.cond);
OPAL_THREAD_UNLOCK(&mca_rmgr_urm_component.lock);
}
/*
* Shortcut for the multiple steps involved in spawning a new job.
*/
static int orte_rmgr_urm_spawn_job(
orte_app_context_t** app_context,
orte_std_cntr_t num_context,
orte_jobid_t* jobid,
orte_std_cntr_t num_connect,
orte_process_name_t *connect,
orte_rmgr_cb_fn_t cbfunc,
orte_proc_state_t cb_conditions,
opal_list_t *attributes)
{
int rc;
orte_process_name_t name = {ORTE_JOBID_INVALID, 0};
struct timeval urmstart, urmstop;
orte_attribute_t *flow, *attr;
uint8_t flags, *fptr;
orte_proc_state_t *gate;
OPAL_TRACE(1);
/* check for timing request - get start time if so */
if (mca_rmgr_urm_component.timing) {
if (0 != gettimeofday(&urmstart, NULL)) {
opal_output(0, "rmgr_urm: could not obtain start time");
urmstart.tv_sec = 0;
urmstart.tv_usec = 0;
}
}
/* mark that the spawn is not done */
OPAL_THREAD_LOCK(&mca_rmgr_urm_component.lock);
mca_rmgr_urm_component.xconnect = false;
mca_rmgr_urm_component.done = false;
mca_rmgr_urm_component.launched = false;
mca_rmgr_urm_component.rc = ORTE_ERR_FAILED_TO_START;
OPAL_THREAD_UNLOCK(&mca_rmgr_urm_component.lock);
/* check for any flow directives to control what we do */
if (NULL != (flow = orte_rmgr.find_attribute(attributes, ORTE_RMGR_SPAWN_FLOW))) {
/* something was specified - get the value */
if (ORTE_SUCCESS != (rc = orte_dss.get((void**)&fptr, flow->value, ORTE_UINT8))) {
ORTE_ERROR_LOG(rc);
return rc;
}
flags = *fptr;
} else {
flags = 0xff;
}
/*
* Initialize job segment and allocate resources
*/ /* JJH Insert C/N mapping stuff here */
/* Only do this step if we have been asked to do it via the
* ORTE_RMGR_SPAWN_FLOW attribute
*/
if (flags & ORTE_RMGR_SETUP) {
if (ORTE_SUCCESS !=
(rc = orte_rmgr_urm_setup_job(app_context, num_context, jobid, attributes))) {
ORTE_ERROR_LOG(rc);
return rc;
}
}
if (flags & ORTE_RMGR_RES_DISC) {
if (ORTE_SUCCESS != (rc = orte_rds.query(*jobid))) {
ORTE_ERROR_LOG(rc);
return rc;
}
}
if (flags & ORTE_RMGR_ALLOC) {
if (ORTE_SUCCESS != (rc = orte_ras.allocate_job(*jobid, attributes))) {
ORTE_ERROR_LOG(rc);
return rc;
}
}
if (flags & ORTE_RMGR_MAP) {
if (ORTE_SUCCESS != (rc = orte_rmaps.map_job(*jobid, attributes))) {
ORTE_ERROR_LOG(rc);
return rc;
}
}
if (flags & ORTE_RMGR_SETUP_TRIGS) {
/*
* setup I/O forwarding
*/
name.jobid = *jobid;
if (ORTE_SUCCESS != (rc = orte_iof.iof_pull(&name, ORTE_NS_CMP_JOBID, ORTE_IOF_STDOUT, 1))) {
ORTE_ERROR_LOG(rc);
return rc;
}
if (ORTE_SUCCESS != (rc = orte_iof.iof_pull(&name, ORTE_NS_CMP_JOBID, ORTE_IOF_STDERR, 2))) {
ORTE_ERROR_LOG(rc);
return rc;
}
#if 0
{
int i = 0;
printf("orte_rmgr_urm_wireup_stdin callback: pid %d\n", getpid());
while (i == 0) sleep(5);
}
#endif
/* setup the launch system's stage gate counters and subscriptions */
if (ORTE_SUCCESS != (rc = orte_rmgr_base_proc_stage_gate_init(*jobid))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* setup the subscription so we can complete the wireup when all processes reach LAUNCHED. This
* function has the dual purpose of setting the conditioned wait variable so that the RMGR
* can know that the app has indeed launched, and hence return to the caller
*/
rc = orte_smr.job_stage_gate_subscribe(*jobid, orte_rmgr_urm_wireup_callback, NULL, ORTE_PROC_STATE_LAUNCHED);
if(ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* see if we need to setup a cross-connect of ORTE information with the new job */
if (NULL != (attr = orte_rmgr.find_attribute(attributes, ORTE_RMGR_XCONNECT_AT_SPAWN))) {
/* cross-connect was requested - get the stage gate name where this is to occur */
if (ORTE_SUCCESS != (rc = orte_dss.get((void**)&gate, attr->value, ORTE_PROC_STATE))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* setup the xconnect subscription on the new job so we can complete the procedure */
if (ORTE_SUCCESS != (rc = orte_smr.job_stage_gate_subscribe(*jobid,
orte_rmgr_urm_xconnect_callback, NULL, *gate))) {
ORTE_ERROR_LOG(rc);
return rc;
}
} else {
/* indicate that we don't need to wait for xconnect */
OPAL_THREAD_LOCK(&mca_rmgr_urm_component.lock);
mca_rmgr_urm_component.xconnect = true;
OPAL_THREAD_UNLOCK(&mca_rmgr_urm_component.lock);
}
/* setup the subscription so we will know if things fail to launch */
rc = orte_smr.job_stage_gate_subscribe(*jobid, app_terminated, NULL, ORTE_PROC_STATE_TERMINATED);
if(ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc);
return rc;
}
/*
* Define the ERRMGR's callbacks as required
*/
if (ORTE_SUCCESS != (rc = orte_errmgr.register_job(*jobid))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/*
* setup caller's callback
*/
if(NULL != cbfunc) {
union {
orte_rmgr_cb_fn_t func;
void * ptr;
} cbfunc_union;
void *cbdata;
/* ISO C forbids conversion of object pointer to function
pointer. So we do this, which is the same thing, but without
the warning from GCC */
cbfunc_union.func = cbfunc;
cbdata = cbfunc_union.ptr;
rc = orte_smr.job_stage_gate_subscribe(*jobid, orte_rmgr_urm_callback, cbdata, cb_conditions);
if(ORTE_SUCCESS != rc) {
ORTE_ERROR_LOG(rc);
return rc;
}
}
/* check for timing request - get stop time and report elapsed time if so */
if (mca_rmgr_urm_component.timing) {
if (0 != gettimeofday(&urmstop, NULL)) {
opal_output(0, "rmgr_urm: could not obtain stop time");
} else {
opal_output(0, "rmgr_urm: job setup time is %ld usec",
(long int)((urmstop.tv_sec - urmstart.tv_sec)*1000000 +
(urmstop.tv_usec - urmstart.tv_usec)));
}
}
}
/* if we don't want to launch, then just return here */
if (!(flags & ORTE_RMGR_LAUNCH)) {
return ORTE_SUCCESS;
}
#if OPAL_ENABLE_FT == 1
/*
* Wire up the SnapC component to this job
*/
if(ORTE_SUCCESS != (rc = orte_snapc.setup_job(*jobid))) {
ORTE_ERROR_LOG(rc);
return rc;
}
#endif
/*
* launch the job
*/
if (ORTE_SUCCESS != (rc = orte_pls.launch_job(*jobid))) {
ORTE_ERROR_LOG(rc);
return rc;
}
/* wait for the application to launch */
OPAL_THREAD_LOCK(&mca_rmgr_urm_component.lock);
while (!mca_rmgr_urm_component.done) {
opal_condition_wait(&mca_rmgr_urm_component.cond,
&mca_rmgr_urm_component.lock);
}
OPAL_THREAD_UNLOCK(&mca_rmgr_urm_component.lock);
/* check for timing request - get start time if so */
if (mca_rmgr_urm_component.timing) {
if (0 != gettimeofday(&urmstart, NULL)) {
opal_output(0, "rmgr_urm: could not obtain launch stop time");
} else {
opal_output(0, "rmgr_urm: launch time is %ld usec",
(long int)((urmstart.tv_sec - urmstop.tv_sec)*1000000 +
(urmstart.tv_usec - urmstop.tv_usec)));
}
}
/* return the status code contained in the component */
return mca_rmgr_urm_component.rc;
}
static int orte_rmgr_urm_module_finalize(void)
{
int rc;
/* Cancel pending receive. */
if (ORTE_SUCCESS != (rc = orte_rmgr_base_comm_stop())) {
ORTE_ERROR_LOG(rc);
}
return rc;
}