2007-03-16 23:11:45 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2006 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$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* ORTE RML Fault Tolerance Wrapper - Ready Message Protocol (FTRM)
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
*/
|
|
|
|
#ifndef MCA_RML_FTRM_H
|
|
|
|
#define MCA_RML_FTRM_H
|
|
|
|
|
|
|
|
#include "orte/mca/rml/rml.h"
|
|
|
|
#include "orte/mca/rml/rml_types.h"
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern int rml_ftrm_output_handle;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Component Information
|
|
|
|
*/
|
|
|
|
ORTE_MODULE_DECLSPEC extern orte_rml_component_t mca_rml_ftrm_component;
|
|
|
|
ORTE_MODULE_DECLSPEC extern orte_rml_module_t orte_rml_ftrm_module;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Init (Component)
|
|
|
|
*/
|
|
|
|
orte_rml_module_t* orte_rml_ftrm_component_init(int *priority);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Init (Module)
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_module_init(void);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Finalize (Module)
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_module_finalize(void);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Get URI
|
|
|
|
*/
|
|
|
|
char * orte_rml_ftrm_get_uri(void);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Set URI
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_set_uri(const char* uri);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Parse URis
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_parse_uris(const char* uri,
|
|
|
|
orte_process_name_t* peer, char*** uris);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Ping
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_ping(const char* uri, const struct timeval* tv);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Send
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_send(orte_process_name_t* peer,
|
|
|
|
struct iovec *msg,
|
|
|
|
int count,
|
|
|
|
int tag,
|
|
|
|
int flags);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 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);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Send Buffer
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_send_buffer(orte_process_name_t* peer,
|
|
|
|
orte_buffer_t* buffer,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Send Buffer Non-blocking
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_send_buffer_nb(orte_process_name_t* peer,
|
|
|
|
orte_buffer_t* buffer,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags,
|
|
|
|
orte_rml_buffer_callback_fn_t cbfunc,
|
|
|
|
void* cbdata);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Recv
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_recv(orte_process_name_t* peer,
|
|
|
|
struct iovec *msg,
|
|
|
|
int count,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 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);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Recv Buffer
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_recv_buffer(orte_process_name_t* peer,
|
|
|
|
orte_buffer_t *buf,
|
|
|
|
orte_rml_tag_t tag);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 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);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Recv Cancel
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_recv_cancel(orte_process_name_t* peer, orte_rml_tag_t tag);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Xcast
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_xcast(orte_jobid_t job,
|
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 18:31:28 +00:00
|
|
|
orte_buffer_t *buffer,
|
|
|
|
orte_rml_tag_t tag);
|
|
|
|
|
|
|
|
int orte_rml_ftrm_xcast_nb(orte_jobid_t job,
|
|
|
|
orte_buffer_t *buffer,
|
|
|
|
orte_rml_tag_t tag);
|
|
|
|
|
|
|
|
int orte_rml_ftrm_xcast_gate(orte_gpr_trigger_cb_fn_t cbfunc);
|
2007-03-16 23:11:45 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Register a callback on loss of connection
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_add_exception_handler(orte_rml_exception_callback_t cbfunc);
|
|
|
|
int orte_rml_ftrm_del_exception_handler(orte_rml_exception_callback_t cbfunc);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* FT Event
|
|
|
|
*/
|
|
|
|
int orte_rml_ftrm_ft_event(int state);
|
|
|
|
|
2007-05-24 21:12:34 +00:00
|
|
|
int orte_rml_ftrm_register_contact_info(void);
|
|
|
|
|
|
|
|
int orte_rml_ftrm_register_subscription(orte_jobid_t job, char *trigger);
|
|
|
|
|
|
|
|
int orte_rml_ftrm_get_contact_info(orte_process_name_t *name, orte_gpr_notify_data_t **data);
|
|
|
|
|
|
|
|
void orte_rml_ftrm_update_contact_info(orte_gpr_notify_data_t* data, void* cbdata);
|
|
|
|
|
2007-03-16 23:11:45 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|