2004-07-01 18:49:54 +04:00
|
|
|
/*
|
2007-03-17 02:11:45 +03:00
|
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
2005-11-05 22:57:48 +03:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2006-08-23 07:32:36 +04:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-11-05 22:57:48 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2004-11-28 23:09:25 +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.
|
2004-11-22 04:38:40 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-10 08:13:00 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
2004-07-01 18:49:54 +04:00
|
|
|
/** @file:
|
2004-01-10 11:09:54 +03:00
|
|
|
*
|
2004-08-05 03:42:51 +04:00
|
|
|
* Contains the internal functions and typedefs for the use of the oob
|
2004-07-01 18:49:54 +04:00
|
|
|
*/
|
|
|
|
|
2004-08-05 03:42:51 +04:00
|
|
|
#ifndef MCA_OOB_H_
|
|
|
|
#define MCA_OOB_H_
|
2004-01-10 08:13:00 +03:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte_config.h"
|
2004-01-10 11:09:54 +03:00
|
|
|
|
2005-12-01 21:28:20 +03:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/types.h"
|
|
|
|
#include "opal/mca/mca.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte/mca/ns/ns_types.h"
|
|
|
|
#include "orte/mca/gpr/gpr_types.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte/mca/oob/oob_types.h"
|
|
|
|
#include "orte/mca/oob/base/base.h"
|
2004-08-11 01:02:36 +04:00
|
|
|
|
2007-03-17 02:11:45 +03:00
|
|
|
#include "opal/mca/crs/crs.h"
|
|
|
|
#include "opal/mca/crs/base/base.h"
|
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2004-08-11 01:02:36 +04:00
|
|
|
struct mca_oob_1_0_0_t;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Convenience Typedef
|
|
|
|
*/
|
|
|
|
typedef struct mca_oob_1_0_0_t mca_oob_1_0_0_t;
|
|
|
|
/**
|
|
|
|
* Convenience typedef
|
|
|
|
*/
|
|
|
|
typedef struct mca_oob_1_0_0_t mca_oob_t;
|
|
|
|
|
|
|
|
|
2004-08-05 03:42:51 +04:00
|
|
|
/********
|
|
|
|
* NOTE: these are functions and prototypes for the use of the modules
|
|
|
|
* and components.
|
|
|
|
* THESE ARE NOT USER INTERFACE FUNCTIONS.
|
|
|
|
* the user interface is in mca/oob/base/base.h
|
2004-07-01 18:49:54 +04:00
|
|
|
*/
|
|
|
|
|
2004-01-10 08:13:00 +03:00
|
|
|
/*
|
2004-07-01 18:49:54 +04:00
|
|
|
* OOB Component/Module function prototypes.
|
2004-01-10 08:13:00 +03:00
|
|
|
*/
|
|
|
|
|
2004-08-16 23:39:54 +04:00
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_base_module_get_addr().
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef char* (*mca_oob_base_module_get_addr_fn_t)(void);
|
|
|
|
|
|
|
|
/**
|
Not as bad as this all may look. Tim and I made a significant change to the way we handle the startup of the oob, the seed, etc. We have made it backwards-compatible so that mpirun2 and singleton operations remain working. We had to adjust the name server and gpr as well, plus the process_info structure.
This also includes a checkpoint update to openmpi.c and ompid.c. I have re-enabled the ompid compile.
This latter raises an important point. The trunk compiles the programs like ompid just fine under Linux. It also does just fine for OSX under the dynamic libraries. However, we are seeing errors when compiling under OSX for the static case - the linker seems to have trouble resolving some variable names, even though linker diagnostics show the variables as being defined. Thus, a warning to Mac users that you may have to locally turn things off if you are trying to do static compiles. We ask, however, that you don't commit those changes that turn things off for everyone else - instead, let's try to figure out why the static compile is having a problem, and let everyone else continue to work.
Thanks
Ralph
This commit was SVN r2534.
2004-09-08 07:59:06 +04:00
|
|
|
* Implementation of mca_oob_base_module_set_addr().
|
2004-08-16 23:39:54 +04:00
|
|
|
*
|
|
|
|
* @param addr Address of seed in component specific uri format.
|
|
|
|
*/
|
|
|
|
|
2005-05-05 20:31:40 +04:00
|
|
|
typedef int (*mca_oob_base_module_set_addr_fn_t)(const orte_process_name_t*, const char* uri);
|
2004-08-16 23:39:54 +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
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_base_module_update_contact_info()
|
|
|
|
*/
|
|
|
|
typedef void (*mca_oob_module_update_contact_info_fn_t)(orte_gpr_notify_data_t* data,
|
|
|
|
void* cbdata);
|
2004-09-08 21:02:24 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_ping().
|
|
|
|
*
|
|
|
|
* @param peer (IN) Opaque name of peer process.
|
|
|
|
* @param tv (IN) Timeout to wait in connection response.
|
2006-02-12 04:33:29 +03:00
|
|
|
* @return OMPI error code (<0) or ORTE_SUCCESS
|
2004-09-08 21:02:24 +04:00
|
|
|
*/
|
|
|
|
|
2005-05-05 20:31:40 +04:00
|
|
|
typedef int (*mca_oob_base_module_ping_fn_t)(const orte_process_name_t*, const char* uri, const struct timeval* tv);
|
2004-09-08 21:02:24 +04:00
|
|
|
|
2004-07-01 18:49:54 +04:00
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_send().
|
2004-08-05 03:42:51 +04:00
|
|
|
*
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param peer (IN) Opaque name of peer process.
|
|
|
|
* @param msg (IN) Array of iovecs describing user buffers and lengths.
|
|
|
|
* @param count (IN) Number of elements in iovec array.
|
2004-08-03 01:24:00 +04:00
|
|
|
* @param tag (IN) User defined tag for matching send/recv.
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param flags (IN) Currently unused.
|
|
|
|
* @return OMPI error code (<0) on error number of bytes actually sent.
|
|
|
|
*/
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_oob_base_module_send_fn_t)(
|
2005-03-14 23:57:21 +03:00
|
|
|
orte_process_name_t* peer,
|
2004-08-13 02:41:42 +04:00
|
|
|
struct iovec *msg,
|
2004-08-05 03:42:51 +04:00
|
|
|
int count,
|
2004-08-03 01:24:00 +04:00
|
|
|
int tag,
|
2004-07-01 18:49:54 +04:00
|
|
|
int flags);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_recv().
|
|
|
|
*
|
Bring over the update to terminate orteds that are generated by a dynamic spawn such as comm_spawn. This introduces the concept of a job "family" - i.e., jobs that have a parent/child relationship. Comm_spawn'ed jobs have a parent (the one that spawned them). We track that relationship throughout the lineage - i.e., if a comm_spawned job in turn calls comm_spawn, then it has a parent (the one that spawned it) and a "root" job (the original job that started things).
Accordingly, there are new APIs to the name service to support the ability to get a job's parent, root, immediate children, and all its descendants. In addition, the terminate_job, terminate_orted, and signal_job APIs for the PLS have been modified to accept attributes that define the extent of their actions. For example, doing a "terminate_job" with an attribute of ORTE_NS_INCLUDE_DESCENDANTS will terminate the given jobid AND all jobs that descended from it.
I have tested this capability on a MacBook under rsh, Odin under SLURM, and LANL's Flash (bproc). It worked successfully on non-MPI jobs (both simple and including a spawn), and MPI jobs (again, both simple and with a spawn).
This commit was SVN r12597.
2006-11-14 22:34:59 +03:00
|
|
|
* @param peer (IN) Opaque name of peer process or ORTE_NAME_WILDCARD for wildcard receive.
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param msg (IN) Array of iovecs describing user buffers and lengths.
|
|
|
|
* @param types (IN) Parallel array to iovecs describing data type of each iovec element.
|
|
|
|
* @param count (IN) Number of elements in iovec array.
|
2004-08-03 01:24:00 +04:00
|
|
|
* @param tag (IN) User defined tag for matching send/recv.
|
2004-07-15 23:08:54 +04:00
|
|
|
* @param flags (IN) May be MCA_OOB_PEEK to return up to the number of bytes provided in the
|
2004-07-01 18:49:54 +04:00
|
|
|
* iovec array without removing the message from the queue.
|
|
|
|
* @return OMPI error code (<0) on error or number of bytes actually received.
|
|
|
|
*/
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_oob_base_module_recv_fn_t)(
|
2005-03-14 23:57:21 +03:00
|
|
|
orte_process_name_t* peer,
|
2004-08-13 02:41:42 +04:00
|
|
|
struct iovec *msg,
|
2004-08-05 03:42:51 +04:00
|
|
|
int count,
|
2005-03-14 23:57:21 +03:00
|
|
|
int tag,
|
2004-07-01 18:49:54 +04:00
|
|
|
int flags);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_send_nb().
|
|
|
|
*
|
|
|
|
* @param peer (IN) Opaque name of peer process.
|
|
|
|
* @param msg (IN) Array of iovecs describing user buffers and lengths.
|
|
|
|
* @param count (IN) Number of elements in iovec array.
|
2004-08-03 01:24:00 +04:00
|
|
|
* @param tag (IN) User defined tag for matching send/recv.
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param flags (IN) Currently unused.
|
|
|
|
* @param cbfunc (IN) Callback function on send completion.
|
|
|
|
* @param cbdata (IN) User data that is passed to callback function.
|
|
|
|
* @return OMPI error code (<0) on error number of bytes actually sent.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_oob_base_module_send_nb_fn_t)(
|
2005-03-14 23:57:21 +03:00
|
|
|
orte_process_name_t* peer,
|
2004-08-13 02:41:42 +04:00
|
|
|
struct iovec* msg,
|
2004-08-05 03:42:51 +04:00
|
|
|
int count,
|
2004-08-03 01:24:00 +04:00
|
|
|
int tag,
|
2004-08-05 03:42:51 +04:00
|
|
|
int flags,
|
2004-07-01 18:49:54 +04:00
|
|
|
mca_oob_callback_fn_t cbfunc,
|
|
|
|
void* cbdata);
|
2004-01-10 11:09:54 +03:00
|
|
|
|
2004-07-01 18:49:54 +04:00
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_recv_nb().
|
|
|
|
*
|
Bring over the update to terminate orteds that are generated by a dynamic spawn such as comm_spawn. This introduces the concept of a job "family" - i.e., jobs that have a parent/child relationship. Comm_spawn'ed jobs have a parent (the one that spawned them). We track that relationship throughout the lineage - i.e., if a comm_spawned job in turn calls comm_spawn, then it has a parent (the one that spawned it) and a "root" job (the original job that started things).
Accordingly, there are new APIs to the name service to support the ability to get a job's parent, root, immediate children, and all its descendants. In addition, the terminate_job, terminate_orted, and signal_job APIs for the PLS have been modified to accept attributes that define the extent of their actions. For example, doing a "terminate_job" with an attribute of ORTE_NS_INCLUDE_DESCENDANTS will terminate the given jobid AND all jobs that descended from it.
I have tested this capability on a MacBook under rsh, Odin under SLURM, and LANL's Flash (bproc). It worked successfully on non-MPI jobs (both simple and including a spawn), and MPI jobs (again, both simple and with a spawn).
This commit was SVN r12597.
2006-11-14 22:34:59 +03:00
|
|
|
* @param peer (IN) Opaque name of peer process or ORTE_NAME_WILDCARD for wildcard receive.
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param msg (IN) Array of iovecs describing user buffers and lengths.
|
|
|
|
* @param count (IN) Number of elements in iovec array.
|
2004-08-03 01:24:00 +04:00
|
|
|
* @param tag (IN) User defined tag for matching send/recv.
|
2004-07-15 23:08:54 +04:00
|
|
|
* @param flags (IN) May be MCA_OOB_PEEK to return up to size bytes of msg w/out removing it from the queue,
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param cbfunc (IN) Callback function on recv completion.
|
|
|
|
* @param cbdata (IN) User data that is passed to callback function.
|
|
|
|
* @return OMPI error code (<0) on error or number of bytes actually received.
|
|
|
|
*/
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_oob_base_module_recv_nb_fn_t)(
|
2005-03-14 23:57:21 +03:00
|
|
|
orte_process_name_t* peer,
|
2004-08-13 02:41:42 +04:00
|
|
|
struct iovec* msg,
|
2004-08-05 03:42:51 +04:00
|
|
|
int count,
|
2004-08-03 01:24:00 +04:00
|
|
|
int tag,
|
2004-08-05 03:42:51 +04:00
|
|
|
int flags,
|
2004-07-01 18:49:54 +04:00
|
|
|
mca_oob_callback_fn_t cbfunc,
|
|
|
|
void* cbdata);
|
|
|
|
|
2004-09-30 19:09:29 +04:00
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_recv_cancel().
|
|
|
|
*
|
Bring over the update to terminate orteds that are generated by a dynamic spawn such as comm_spawn. This introduces the concept of a job "family" - i.e., jobs that have a parent/child relationship. Comm_spawn'ed jobs have a parent (the one that spawned them). We track that relationship throughout the lineage - i.e., if a comm_spawned job in turn calls comm_spawn, then it has a parent (the one that spawned it) and a "root" job (the original job that started things).
Accordingly, there are new APIs to the name service to support the ability to get a job's parent, root, immediate children, and all its descendants. In addition, the terminate_job, terminate_orted, and signal_job APIs for the PLS have been modified to accept attributes that define the extent of their actions. For example, doing a "terminate_job" with an attribute of ORTE_NS_INCLUDE_DESCENDANTS will terminate the given jobid AND all jobs that descended from it.
I have tested this capability on a MacBook under rsh, Odin under SLURM, and LANL's Flash (bproc). It worked successfully on non-MPI jobs (both simple and including a spawn), and MPI jobs (again, both simple and with a spawn).
This commit was SVN r12597.
2006-11-14 22:34:59 +03:00
|
|
|
* @param peer (IN) Opaque name of peer process or ORTE_NAME_WILDCARD for wildcard receive.
|
2004-09-30 19:09:29 +04:00
|
|
|
* @param tag (IN) User defined tag for matching send/recv.
|
|
|
|
* @return OMPI error code (<0) on error or number of bytes actually received.
|
|
|
|
*/
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
typedef int (*mca_oob_base_module_recv_cancel_fn_t)(orte_process_name_t* peer, int tag);
|
2004-09-30 19:09:29 +04:00
|
|
|
|
2004-08-11 01:02:36 +04:00
|
|
|
/**
|
2004-08-19 23:34:37 +04:00
|
|
|
* Hook function called by mca_oob_base_register to allow
|
|
|
|
* the oob component a chance to register contact information
|
2004-08-11 01:02:36 +04:00
|
|
|
*/
|
2004-08-19 23:34:37 +04:00
|
|
|
typedef int (*mca_oob_base_module_init_fn_t)(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Cleanup during finalize.
|
|
|
|
*/
|
|
|
|
typedef int (*mca_oob_base_module_fini_fn_t)(void);
|
2004-08-11 01:02:36 +04:00
|
|
|
|
2005-10-06 23:39:20 +04:00
|
|
|
/**
|
|
|
|
* xcast function for sending common messages to all processes
|
|
|
|
*/
|
2006-11-28 03:06:25 +03:00
|
|
|
typedef int (*mca_oob_base_module_xcast_fn_t)(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 22:31:28 +04:00
|
|
|
orte_buffer_t *buffer,
|
|
|
|
orte_rml_tag_t tag);
|
|
|
|
|
|
|
|
typedef int (*mca_oob_base_module_xcast_nb_fn_t)(orte_jobid_t job,
|
|
|
|
orte_buffer_t *buffer,
|
|
|
|
orte_rml_tag_t tag);
|
|
|
|
|
|
|
|
typedef int (*mca_oob_base_module_xcast_gate_fn_t)(orte_gpr_trigger_cb_fn_t cbfunc);
|
2004-11-20 22:12:43 +03: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
|
|
|
/* ft event */
|
2007-03-17 02:11:45 +03:00
|
|
|
typedef int (*mca_oob_base_module_ft_event_fn_t)( int state );
|
|
|
|
|
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
|
|
|
/*
|
|
|
|
* Register my contact info with the General Purpose Registry
|
|
|
|
* This function causes the component to "put" its contact info
|
|
|
|
* on the registry.
|
|
|
|
*/
|
|
|
|
typedef int (*mca_oob_module_register_contact_info_fn_t)(void);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Register a subscription to receive contact info on other processes
|
|
|
|
* This function will typically be called from within a GPR compound command
|
|
|
|
* to register a subscription against a stage gate trigger. When fired, this
|
|
|
|
* will return the OOB contact info for all processes in the specified job
|
|
|
|
*/
|
|
|
|
typedef int (*mca_oob_module_register_subscription_fn_t)(orte_jobid_t job, char *trigger);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Get contact info for a process or job
|
|
|
|
* Returns contact info for the specified process. If the vpid in the process name
|
|
|
|
* is WILDCARD, then it returns the contact info for all processes in the specified
|
|
|
|
* job. If the jobid is WILDCARD, then it returns the contact info for processes
|
|
|
|
* of the specified vpid across all jobs. Obviously, combining the two WILDCARD
|
|
|
|
* values will return contact info for everyone!
|
|
|
|
*/
|
|
|
|
typedef int (*mca_oob_module_get_contact_info_fn_t)(orte_process_name_t *name, orte_gpr_notify_data_t **data);
|
|
|
|
|
|
|
|
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
2004-07-01 18:49:54 +04:00
|
|
|
* OOB Module
|
|
|
|
*/
|
2004-08-03 01:24:00 +04:00
|
|
|
struct mca_oob_1_0_0_t {
|
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
|
|
|
mca_oob_base_module_get_addr_fn_t oob_get_addr;
|
|
|
|
mca_oob_base_module_set_addr_fn_t oob_set_addr;
|
|
|
|
mca_oob_base_module_ping_fn_t oob_ping;
|
|
|
|
mca_oob_base_module_send_fn_t oob_send;
|
|
|
|
mca_oob_base_module_recv_fn_t oob_recv;
|
|
|
|
mca_oob_base_module_send_nb_fn_t oob_send_nb;
|
|
|
|
mca_oob_base_module_recv_nb_fn_t oob_recv_nb;
|
|
|
|
mca_oob_base_module_recv_cancel_fn_t oob_recv_cancel;
|
|
|
|
mca_oob_base_module_init_fn_t oob_init;
|
|
|
|
mca_oob_base_module_fini_fn_t oob_fini;
|
|
|
|
mca_oob_base_module_xcast_fn_t oob_xcast;
|
|
|
|
mca_oob_base_module_xcast_nb_fn_t oob_xcast_nb;
|
|
|
|
mca_oob_base_module_xcast_gate_fn_t oob_xcast_gate;
|
|
|
|
mca_oob_base_module_ft_event_fn_t oob_ft_event;
|
|
|
|
mca_oob_module_register_contact_info_fn_t oob_register_contact_info;
|
|
|
|
mca_oob_module_register_subscription_fn_t oob_register_subscription;
|
|
|
|
mca_oob_module_get_contact_info_fn_t oob_get_contact_info;
|
|
|
|
mca_oob_module_update_contact_info_fn_t oob_update_contact_info;
|
|
|
|
|
2004-01-10 21:23:53 +03:00
|
|
|
};
|
2004-08-16 23:39:54 +04:00
|
|
|
|
2004-07-01 18:49:54 +04:00
|
|
|
/**
|
|
|
|
* OOB Component
|
|
|
|
*/
|
2005-03-14 23:57:21 +03:00
|
|
|
typedef mca_oob_t* (*mca_oob_base_component_init_fn_t)(int *priority);
|
2004-08-02 04:24:22 +04:00
|
|
|
|
2004-07-01 18:49:54 +04:00
|
|
|
/**
|
|
|
|
* the standard component data structure
|
|
|
|
*/
|
|
|
|
struct mca_oob_base_component_1_0_0_t {
|
2004-08-16 23:39:54 +04:00
|
|
|
mca_base_component_t oob_base;
|
2004-08-02 04:24:22 +04:00
|
|
|
mca_base_component_data_1_0_0_t oob_data;
|
|
|
|
mca_oob_base_component_init_fn_t oob_init;
|
2004-07-01 18:49:54 +04:00
|
|
|
};
|
2004-08-11 01:02:36 +04:00
|
|
|
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
|
|
|
* Convenience Typedef
|
|
|
|
*/
|
2004-07-01 18:49:54 +04:00
|
|
|
typedef struct mca_oob_base_component_1_0_0_t mca_oob_base_component_1_0_0_t;
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
|
|
|
* Convenience Typedef
|
|
|
|
*/
|
2004-07-01 18:49:54 +04:00
|
|
|
typedef mca_oob_base_component_1_0_0_t mca_oob_base_component_t;
|
2004-01-10 08:13:00 +03:00
|
|
|
|
2004-02-01 00:43:26 +03:00
|
|
|
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
2004-07-01 18:49:54 +04:00
|
|
|
* Macro for use in components that are of type oob v1.0.0
|
2004-01-12 01:52:59 +03:00
|
|
|
*/
|
|
|
|
#define MCA_OOB_BASE_VERSION_1_0_0 \
|
2004-08-05 03:42:51 +04:00
|
|
|
/* oob v1.0 is chained to MCA v1.0 */ \
|
2004-01-12 01:52:59 +03:00
|
|
|
MCA_BASE_VERSION_1_0_0, \
|
2004-08-05 03:42:51 +04:00
|
|
|
/* oob v1.0 */ \
|
2004-01-12 01:52:59 +03:00
|
|
|
"oob", 1, 0, 0
|
|
|
|
|
2004-08-05 03:42:51 +04:00
|
|
|
/*
|
|
|
|
* This is the first module on the list. This is here temporarily
|
|
|
|
* to make things work
|
|
|
|
*/
|
2004-10-22 20:06:05 +04:00
|
|
|
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC extern mca_oob_t mca_oob;
|
2004-08-05 03:42:51 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* associate a component and a module that belongs to it
|
|
|
|
*/
|
|
|
|
struct mca_oob_base_info_t {
|
2005-07-03 20:22:16 +04:00
|
|
|
opal_list_item_t super;
|
2004-08-05 03:42:51 +04:00
|
|
|
mca_oob_base_component_t *oob_component;
|
|
|
|
mca_oob_t *oob_module;
|
|
|
|
};
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
|
|
|
* Convenience Typedef
|
|
|
|
*/
|
2004-08-05 03:42:51 +04:00
|
|
|
typedef struct mca_oob_base_info_t mca_oob_base_info_t;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* declare the association structure as a class
|
|
|
|
*/
|
2006-08-23 07:32:36 +04:00
|
|
|
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(mca_oob_base_info_t);
|
2004-08-05 03:42:51 +04:00
|
|
|
|
2005-10-06 23:39:20 +04:00
|
|
|
/**
|
|
|
|
* List of registrations of exception callbacks
|
|
|
|
*/
|
|
|
|
struct mca_oob_base_exception_handler_t {
|
|
|
|
opal_list_item_t super;
|
|
|
|
mca_oob_base_exception_fn_t cbfunc;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Convenience Typedef
|
|
|
|
*/
|
|
|
|
typedef struct mca_oob_base_exception_handler_t mca_oob_base_exception_handler_t;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* declare the association structure as a class
|
|
|
|
*/
|
2006-08-23 07:32:36 +04:00
|
|
|
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(mca_oob_base_exception_handler_t);
|
2005-10-06 23:39:20 +04:00
|
|
|
|
2004-08-05 03:42:51 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Global functions for MCA overall collective open and close
|
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC int mca_oob_base_open(void);
|
|
|
|
ORTE_DECLSPEC int mca_oob_base_init(void);
|
|
|
|
ORTE_DECLSPEC int mca_oob_base_module_init(void);
|
|
|
|
ORTE_DECLSPEC int mca_oob_base_close(void);
|
2004-07-01 18:49:54 +04:00
|
|
|
|
2004-08-05 03:42:51 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Global struct holding the selected module's function pointers
|
|
|
|
*/
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC extern int mca_oob_base_output;
|
2007-05-16 19:46:52 +04:00
|
|
|
extern char* mca_oob_base_include;
|
|
|
|
extern char* mca_oob_base_exclude;
|
2006-08-20 19:54:04 +04:00
|
|
|
ORTE_DECLSPEC extern opal_list_t mca_oob_base_components;
|
|
|
|
ORTE_DECLSPEC extern opal_list_t mca_oob_base_modules;
|
|
|
|
ORTE_DECLSPEC extern opal_list_t mca_oob_base_exception_handlers;
|
2004-08-05 03:42:51 +04:00
|
|
|
|
2004-10-21 02:31:03 +04:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2004-08-05 03:42:51 +04:00
|
|
|
#endif
|