2004-01-15 04:47:20 +00:00
|
|
|
/*
|
2004-11-22 01:38:40 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-01-15 04:47:20 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-08-05 14:35:38 +00:00
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*
|
|
|
|
* Interface into the Open MPI Run Time Environment
|
|
|
|
*/
|
2004-06-07 15:33:53 +00:00
|
|
|
#ifndef OMPI_RUNTIME_H
|
|
|
|
#define OMPI_RUNTIME_H
|
2004-01-15 04:47:20 +00:00
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
#include "ompi_config.h"
|
2004-01-31 21:47:59 +00:00
|
|
|
|
2004-10-20 01:03:09 +00:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
2004-09-03 19:26:49 +00:00
|
|
|
#include <sys/types.h>
|
2004-10-20 01:03:09 +00:00
|
|
|
#endif
|
2004-09-03 19:26:49 +00:00
|
|
|
|
2004-11-20 19:12:43 +00:00
|
|
|
#include "mca/gpr/gpr.h"
|
2004-10-01 22:22:21 +00:00
|
|
|
#include "util/cmd_line.h"
|
2004-09-23 14:40:05 +00:00
|
|
|
|
2004-08-10 03:48:41 +00:00
|
|
|
#include "runtime/runtime_types.h"
|
2004-09-03 19:19:59 +00:00
|
|
|
#include "mca/ns/ns.h"
|
2004-08-10 03:48:41 +00:00
|
|
|
|
2004-08-07 00:53:56 +00:00
|
|
|
/* For backwards compatibility. If you only need MPI stuff, please include
|
|
|
|
mpiruntime/mpiruntime.h directly */
|
2004-08-08 05:20:32 +00:00
|
|
|
#include "mpi/runtime/mpiruntime.h"
|
2004-03-17 20:00:24 +00:00
|
|
|
|
2004-11-20 19:12:43 +00:00
|
|
|
/* constants defining runtime-related segment naming conventions for the
|
|
|
|
* registry
|
|
|
|
*/
|
2004-11-30 16:27:32 +00:00
|
|
|
#define OMPI_RTE_JOB_STATUS_SEGMENT "ompi-job-status"
|
|
|
|
#define OMPI_RTE_OOB_SEGMENT "ompi-oob"
|
|
|
|
#define OMPI_RTE_VM_STATUS_SEGMENT "ompi-vm-status"
|
|
|
|
#define OMPI_RTE_CELL_STATUS_SEGMENT "ompi-cell-status"
|
|
|
|
#define OMPI_RTE_SCHED_SEGMENT "ompi-sched"
|
Well, we are getting closer to resolving the comm_spawn problem. For the benefit of those that haven't been in the midst of this discussion, the problem is that this is the first case where the process starting a set of processes has not been mpirun and is not guaranteed to be alive throughout the lifetime of the spawned processes. This sounds simple, but actually has some profound impacts.
Most of this checkin consists of more debugging stuff. Hopefully, you won't see any printf's that aren't protected by debug flags - if you do, let me know and I'll take them out with my apologies.
Outside of debugging, the biggest change was a revamp of the shutdown process. For several reasons, we had chosen to have all processes "wait" for a shutdown message before exiting. This message is typically generated by mpirun, but in the case of comm_spawn we needed to do something else. We have decided that the best way to solve this problem is to:
(a) replace the shutdown message (which needed to be generated by somebody - usually mpirun) with an oob_barrier call. This still requires that the rank 0 process be alive. However, we terminate all processes if one abnormally terminates anyway, so this isn't a problem (with the standard or our implementation); and
(b) have the state-of-health monitoring subsystem issue the call to cleanup the job from the registry. Since the state-of-health subsystem isn't available yet, we have temporarily assigned that responsibility to the rank 0 process. Once the state-of-health subsystem is available, we will have it monitor the job for all-processes-complete and then it can tell the registry to cleanup the job (i.e., remove all data relating to this job).
Hope that helps a little. I'll put all this into the design docs soon.
This commit was SVN r3754.
2004-12-08 21:44:41 +00:00
|
|
|
#define OMPI_RTE_MODEX_SEGMENT "ompi-modex"
|
2004-11-20 19:12:43 +00:00
|
|
|
|
2004-09-20 18:25:00 +00:00
|
|
|
/* constants for spawn constraints */
|
2004-09-29 21:29:51 +00:00
|
|
|
|
|
|
|
/** Spawn constraint - require multi-cell support. The selected spawn
|
|
|
|
system must be capable of starting across multiple cells. This
|
|
|
|
allows multiple pcms to be used to satisfy a single resource
|
|
|
|
allocation request */
|
2004-09-10 04:54:17 +00:00
|
|
|
#define OMPI_RTE_SPAWN_MULTI_CELL 0x0001
|
2004-09-29 21:29:51 +00:00
|
|
|
/** Spawn constraint - require ability to launch daemons. The
|
|
|
|
selected spawn system must be capable of starting daemon process.
|
|
|
|
Setting this flag will result in a spawn service that does not
|
2004-10-20 02:24:40 +00:00
|
|
|
neccessarily provide process monitoring or standard I/O
|
|
|
|
forwarding. The calling process may exit before all children have
|
|
|
|
exited. */
|
2004-09-20 18:25:00 +00:00
|
|
|
#define OMPI_RTE_SPAWN_DAEMON 0x0002
|
2004-09-29 21:29:51 +00:00
|
|
|
/** Spawn constraint - require quality of service support. The
|
|
|
|
selected spawn system must provide I/O forwarding, quick process
|
|
|
|
shutdown, and process status monitoring. */
|
2004-09-20 18:25:00 +00:00
|
|
|
#define OMPI_RTE_SPAWN_HIGH_QOS 0x0004
|
2004-09-29 21:29:51 +00:00
|
|
|
/** Spawn constraint - caller is an MPI process. The caller is an MPI
|
2004-10-20 02:24:40 +00:00
|
|
|
application (has called MPI_Init). This should be used only for
|
|
|
|
MPI_COMM_SPAWN and MPI_COMM_SPAWN_MULTIPLE. The calling process
|
|
|
|
will follow the semantics of the MPI_COMM_SPAWN_* functions. */
|
|
|
|
#define OMPI_RTE_SPAWN_FROM_MPI 0x0008
|
2004-12-16 15:42:02 +00:00
|
|
|
/** Spawn constraint - require ability to launch either MPMD (hence
|
|
|
|
the name) applications or applications with specific placement of
|
|
|
|
processes. */
|
|
|
|
#define OMPI_RTE_SPAWN_MPMD 0x0010
|
2004-09-10 04:54:17 +00:00
|
|
|
|
2004-10-20 22:31:03 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
2004-01-15 04:47:20 +00:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2004-09-02 18:39:42 +00:00
|
|
|
/* globals used by RTE - instanced in ompi_rte_init.c */
|
|
|
|
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC extern int ompi_rte_debug_flag;
|
2004-09-02 18:39:42 +00:00
|
|
|
|
2004-09-03 16:26:15 +00:00
|
|
|
/* Define the info structure underlying the Open MPI universe system
|
|
|
|
* instanced in ompi_rte_init.c */
|
|
|
|
|
|
|
|
struct ompi_universe_t {
|
|
|
|
char *name;
|
|
|
|
char *host;
|
|
|
|
char *uid;
|
2004-09-03 19:26:49 +00:00
|
|
|
pid_t pid;
|
2004-09-03 16:26:15 +00:00
|
|
|
bool persistence;
|
|
|
|
char *scope;
|
2004-09-07 02:58:49 +00:00
|
|
|
bool probe;
|
2004-09-11 12:56:52 +00:00
|
|
|
bool console;
|
|
|
|
char *ns_replica; /**< OOB contact info for name server */
|
|
|
|
char *gpr_replica; /**< OOB contact info for GPR */
|
|
|
|
char *seed_contact_info; /**< OOB contact info for universe seed */
|
|
|
|
bool console_connected; /**< Indicates if console is connected */
|
|
|
|
char *scriptfile; /**< Name of file containing commands to be executed */
|
|
|
|
char *hostfile; /**< Name of file containing list of hosts to be built into virtual machine */
|
2004-09-03 16:26:15 +00:00
|
|
|
};
|
|
|
|
typedef struct ompi_universe_t ompi_universe_t;
|
|
|
|
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC extern ompi_universe_t ompi_universe_info;
|
2004-09-03 16:26:15 +00:00
|
|
|
|
2004-10-25 13:36:09 +00:00
|
|
|
|
2004-11-20 19:12:43 +00:00
|
|
|
struct ompi_rte_process_status_t {
|
2004-11-30 16:27:32 +00:00
|
|
|
int32_t rank;
|
|
|
|
int32_t local_pid;
|
|
|
|
char *nodename;
|
2004-11-20 19:12:43 +00:00
|
|
|
ompi_status_key_t status_key;
|
|
|
|
ompi_exit_code_t exit_code;
|
|
|
|
};
|
|
|
|
typedef struct ompi_rte_process_status_t ompi_rte_process_status_t;
|
|
|
|
|
|
|
|
|
|
|
|
struct ompi_rte_vm_status_t {
|
2004-11-30 16:27:32 +00:00
|
|
|
mca_ns_base_cellid_t cell; /* cell id for this vm */
|
|
|
|
char *nodename; /* name of the node */
|
|
|
|
uint32_t node_address; /* node address */
|
|
|
|
uint16_t num_cpus; /* number of CPU's in this node */
|
|
|
|
uint32_t mem_size; /* size of memory, in MB */
|
|
|
|
char *arch; /* architecture of the CPU's */
|
|
|
|
char *op_sys; /* operating system */
|
|
|
|
char *release; /* operating system release */
|
|
|
|
char *user; /* userid of the owner of this node */
|
|
|
|
char *group; /* name of the owning group */
|
|
|
|
uint32_t permission; /* Unix-style permissions for the node */
|
|
|
|
ompi_node_state_t state; /* state of this node */
|
2004-11-16 22:53:33 +00:00
|
|
|
};
|
2004-11-20 19:12:43 +00:00
|
|
|
typedef struct ompi_rte_vm_status_t ompi_rte_vm_status_t;
|
2004-11-16 22:53:33 +00:00
|
|
|
|
2004-11-30 16:27:32 +00:00
|
|
|
struct ompi_rte_cell_status_t {
|
|
|
|
mca_ns_base_cellid_t cell; /* cellid for this cell */
|
|
|
|
char *cell_name; /* name for this cell */
|
|
|
|
char *system_type; /* cluster, grid, SMP, etc. */
|
|
|
|
char *launch_mech; /* launch mechanism for this cell */
|
|
|
|
uint32_t num_nodes; /* number of nodes in cell */
|
|
|
|
ompi_node_state_t state; /* state of the cell */
|
2004-11-20 19:12:43 +00:00
|
|
|
};
|
2004-11-30 16:27:32 +00:00
|
|
|
typedef struct ompi_rte_cell_status_t ompi_rte_cell_status_t;
|
|
|
|
|
2004-09-03 16:26:15 +00:00
|
|
|
/**
|
|
|
|
* Initialize the Open MPI support code
|
|
|
|
*
|
|
|
|
* This function initializes the Open MPI support code, including
|
|
|
|
* malloc debugging and threads. It should be called exactly once
|
|
|
|
* by every application that utilizes any of the Open MPI support
|
|
|
|
* libraries (including MPI applications, mpirun, and mpicc).
|
|
|
|
*
|
|
|
|
* This function should be called before \code ompi_rte_init, if
|
|
|
|
* \code ompi_rte_init is to be called.
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int ompi_init(int argc, char* argv[]);
|
2004-09-03 16:26:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Finalize the Open MPI support code
|
|
|
|
*
|
|
|
|
* Finalize the Open MPI support code. Any function calling \code
|
|
|
|
* ompi_init should call \code ompi_finalize. This function should
|
|
|
|
* be called after \code ompi_rte_finalize, if \code
|
|
|
|
* ompi_rte_finalize is called.
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int ompi_finalize(void);
|
2004-09-03 16:26:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Abort the current application with a pretty-print error message
|
|
|
|
*
|
|
|
|
* Aborts currently running application with \code abort(), pretty
|
|
|
|
* printing an error message if possible. Error message should be
|
|
|
|
* specified using the standard \code printf() format.
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int ompi_abort(int status, char *fmt, ...);
|
2004-09-03 16:26:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize the Open MPI run time environment
|
|
|
|
*
|
|
|
|
* Initlize the Open MPI run time environment, including process
|
|
|
|
* control and out of band messaging. This function should be
|
|
|
|
* called exactly once, after \code ompi_init. This function should
|
|
|
|
* be called by every application using the RTE interface, including
|
|
|
|
* MPI applications and mpirun.
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int ompi_rte_init(ompi_cmd_line_t *cmd_line, bool *allow_multi_user_threads, bool *have_hidden_threads);
|
2004-09-03 16:26:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Finalize the Open MPI run time environment
|
|
|
|
*
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int ompi_rte_finalize(void);
|
2004-01-15 04:47:20 +00:00
|
|
|
|
2004-09-21 20:27:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Request a handle for spawning jobs
|
|
|
|
*
|
|
|
|
* Request a handle for allocating resources and spawning a job.
|
|
|
|
* This is the first step in starting a new set of processes. It
|
|
|
|
* will load the best available set of pcm components for starting
|
|
|
|
* a job according to the \c criteria provided.
|
|
|
|
*
|
|
|
|
* The returned job handle should be OBJ_RELEASE()'ed when no
|
|
|
|
* further use of the particular job handle is needed. It is
|
|
|
|
* possible that consecutive calls to this function with the same
|
|
|
|
* \c criteria will return a pointer to the same object. In these
|
|
|
|
* situations, the reference count on the object will be adjusted
|
|
|
|
* as appropriate.
|
|
|
|
*
|
|
|
|
* The returned handle can be used to call the process startup
|
|
|
|
* related functions multiple times, both in the same job and in
|
|
|
|
* different jobs.
|
|
|
|
*
|
|
|
|
* @param criteria (IN) Selection criteria. A bitmask of the
|
|
|
|
* constants defined in \c runtime.h starting
|
|
|
|
* with \c OMPI_RTE_SPAWN_*
|
|
|
|
* @param have_threads (IN) Whether the current running process is
|
|
|
|
* multi-threaded or not. true means there
|
|
|
|
* may be concurrent access into the
|
|
|
|
* underlying components *and* that the
|
|
|
|
* components may launch new threads.
|
|
|
|
* @return jobhandle (OUT) Pointer to an \c ompi_rte_jobhandle.
|
|
|
|
* If no available pcm components are capable
|
|
|
|
* of meeting criteria, \c NULL is returned.
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC ompi_rte_spawn_handle_t* ompi_rte_get_spawn_handle(int criteria,
|
2004-09-21 20:27:41 +00:00
|
|
|
bool have_threads);
|
|
|
|
|
|
|
|
|
2004-08-10 03:48:41 +00:00
|
|
|
/**
|
|
|
|
* Allocate requested resources
|
|
|
|
*
|
|
|
|
* Allocate the specified nodes / processes for use in a new job.
|
2004-09-21 20:27:41 +00:00
|
|
|
* This function should be called exactly once per call to \c
|
2004-12-16 15:42:02 +00:00
|
|
|
* ompi_rte_spawn_procs, unless \c OMPI_RTE_SPAWN_MPMD was
|
|
|
|
* specified as a constraint to \c ompi_rte_get_spawn_handle(), in
|
|
|
|
* which case this function can be called as many times as
|
|
|
|
* necessary.
|
2004-08-10 03:48:41 +00:00
|
|
|
*
|
2004-09-21 20:27:41 +00:00
|
|
|
* @param handle (IN) Handle from \c ompi_rte_get_spawn_handle
|
2004-08-10 03:48:41 +00:00
|
|
|
* @param jobid (IN) Jobid with which to associate the given resources.
|
2004-09-03 19:19:59 +00:00
|
|
|
* @param nodes (IN) Number of ndoes to try to allocate. If 0, the
|
|
|
|
* allocator will try to allocate \c procs processes
|
2004-09-21 20:27:41 +00:00
|
|
|
* on as many nodes as are needed. If positive,
|
2004-09-03 19:19:59 +00:00
|
|
|
* will try to allocate \c procs process slots
|
2004-09-21 20:27:41 +00:00
|
|
|
* per node. If both nodes and procs are 0,
|
|
|
|
* will attempt to return as many resources as
|
|
|
|
* possible
|
2004-08-10 03:48:41 +00:00
|
|
|
* @param procs (IN) Number of processors to try to allocate. See the note
|
2004-09-21 20:27:41 +00:00
|
|
|
* for \c nodes for usage.
|
2004-08-13 19:39:06 +00:00
|
|
|
* @return List of <code>ompi_rte_node_allocation_t</code>s
|
2004-09-21 20:27:41 +00:00
|
|
|
* describing the allocated resources or NULL on
|
2004-09-22 22:27:40 +00:00
|
|
|
* error (error will be in errno). If the
|
|
|
|
* number of requested resources is not
|
|
|
|
* available, errno will be set to \c
|
|
|
|
* OMPI_ERR_OUT_OF_RESOURCE. This is not a
|
|
|
|
* fatal error - \c ompi_rte_allocate_resources
|
|
|
|
* can be called again, but with a smaller
|
|
|
|
* resource request.
|
2004-08-10 03:48:41 +00:00
|
|
|
*
|
2004-09-21 20:27:41 +00:00
|
|
|
* Some systems are not capable of providing a maximum
|
|
|
|
* available resource count and there is an inherent race
|
|
|
|
* condition to do so in many other systems. On these
|
|
|
|
* systems, errno will be set to \c OMPI_ERR_NOT_SUPPORTED.
|
|
|
|
* This is not a fatal error - \c
|
|
|
|
* ompi_rte_allocate_resources can be called again, but
|
|
|
|
* without nodes = 0, procs = 0.
|
2004-08-10 03:48:41 +00:00
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC ompi_list_t* ompi_rte_allocate_resources(ompi_rte_spawn_handle_t* handle,
|
2004-09-21 20:27:41 +00:00
|
|
|
mca_ns_base_jobid_t jobid,
|
|
|
|
int nodes, int procs);
|
2004-08-10 03:48:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Spawn a job
|
|
|
|
*
|
|
|
|
* Start a job with given jobid and starting vpid (should probably be
|
|
|
|
* 0 for the forseeable future). The job is specified using an array
|
|
|
|
* of \c mca_pcm_base_schedule_t structures, which give both process
|
|
|
|
* and location information.
|
|
|
|
*
|
2004-09-21 20:27:41 +00:00
|
|
|
* @param handle (IN) Handle from \c ompi_rte_get_spawn_handle
|
2004-08-10 03:48:41 +00:00
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int ompi_rte_spawn_procs(ompi_rte_spawn_handle_t* handle,
|
2004-09-21 20:27:41 +00:00
|
|
|
mca_ns_base_jobid_t jobid,
|
2004-09-03 19:19:59 +00:00
|
|
|
ompi_list_t *schedule_list);
|
2004-08-10 03:48:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get my name
|
|
|
|
*
|
|
|
|
* @return my name
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC ompi_process_name_t* ompi_rte_get_self(void);
|
2004-08-10 03:48:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get names of peer processes which have been launched
|
|
|
|
*
|
2004-09-22 16:05:33 +00:00
|
|
|
* @param peers (OUT) Pointer to a pointer of
|
|
|
|
* ompi_process_name_t. \c *peers will be set
|
|
|
|
* to point to a statically allocated buffer
|
|
|
|
* containing the array of peer processes
|
|
|
|
* started with the current process. If \c
|
|
|
|
* peers is NULL, then only \c npeers is
|
|
|
|
* updated.
|
|
|
|
* @param npeers (OUT) pointer to an integer that will be updated
|
|
|
|
* with the total number of peers started with
|
|
|
|
* the current process. Also the length of \c
|
|
|
|
* *peers array if \c peers is not \c NULL
|
|
|
|
*
|
|
|
|
* @return OMPI_SUCCESS on success
|
|
|
|
* OMPI_ERR_NOT_IMPLEMENTED if the underlying module is
|
|
|
|
* not properly loaded.
|
|
|
|
*
|
2004-08-10 03:48:41 +00:00
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int ompi_rte_get_peers(ompi_process_name_t **peers, size_t *npeers);
|
2004-08-10 03:48:41 +00:00
|
|
|
|
2004-08-28 01:15:19 +00:00
|
|
|
/**
|
2004-11-20 19:12:43 +00:00
|
|
|
* Get current status of the process
|
2004-09-03 16:26:15 +00:00
|
|
|
*/
|
2004-11-20 19:12:43 +00:00
|
|
|
OMPI_DECLSPEC ompi_rte_process_status_t *ompi_rte_get_process_status(ompi_process_name_t *proc);
|
2004-08-28 01:15:19 +00:00
|
|
|
|
2004-11-20 19:12:43 +00:00
|
|
|
/**
|
|
|
|
* Set process status
|
|
|
|
*/
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int ompi_rte_set_process_status(ompi_rte_process_status_t *status,
|
|
|
|
ompi_process_name_t *proc);
|
2004-08-28 01:15:19 +00:00
|
|
|
|
|
|
|
/**
|
2004-11-20 19:12:43 +00:00
|
|
|
* Unpack the process status structure stored on the registry
|
2004-09-03 16:26:15 +00:00
|
|
|
*/
|
2004-11-20 19:12:43 +00:00
|
|
|
OMPI_DECLSPEC ompi_rte_process_status_t *ompi_rte_unpack_process_status(ompi_registry_value_t *value);
|
2004-09-23 14:40:05 +00:00
|
|
|
|
2004-11-30 16:27:32 +00:00
|
|
|
/**
|
|
|
|
* Get virtual machine node status
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC ompi_rte_vm_status_t *ompi_rte_get_vm_status(mca_ns_base_cellid_t cellid, char *nodename);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set virtual machine node status
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int ompi_rte_set_vm_status(ompi_rte_vm_status_t *status);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Upack the virtual machine node status stored on the registry
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC ompi_rte_vm_status_t *ompi_rte_unpack_vm_status(ompi_registry_value_t *value);
|
|
|
|
|
2004-09-23 14:40:05 +00:00
|
|
|
/**
|
2004-11-20 19:12:43 +00:00
|
|
|
* Hold for startup message to arrive, then decode it.
|
2004-09-23 14:40:05 +00:00
|
|
|
*/
|
2004-11-20 19:12:43 +00:00
|
|
|
|
|
|
|
OMPI_DECLSPEC int ompi_rte_wait_startup_msg(void);
|
2004-09-23 14:40:05 +00:00
|
|
|
|
2004-08-28 01:15:19 +00:00
|
|
|
/**
|
2004-11-20 19:12:43 +00:00
|
|
|
* Change state as processes complete registration/unregistration
|
2004-08-28 01:15:19 +00:00
|
|
|
*/
|
|
|
|
|
2004-11-20 19:12:43 +00:00
|
|
|
OMPI_DECLSPEC void ompi_rte_all_procs_registered(ompi_registry_notify_message_t* match, void* cbdata);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC void ompi_rte_all_procs_unregistered(ompi_registry_notify_message_t* match, void* cbdata);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int ompi_rte_monitor_procs_registered(void);
|
|
|
|
|
|
|
|
OMPI_DECLSPEC int ompi_rte_monitor_procs_unregistered(void);
|
2004-08-10 03:48:41 +00:00
|
|
|
|
|
|
|
/**
|
2004-12-13 15:41:59 +00:00
|
|
|
* Send an asynchronous message (signal in unix land) to a given process
|
2004-08-10 03:48:41 +00:00
|
|
|
*
|
|
|
|
* @param process_name Which process needs to be killed.
|
2004-12-13 15:41:59 +00:00
|
|
|
* @param signal Integer value to send to process
|
2004-08-10 03:48:41 +00:00
|
|
|
* @return Error code
|
|
|
|
*
|
|
|
|
* @warning flags is currently ignored, but should be set to 0 for
|
2004-12-13 15:41:59 +00:00
|
|
|
* future compatibility.
|
2004-08-10 03:48:41 +00:00
|
|
|
*/
|
2004-11-01 16:05:31 +00:00
|
|
|
OMPI_DECLSPEC int ompi_rte_kill_proc(ompi_process_name_t *name,
|
|
|
|
int signal,
|
|
|
|
int flags);
|
2004-08-10 03:48:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2004-12-13 15:41:59 +00:00
|
|
|
* Send an asynchronous message (signal in unix land) to a given
|
|
|
|
* jobid
|
2004-08-10 03:48:41 +00:00
|
|
|
*
|
2004-12-13 15:41:59 +00:00
|
|
|
* @param jobid Jobid to be signaled
|
|
|
|
* @param signal Integer value to send to process
|
2004-08-10 03:48:41 +00:00
|
|
|
* @return Error code
|
|
|
|
*
|
|
|
|
* @warning flags is currently ignored, but should be set to 0 for
|
2004-12-13 15:41:59 +00:00
|
|
|
* future compatibility.
|
2004-08-10 03:48:41 +00:00
|
|
|
*/
|
2004-11-01 16:05:31 +00:00
|
|
|
OMPI_DECLSPEC int ompi_rte_kill_job(mca_ns_base_jobid_t jobid,
|
|
|
|
int signal,
|
|
|
|
int flags);
|
2004-08-10 03:48:41 +00:00
|
|
|
|
2004-12-13 15:41:59 +00:00
|
|
|
/**
|
|
|
|
* Terminate a process
|
|
|
|
*
|
|
|
|
* Terminate a process in a nice fashion (In UNIX-land, send a
|
|
|
|
* SIGTERM, if that doesn't work, send SIGKILL).
|
|
|
|
*
|
|
|
|
* @param process_name Process to terminate
|
|
|
|
* @return Error code
|
|
|
|
*
|
|
|
|
* @warning flags is currently ignored, but should be set to 0 for
|
|
|
|
* future compatibility.
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int ompi_rte_terminate_proc(ompi_process_name_t *name,
|
|
|
|
int flags);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Terminate a job
|
|
|
|
*
|
|
|
|
* Terminate a job in a nice fashion (In UNIX-land, send a
|
|
|
|
* SIGTERM, if that doesn't work, send SIGKILL).
|
|
|
|
*
|
|
|
|
* @param jobid Job id to terminate
|
|
|
|
* @return Error code
|
|
|
|
*
|
|
|
|
* @warning flags is currently ignored, but should be set to 0 for
|
|
|
|
* future compatibility.
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int ompi_rte_terminate_job(mca_ns_base_jobid_t jobid,
|
|
|
|
int flags);
|
|
|
|
|
2004-08-10 03:48:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Deallocate requested resources
|
|
|
|
*
|
|
|
|
* Return the resources for the given jobid to the system.
|
|
|
|
*
|
2004-09-21 20:27:41 +00:00
|
|
|
* @param handle (IN) Handle from \c ompi_rte_get_spawn_handle
|
2004-08-10 03:48:41 +00:00
|
|
|
* @param jobid (IN) Jobid associated with the resources to be freed.
|
|
|
|
* @param nodes (IN) Nodelist from associated allocate_resource call.
|
|
|
|
* All associated memory will be freed as appropriate.
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int ompi_rte_deallocate_resources(ompi_rte_spawn_handle_t *handle,
|
2004-09-21 20:27:41 +00:00
|
|
|
mca_ns_base_jobid_t jobid,
|
2004-09-03 19:19:59 +00:00
|
|
|
ompi_list_t *nodelist);
|
2004-08-10 03:48:41 +00:00
|
|
|
|
|
|
|
|
2004-09-02 18:39:42 +00:00
|
|
|
/**
|
|
|
|
* Setup rte command line options
|
|
|
|
*
|
|
|
|
* Defines the command line options specific to the rte/seed daemon
|
|
|
|
*
|
|
|
|
* @param cmd_line Pointer to an ompi_cmd_line_t object
|
|
|
|
* @retval None
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC void ompi_rte_cmd_line_setup(ompi_cmd_line_t *cmd_line);
|
2004-09-02 18:39:42 +00:00
|
|
|
|
2004-09-03 16:26:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Parse the rte command line for options
|
|
|
|
*
|
2004-09-07 02:58:49 +00:00
|
|
|
* Parses the specified command line for rte specific options.
|
2004-09-03 16:26:15 +00:00
|
|
|
* Fills the relevant global structures with the information obtained.
|
|
|
|
*
|
|
|
|
* @param cmd_line Command line to be parsed.
|
|
|
|
* @retval None
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC void ompi_rte_parse_cmd_line(ompi_cmd_line_t *cmd_line);
|
2004-09-07 02:58:49 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Parse the rte command line for daemon-specific options
|
|
|
|
*
|
|
|
|
* Parses the specified command line for rte daemon-specific options.
|
|
|
|
* Fills the relevant global structures with the information obtained.
|
|
|
|
*
|
|
|
|
* @param cmd_line Command line to be parsed.
|
|
|
|
* @retval None
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC void ompi_rte_parse_daemon_cmd_line(ompi_cmd_line_t *cmd_line);
|
2004-09-03 16:26:15 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Check for universe existence
|
|
|
|
*
|
2004-09-11 12:56:52 +00:00
|
|
|
* Checks to see if a specified universe exists. If so, attempts
|
2004-09-03 16:26:15 +00:00
|
|
|
* to connect to verify that the universe is accepting connections.
|
2004-09-11 12:56:52 +00:00
|
|
|
* If both ns and gpr replicas provided, first checks for those
|
|
|
|
* connections. Gets any missing info from the universe contact.
|
2004-09-03 16:26:15 +00:00
|
|
|
*
|
|
|
|
* @param None Reads everything from the process_info and system_info
|
|
|
|
* structures
|
|
|
|
*
|
|
|
|
* @retval OMPI_SUCCESS Universe found and connection accepted
|
|
|
|
* @retval OMPI_NO_CONNECTION_ALLOWED Universe found, but not persistent or
|
|
|
|
* restricted to local scope
|
|
|
|
* @retval OMPI_CONNECTION_FAILED Universe found, but connection attempt
|
|
|
|
* failed. Probably caused by unclean termination of the universe seed
|
|
|
|
* daemon.
|
|
|
|
* @retval OMPI_CONNECTION_REFUSED Universe found and contact made, but
|
|
|
|
* universe refused to allow connection.
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC int ompi_rte_universe_exists(void);
|
2004-09-03 16:26:15 +00:00
|
|
|
|
2004-09-10 03:21:03 +00:00
|
|
|
/**
|
|
|
|
* Parse the RTE environmental variables
|
|
|
|
*
|
|
|
|
* Checks the environmental variables and passes their info (where
|
2004-09-11 12:56:52 +00:00
|
|
|
* set) into the respective info structures. Sets ALL Open MPI
|
|
|
|
* default values in universe, process, and system structures.
|
2004-09-10 03:21:03 +00:00
|
|
|
*
|
|
|
|
* @param None
|
|
|
|
*
|
|
|
|
* @retval None
|
|
|
|
*/
|
2004-10-22 16:06:05 +00:00
|
|
|
OMPI_DECLSPEC void ompi_rte_parse_environ(void);
|
2004-09-10 03:21:03 +00:00
|
|
|
|
2004-09-14 14:21:04 +00:00
|
|
|
|
|
|
|
/**
|
2004-12-03 21:05:22 +00:00
|
|
|
* Register on the virtual machine segment.
|
2004-09-14 14:21:04 +00:00
|
|
|
*/
|
2004-12-03 21:05:22 +00:00
|
|
|
OMPI_DECLSPEC int ompi_rte_vm_register(void);
|
2004-09-14 14:21:04 +00:00
|
|
|
|
2004-11-20 19:12:43 +00:00
|
|
|
/**
|
|
|
|
* Startup a job - notify processes that all ready to begin
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int ompi_rte_job_startup(mca_ns_base_jobid_t jobid);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Shutdown a job - notify processes that all ready to stop
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int ompi_rte_job_shutdown(mca_ns_base_jobid_t jobid);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Complete initialization of the RTE
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int ompi_rte_init_cleanup(void);
|
2004-09-14 14:21:04 +00:00
|
|
|
|
2005-01-13 15:30:49 +00:00
|
|
|
/**
|
|
|
|
* Setup I/O forwarding.
|
|
|
|
*/
|
|
|
|
OMPI_DECLSPEC int ompi_rte_init_io(void);
|
|
|
|
|
2004-10-20 22:31:03 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
2004-01-15 04:47:20 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2004-06-07 15:33:53 +00:00
|
|
|
#endif /* OMPI_RUNTIME_H */
|