2006-09-15 01:29:51 +04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2006 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$
|
|
|
|
*/
|
|
|
|
/** @file:
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_ODLS_PRIVATE_H
|
|
|
|
#define MCA_ODLS_PRIVATE_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* includes
|
|
|
|
*/
|
|
|
|
#include "orte_config.h"
|
|
|
|
|
|
|
|
#include "opal/class/opal_list.h"
|
|
|
|
|
|
|
|
#include "orte/dss/dss_types.h"
|
|
|
|
#include "orte/mca/ns/ns_types.h"
|
|
|
|
#include "orte/mca/rmgr/rmgr_types.h"
|
2006-11-11 07:03:45 +03:00
|
|
|
#include "orte/mca/smr/smr_types.h"
|
2006-09-15 01:29:51 +04:00
|
|
|
|
|
|
|
#include "orte/mca/odls/odls_types.h"
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* General ODLS types
|
|
|
|
*/
|
2006-11-11 07:03:45 +03:00
|
|
|
|
|
|
|
/*
|
|
|
|
* List object to locally store the process names and pids of
|
|
|
|
* our children. This can subsequently be used to order termination
|
|
|
|
* or pass signals without looking the info up again.
|
|
|
|
*/
|
|
|
|
typedef struct orte_odls_child_t {
|
|
|
|
opal_list_item_t super; /* required to place this on a list */
|
|
|
|
orte_process_name_t *name; /* the OpenRTE name of the proc */
|
Compute and pass the local_rank and local number of procs (in that proc's job) on the node.
To be precise, given this hypothetical launching pattern:
host1: vpids 0, 2, 4, 6
host2: vpids 1, 3, 5, 7
The local_rank for these procs would be:
host1: vpids 0->local_rank 0, v2->lr1, v4->lr2, v6->lr3
host2: vpids 1->local_rank 0, v3->lr1, v5->lr2, v7->lr3
and the number of local procs on each node would be four. If vpid=0 then does a comm_spawn of one process on host1, the values of the parent job would remain unchanged. The local_rank of the child process would be 0 and its num_local_procs would be 1 since it is in a separate jobid.
I have verified this functionality for the rsh case - need to verify that slurm and other cases also get the right values. Some consolidation of common code is probably going to occur in the SDS components to make this simpler and more maintainable in the future.
This commit was SVN r14706.
2007-05-21 18:30:10 +04:00
|
|
|
orte_vpid_t local_rank; /* local rank of the proc on this node */
|
|
|
|
orte_std_cntr_t num_procs; /* number of procs from this job on this node */
|
2006-11-11 07:03:45 +03:00
|
|
|
pid_t pid; /* local pid of the proc */
|
|
|
|
orte_std_cntr_t app_idx; /* index of the app_context for this proc */
|
|
|
|
bool alive; /* is this proc alive? */
|
|
|
|
orte_proc_state_t state; /* the state of the process */
|
2007-04-24 22:54:45 +04:00
|
|
|
int exit_code; /* process exit code */
|
2006-11-11 07:03:45 +03:00
|
|
|
} orte_odls_child_t;
|
2007-02-27 12:43:32 +03:00
|
|
|
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_odls_child_t);
|
2006-11-11 07:03:45 +03:00
|
|
|
|
|
|
|
|
2006-09-15 01:29:51 +04:00
|
|
|
typedef struct orte_odls_globals_t {
|
|
|
|
/** Verbose/debug output stream */
|
|
|
|
int output;
|
|
|
|
/** Time to allow process to forcibly die */
|
|
|
|
int timeout_before_sigkill;
|
|
|
|
} orte_odls_globals_t;
|
|
|
|
|
2006-10-06 11:08:17 +04:00
|
|
|
ORTE_DECLSPEC extern orte_odls_globals_t orte_odls_globals;
|
2006-09-15 01:29:51 +04:00
|
|
|
|
2006-11-11 07:03:45 +03:00
|
|
|
ORTE_DECLSPEC int orte_odls_base_report_spawn(opal_list_t *children);
|
|
|
|
|
2006-09-15 01:29:51 +04:00
|
|
|
/*
|
|
|
|
* data type functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
int orte_odls_compare_daemon_cmd(orte_daemon_cmd_flag_t *value1, orte_daemon_cmd_flag_t *value2, orte_data_type_t type);
|
|
|
|
|
|
|
|
int orte_odls_copy_daemon_cmd(orte_daemon_cmd_flag_t **dest, orte_daemon_cmd_flag_t *src, orte_data_type_t type);
|
|
|
|
|
2007-06-13 02:47:14 +04:00
|
|
|
int orte_odls_pack_daemon_cmd(orte_buffer_t *buffer, const void *src,
|
2006-09-15 01:29:51 +04:00
|
|
|
orte_std_cntr_t num_vals, orte_data_type_t type);
|
|
|
|
|
|
|
|
int orte_odls_print_daemon_cmd(char **output, char *prefix, orte_daemon_cmd_flag_t *src, orte_data_type_t type);
|
|
|
|
|
|
|
|
void orte_odls_std_release(orte_data_value_t *value);
|
|
|
|
|
|
|
|
int orte_odls_size_daemon_cmd(size_t *size, orte_daemon_cmd_flag_t *src, orte_data_type_t type);
|
|
|
|
|
|
|
|
int orte_odls_unpack_daemon_cmd(orte_buffer_t *buffer, void *dest,
|
|
|
|
orte_std_cntr_t *num_vals, orte_data_type_t type);
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|