2005-03-14 23:57:21 +03:00
|
|
|
/*
|
2008-02-28 04:57:57 +03:00
|
|
|
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* 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.
|
2005-03-14 23:57:21 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2007-07-25 20:19:29 +04:00
|
|
|
* Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2005-03-14 23:57:21 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2007-07-25 20:19:29 +04:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* RML Framework maintenence interface
|
|
|
|
*
|
|
|
|
* Interface for starting / stopping / controlling the RML framework,
|
|
|
|
* as well as support for modifying RML datatypes.
|
|
|
|
*
|
|
|
|
* @note The only RML datatype exposed to the user is the RML tag.
|
|
|
|
* This will always be an integral value, so the only datatype support
|
|
|
|
* really required is the internal DSS functions for packing /
|
|
|
|
* unpacking / comparing tags. The user should never need to deal
|
|
|
|
* with these.
|
|
|
|
*/
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
#ifndef MCA_RML_BASE_H
|
|
|
|
#define MCA_RML_BASE_H
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte_config.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
#include "orte/mca/rml/rml.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
#include "opal/dss/dss_types.h"
|
2007-07-20 05:34:02 +04:00
|
|
|
|
|
|
|
BEGIN_C_DECLS
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
|
2007-07-25 20:19:29 +04:00
|
|
|
/* ******************************************************************** */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Open the RML framework
|
|
|
|
*
|
|
|
|
* Open the RML framework. Loads all available RML components and
|
|
|
|
* runs their open functions.
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS Components successfully loaded
|
|
|
|
* @retval ORTE_ERROR An unknown error occurred
|
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC int orte_rml_base_open(void);
|
2007-07-25 20:19:29 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Select an active RML component
|
|
|
|
*
|
|
|
|
* Select an RML component from the list of frameworks that were
|
|
|
|
* opened during orte_rml_base_open(). The orte_rml_base_select()
|
|
|
|
* function will fill in the orte_rml structure so that all functions
|
|
|
|
* in the interface exist. Note that there are still calling
|
|
|
|
* restrictions at that point (see the documentation for
|
|
|
|
* orte_rml_component_init_fn_t).
|
|
|
|
*
|
|
|
|
* All components that are not selected will be closed during this
|
|
|
|
* call.
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS Components successfully selected
|
|
|
|
* @retval ORTE_ERROR An unknown error occurred
|
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC int orte_rml_base_select(void);
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2007-07-20 05:34:02 +04:00
|
|
|
|
2007-07-25 20:19:29 +04:00
|
|
|
/**
|
|
|
|
* Close the RML framework
|
|
|
|
*
|
|
|
|
* Close the RML framework, releasing all resources associated with
|
|
|
|
* the framework interface. Also closes the active component used
|
|
|
|
* during the application.
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS Framework successfully shut down
|
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
|
|
|
*/
|
2007-07-25 20:19:29 +04:00
|
|
|
ORTE_DECLSPEC int orte_rml_base_close(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Post receive to get updates regarding contact information
|
|
|
|
*
|
|
|
|
* Post a non-blocking receive (likely during orte_init()) to receive
|
|
|
|
* updated contact information from the HNP when it becomes available.
|
|
|
|
* This should be called in any process that needs such updates, and
|
|
|
|
* the receive will continue to get update callbacks until
|
|
|
|
* orte_rml_base_comm_stop() is called.
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS Receive successfully started
|
|
|
|
* @retval ORTE_ERROR An unknown error occurred
|
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
|
|
|
*/
|
2008-02-28 04:57:57 +03:00
|
|
|
ORTE_DECLSPEC int orte_rml_base_comm_start(void);
|
2007-07-25 20:19:29 +04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Stop receiving contact information updates
|
|
|
|
*
|
|
|
|
* Shut down the receive posted during orte_rml_base_comm_start(),
|
|
|
|
* likely during orte_finalize().
|
|
|
|
*
|
|
|
|
* @retval ORTE_SUCCESS Receive succesffully cancelled.
|
|
|
|
*/
|
2008-02-28 04:57:57 +03:00
|
|
|
ORTE_DECLSPEC int orte_rml_base_comm_stop(void);
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2007-07-25 20:19:29 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Output stream for RML debugging
|
|
|
|
*
|
2008-06-09 18:53:58 +04:00
|
|
|
* Output stream for the opal_output() code intended for RML output.
|
2007-07-25 20:19:29 +04:00
|
|
|
* It will be have its verbosity set according to the MCA parameter
|
|
|
|
* rml_base_verbose. Useable between call to orte_rml_base_open() and
|
|
|
|
* orte_rml_base_close().
|
|
|
|
*/
|
2007-07-20 05:34:02 +04:00
|
|
|
ORTE_DECLSPEC extern int orte_rml_base_output;
|
2007-07-25 20:19:29 +04:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* List of components that are available to the RML
|
|
|
|
*
|
|
|
|
* List of components that are currently available to the RML
|
|
|
|
* framework. Useable between calls to orte_rml_base_open() and
|
|
|
|
* orte_rml_base_close().
|
|
|
|
*
|
|
|
|
* @note This list should not be used by code outside the RML base.
|
|
|
|
*/
|
2007-07-20 05:34:02 +04:00
|
|
|
ORTE_DECLSPEC extern opal_list_t orte_rml_base_components;
|
|
|
|
|
2007-07-25 20:19:29 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Component structure for the selected RML component
|
|
|
|
*
|
|
|
|
* Component structure pointer for the currently selected RML
|
|
|
|
* component. Useable between calls to orte_rml_base_select() and
|
|
|
|
* orte_rml_base_close().
|
|
|
|
*
|
|
|
|
* @note This pointer should not be used outside the RML base. It is
|
|
|
|
* available outside the RML base only for the F/T component.
|
|
|
|
*/
|
2007-07-20 05:34:02 +04:00
|
|
|
ORTE_DECLSPEC extern orte_rml_component_t *orte_rml_component;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2007-07-25 20:19:29 +04:00
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
/*
|
|
|
|
* This is the base priority for a RML wrapper component
|
|
|
|
* If there exists more than one wrapper, then the one with
|
|
|
|
* the lowest priority wins.
|
|
|
|
*/
|
|
|
|
#define RML_SELECT_WRAPPER_PRIORITY -128
|
|
|
|
|
2008-06-18 07:15:56 +04:00
|
|
|
/* null functions */
|
2008-06-18 12:20:02 +04:00
|
|
|
int orte_rml_base_null_send(struct orte_process_name_t* peer,
|
2008-06-18 07:15:56 +04:00
|
|
|
struct iovec *msg,
|
|
|
|
int count,
|
|
|
|
int tag,
|
|
|
|
int flags);
|
2008-06-18 12:20:02 +04:00
|
|
|
int orte_rml_base_null_send_nb(struct 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 orte_rml_base_null_send_buffer(struct orte_process_name_t* peer,
|
|
|
|
struct opal_buffer_t* buffer,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags);
|
|
|
|
int orte_rml_base_null_send_buffer_nb(struct orte_process_name_t* peer,
|
|
|
|
struct opal_buffer_t* buffer,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags,
|
|
|
|
orte_rml_buffer_callback_fn_t cbfunc,
|
|
|
|
void* cbdata);
|
|
|
|
int orte_rml_base_null_recv(struct orte_process_name_t* peer,
|
|
|
|
struct iovec *msg,
|
|
|
|
int count,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags);
|
|
|
|
int orte_rml_base_null_recv_nb(struct 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 orte_rml_base_null_recv_buffer(struct orte_process_name_t* peer,
|
|
|
|
struct opal_buffer_t *buf,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags);
|
|
|
|
int orte_rml_base_null_recv_buffer_nb(struct orte_process_name_t* peer,
|
|
|
|
orte_rml_tag_t tag,
|
|
|
|
int flags,
|
|
|
|
orte_rml_buffer_callback_fn_t cbfunc,
|
|
|
|
void* cbdata);
|
|
|
|
int orte_rml_base_null_recv_cancel(orte_process_name_t* peer,
|
|
|
|
orte_rml_tag_t tag);
|
2007-07-25 20:19:29 +04:00
|
|
|
|
2007-07-20 05:34:02 +04:00
|
|
|
END_C_DECLS
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
#endif /* MCA_RML_BASE_H */
|