2007-03-17 02:11:45 +03:00
|
|
|
/*
|
|
|
|
* 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"
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
#include "orte/util/name_fns.h"
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
#include "orte/util/show_help.h"
|
2007-03-17 02:11:45 +03:00
|
|
|
#include "opal/mca/base/base.h"
|
|
|
|
#include "opal/mca/base/mca_base_param.h"
|
|
|
|
|
|
|
|
#include "orte/mca/rml/base/base.h"
|
|
|
|
#include "orte/mca/rml/rml.h"
|
|
|
|
|
|
|
|
#include "rml_ftrm.h"
|
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
orte_rml_component_t mca_rml_ftrm_wrapped_component;
|
|
|
|
orte_rml_module_t orte_rml_ftrm_wrapped_module;
|
2007-03-17 02:11:45 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Init (Module)
|
|
|
|
*/
|
|
|
|
|
2007-07-20 05:34:02 +04:00
|
|
|
int orte_rml_ftrm_module_enable_comm(void)
|
2007-03-17 02:11:45 +03:00
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-24 00:13:37 +04:00
|
|
|
"orte_rml_ftrm: module_init(): Normal...");
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.enable_comm ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.enable_comm() ) ) {
|
|
|
|
return ret;
|
2007-03-17 02:11:45 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Finalize (Module)
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_module_finalize(void)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-03-17 02:11:45 +03:00
|
|
|
"orte_rml_ftrm: module_finalize()");
|
|
|
|
|
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.finalize ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.finalize() ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-07-20 05:34:02 +04:00
|
|
|
int orte_rml_ftrm_get_new_name(orte_process_name_t *name)
|
2007-03-17 02:11:45 +03:00
|
|
|
{
|
2007-07-20 05:34:02 +04:00
|
|
|
int ret;
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-20 05:34:02 +04:00
|
|
|
"orte_rml_ftrm: get_new_name()");
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.get_new_name ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.get_new_name(name) ) ) {
|
2007-07-20 05:34:02 +04:00
|
|
|
return ret;
|
|
|
|
}
|
2007-03-17 02:11:45 +03:00
|
|
|
}
|
|
|
|
|
2007-07-20 05:34:02 +04:00
|
|
|
return ORTE_SUCCESS;
|
2007-03-17 02:11:45 +03:00
|
|
|
}
|
|
|
|
|
2007-07-20 05:34:02 +04:00
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
/*
|
2007-07-20 05:34:02 +04:00
|
|
|
* Get URI
|
2007-03-17 02:11:45 +03:00
|
|
|
*/
|
2007-07-20 05:34:02 +04:00
|
|
|
char * orte_rml_ftrm_get_contact_info(void)
|
2007-03-17 02:11:45 +03:00
|
|
|
{
|
2007-07-20 05:34:02 +04:00
|
|
|
char * rtn_val = NULL;
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-20 05:34:02 +04:00
|
|
|
"orte_rml_ftrm: get_uri()");
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-20 05:34:02 +04:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.get_contact_info ) {
|
|
|
|
rtn_val = orte_rml_ftrm_wrapped_module.get_contact_info();
|
2007-03-17 02:11:45 +03:00
|
|
|
}
|
|
|
|
|
2007-07-20 05:34:02 +04:00
|
|
|
return rtn_val;
|
2007-03-17 02:11:45 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2007-07-20 05:34:02 +04:00
|
|
|
* Set CONTACT_INFO
|
2007-03-17 02:11:45 +03:00
|
|
|
*/
|
2007-07-20 05:34:02 +04:00
|
|
|
int orte_rml_ftrm_set_contact_info(const char* contact_info)
|
2007-03-17 02:11:45 +03:00
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-20 05:34:02 +04:00
|
|
|
"orte_rml_ftrm: set_contact_info()");
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.set_contact_info ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.set_contact_info(contact_info) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Ping
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_ping(const char* uri, const struct timeval* tv)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-03-17 02:11:45 +03:00
|
|
|
"orte_rml_ftrm: ping()");
|
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.ping ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.ping(uri, tv) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Send
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_send(orte_process_name_t* peer,
|
|
|
|
struct iovec *msg,
|
|
|
|
int count,
|
|
|
|
int tag,
|
|
|
|
int flags)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-24 00:13:37 +04:00
|
|
|
"orte_rml_ftrm: send(%s, %d, %d, %d )",
|
|
|
|
ORTE_NAME_PRINT(peer), count, tag, flags);
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.send ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.send(peer, msg, count, tag, flags) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Send Non-blocking
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_send_nb(orte_process_name_t* peer,
|
|
|
|
struct iovec* msg,
|
|
|
|
int count,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags,
|
|
|
|
orte_rml_callback_fn_t cbfunc,
|
|
|
|
void* cbdata)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-24 00:13:37 +04:00
|
|
|
"orte_rml_ftrm: send_nb(%s, %d, %d, %d )",
|
|
|
|
ORTE_NAME_PRINT(peer), count, tag, flags);
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.send_nb ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.send_nb(peer, msg, count, tag, flags, cbfunc, cbdata) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Send Buffer
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_send_buffer(orte_process_name_t* peer,
|
2008-02-28 04:57:57 +03:00
|
|
|
opal_buffer_t* buffer,
|
2007-03-17 02:11:45 +03:00
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-24 00:13:37 +04:00
|
|
|
"orte_rml_ftrm: send_buffer(%s, %d, %d )",
|
|
|
|
ORTE_NAME_PRINT(peer), tag, flags);
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.send_buffer ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.send_buffer(peer, buffer, tag, flags) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Send Buffer Non-blocking
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_send_buffer_nb(orte_process_name_t* peer,
|
2008-02-28 04:57:57 +03:00
|
|
|
opal_buffer_t* buffer,
|
2007-03-17 02:11:45 +03:00
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags,
|
|
|
|
orte_rml_buffer_callback_fn_t cbfunc,
|
|
|
|
void* cbdata)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-24 00:13:37 +04:00
|
|
|
"orte_rml_ftrm: send_buffer_nb(%s, %d, %d )",
|
|
|
|
ORTE_NAME_PRINT(peer), tag, flags);
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.send_buffer_nb ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.send_buffer_nb(peer, buffer, tag, flags, cbfunc, cbdata) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Recv
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_recv(orte_process_name_t* peer,
|
|
|
|
struct iovec *msg,
|
|
|
|
int count,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-24 00:13:37 +04:00
|
|
|
"orte_rml_ftrm: recv(%s, %d, %d, %d )",
|
|
|
|
ORTE_NAME_PRINT(peer), count, tag, flags);
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.recv ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.recv(peer, msg, count, tag, flags) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Recv Non-blocking
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_recv_nb(orte_process_name_t* peer,
|
|
|
|
struct iovec* msg,
|
|
|
|
int count,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags,
|
|
|
|
orte_rml_callback_fn_t cbfunc,
|
|
|
|
void* cbdata)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-24 00:13:37 +04:00
|
|
|
"orte_rml_ftrm: recv_nb(%s, %d, %d, %d )",
|
|
|
|
ORTE_NAME_PRINT(peer), count, tag, flags);
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.recv_nb ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.recv_nb(peer, msg, count, tag, flags, cbfunc, cbdata) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Recv Buffer
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_recv_buffer(orte_process_name_t* peer,
|
2008-02-28 04:57:57 +03:00
|
|
|
opal_buffer_t *buf,
|
2007-07-20 05:34:02 +04:00
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags)
|
2007-03-17 02:11:45 +03:00
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-24 00:13:37 +04:00
|
|
|
"orte_rml_ftrm: recv_buffer(%s, %d )",
|
|
|
|
ORTE_NAME_PRINT(peer), tag);
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.recv_buffer ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.recv_buffer(peer, buf, tag, flags) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Recv Buffer Non-blocking
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_recv_buffer_nb(orte_process_name_t* peer,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags,
|
|
|
|
orte_rml_buffer_callback_fn_t cbfunc,
|
|
|
|
void* cbdata)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-07-24 00:13:37 +04:00
|
|
|
"orte_rml_ftrm: recv_buffer_nb(%s, %d, %d)",
|
|
|
|
ORTE_NAME_PRINT(peer), tag, flags);
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.recv_buffer_nb ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.recv_buffer_nb(peer, tag, flags, cbfunc, cbdata) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Recv Cancel
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_recv_cancel(orte_process_name_t* peer, orte_rml_tag_t tag)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-03-17 02:11:45 +03:00
|
|
|
"orte_rml_ftrm: recv_cancel()");
|
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.recv_cancel ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.recv_cancel(peer, tag) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-05-25 01:12:34 +04:00
|
|
|
/*
|
|
|
|
* Register a callback on loss of connection
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_add_exception_handler(orte_rml_exception_callback_t cbfunc)
|
Commit the orted-failed-to-start code. This correctly causes the system to detect the failure of an orted to start and allows the system to terminate all procs/orteds that *did* start.
The primary change that underlies all this is in the OOB. Specifically, the problem in the code until now has been that the OOB attempts to resolve an address when we call the "send" to an unknown recipient. The OOB would then wait forever if that recipient never actually started (and hence, never reported back its OOB contact info). In the case of an orted that failed to start, we would correctly detect that the orted hadn't started, but then we would attempt to order all orteds (including the one that failed to start) to die. This would cause the OOB to "hang" the system.
Unfortunately, revising how the OOB resolves addresses introduced a number of additional problems. Specifically, and most troublesome, was the fact that comm_spawn involved the immediate transmission of the rendezvous point from parent-to-child after the child was spawned. The current code used the OOB address resolution as a "barrier" - basically, the parent would attempt to send the info to the child, and then "hold" there until the child's contact info had arrived (meaning the child had started) and the send could be completed.
Note that this also caused comm_spawn to "hang" the entire system if the child never started... The app-failed-to-start helped improve that behavior - this code provides additional relief.
With this change, the OOB will return an ADDRESSEE_UNKNOWN error if you attempt to send to a recipient whose contact info isn't already in the OOB's hash tables. To resolve comm_spawn issues, we also now force the cross-sharing of connection info between parent and child jobs during spawn.
Finally, to aid in setting triggers to the right values, we introduce the "arith" API for the GPR. This function allows you to atomically change the value in a registry location (either divide, multiply, add, or subtract) by the provided operand. It is equivalent to first fetching the value using a "get", then modifying it, and then putting the result back into the registry via a "put".
This commit was SVN r14711.
2007-05-21 22:31:28 +04:00
|
|
|
{
|
|
|
|
int ret;
|
2007-05-25 01:12:34 +04:00
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-05-25 01:12:34 +04:00
|
|
|
"orte_rml_ftrm: add_exception_handler()");
|
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.add_exception_handler ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.add_exception_handler(cbfunc) ) ) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
2007-05-25 01:12:34 +04:00
|
|
|
|
Commit the orted-failed-to-start code. This correctly causes the system to detect the failure of an orted to start and allows the system to terminate all procs/orteds that *did* start.
The primary change that underlies all this is in the OOB. Specifically, the problem in the code until now has been that the OOB attempts to resolve an address when we call the "send" to an unknown recipient. The OOB would then wait forever if that recipient never actually started (and hence, never reported back its OOB contact info). In the case of an orted that failed to start, we would correctly detect that the orted hadn't started, but then we would attempt to order all orteds (including the one that failed to start) to die. This would cause the OOB to "hang" the system.
Unfortunately, revising how the OOB resolves addresses introduced a number of additional problems. Specifically, and most troublesome, was the fact that comm_spawn involved the immediate transmission of the rendezvous point from parent-to-child after the child was spawned. The current code used the OOB address resolution as a "barrier" - basically, the parent would attempt to send the info to the child, and then "hold" there until the child's contact info had arrived (meaning the child had started) and the send could be completed.
Note that this also caused comm_spawn to "hang" the entire system if the child never started... The app-failed-to-start helped improve that behavior - this code provides additional relief.
With this change, the OOB will return an ADDRESSEE_UNKNOWN error if you attempt to send to a recipient whose contact info isn't already in the OOB's hash tables. To resolve comm_spawn issues, we also now force the cross-sharing of connection info between parent and child jobs during spawn.
Finally, to aid in setting triggers to the right values, we introduce the "arith" API for the GPR. This function allows you to atomically change the value in a registry location (either divide, multiply, add, or subtract) by the provided operand. It is equivalent to first fetching the value using a "get", then modifying it, and then putting the result back into the registry via a "put".
This commit was SVN r14711.
2007-05-21 22:31:28 +04:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
2007-03-17 02:11:45 +03:00
|
|
|
|
2007-05-25 01:12:34 +04:00
|
|
|
int orte_rml_ftrm_del_exception_handler(orte_rml_exception_callback_t cbfunc)
|
Commit the orted-failed-to-start code. This correctly causes the system to detect the failure of an orted to start and allows the system to terminate all procs/orteds that *did* start.
The primary change that underlies all this is in the OOB. Specifically, the problem in the code until now has been that the OOB attempts to resolve an address when we call the "send" to an unknown recipient. The OOB would then wait forever if that recipient never actually started (and hence, never reported back its OOB contact info). In the case of an orted that failed to start, we would correctly detect that the orted hadn't started, but then we would attempt to order all orteds (including the one that failed to start) to die. This would cause the OOB to "hang" the system.
Unfortunately, revising how the OOB resolves addresses introduced a number of additional problems. Specifically, and most troublesome, was the fact that comm_spawn involved the immediate transmission of the rendezvous point from parent-to-child after the child was spawned. The current code used the OOB address resolution as a "barrier" - basically, the parent would attempt to send the info to the child, and then "hold" there until the child's contact info had arrived (meaning the child had started) and the send could be completed.
Note that this also caused comm_spawn to "hang" the entire system if the child never started... The app-failed-to-start helped improve that behavior - this code provides additional relief.
With this change, the OOB will return an ADDRESSEE_UNKNOWN error if you attempt to send to a recipient whose contact info isn't already in the OOB's hash tables. To resolve comm_spawn issues, we also now force the cross-sharing of connection info between parent and child jobs during spawn.
Finally, to aid in setting triggers to the right values, we introduce the "arith" API for the GPR. This function allows you to atomically change the value in a registry location (either divide, multiply, add, or subtract) by the provided operand. It is equivalent to first fetching the value using a "get", then modifying it, and then putting the result back into the registry via a "put".
This commit was SVN r14711.
2007-05-21 22:31:28 +04:00
|
|
|
{
|
|
|
|
int ret;
|
2007-05-25 01:12:34 +04:00
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-05-25 01:12:34 +04:00
|
|
|
"orte_rml_ftrm: del_exception_handler()");
|
|
|
|
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.del_exception_handler ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.del_exception_handler(cbfunc) ) ) {
|
Commit the orted-failed-to-start code. This correctly causes the system to detect the failure of an orted to start and allows the system to terminate all procs/orteds that *did* start.
The primary change that underlies all this is in the OOB. Specifically, the problem in the code until now has been that the OOB attempts to resolve an address when we call the "send" to an unknown recipient. The OOB would then wait forever if that recipient never actually started (and hence, never reported back its OOB contact info). In the case of an orted that failed to start, we would correctly detect that the orted hadn't started, but then we would attempt to order all orteds (including the one that failed to start) to die. This would cause the OOB to "hang" the system.
Unfortunately, revising how the OOB resolves addresses introduced a number of additional problems. Specifically, and most troublesome, was the fact that comm_spawn involved the immediate transmission of the rendezvous point from parent-to-child after the child was spawned. The current code used the OOB address resolution as a "barrier" - basically, the parent would attempt to send the info to the child, and then "hold" there until the child's contact info had arrived (meaning the child had started) and the send could be completed.
Note that this also caused comm_spawn to "hang" the entire system if the child never started... The app-failed-to-start helped improve that behavior - this code provides additional relief.
With this change, the OOB will return an ADDRESSEE_UNKNOWN error if you attempt to send to a recipient whose contact info isn't already in the OOB's hash tables. To resolve comm_spawn issues, we also now force the cross-sharing of connection info between parent and child jobs during spawn.
Finally, to aid in setting triggers to the right values, we introduce the "arith" API for the GPR. This function allows you to atomically change the value in a registry location (either divide, multiply, add, or subtract) by the provided operand. It is equivalent to first fetching the value using a "get", then modifying it, and then putting the result back into the registry via a "put".
This commit was SVN r14711.
2007-05-21 22:31:28 +04:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
2007-05-25 01:12:34 +04:00
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* FT Event
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_ft_event(int state)
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
|
2008-06-09 18:53:58 +04:00
|
|
|
opal_output_verbose(20, rml_ftrm_output_handle,
|
2007-03-17 02:11:45 +03:00
|
|
|
"orte_rml_ftrm: ft_event()");
|
|
|
|
|
2007-04-25 23:51:52 +04:00
|
|
|
if(OPAL_CRS_CHECKPOINT == state) {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
else if(OPAL_CRS_CONTINUE == state) {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
else if(OPAL_CRS_RESTART == state) {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
else if(OPAL_CRS_TERM == state ) {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The wrapped component is responsible for calling the OOB modules
|
|
|
|
*/
|
2007-07-24 00:13:37 +04:00
|
|
|
if( NULL != orte_rml_ftrm_wrapped_module.ft_event ) {
|
|
|
|
if( ORTE_SUCCESS != (ret = orte_rml_ftrm_wrapped_module.ft_event(state))) {
|
2007-03-17 02:11:45 +03:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-04-25 23:51:52 +04:00
|
|
|
if(OPAL_CRS_CHECKPOINT == state) {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
else if(OPAL_CRS_CONTINUE == state) {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
else if(OPAL_CRS_RESTART == state) {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
else if(OPAL_CRS_TERM == state ) {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
return ORTE_SUCCESS;
|
|
|
|
}
|
|
|
|
|