2006-09-14 21:29:51 +00: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_PLS_PRIVATE_H
|
|
|
|
#define MCA_PLS_PRIVATE_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* includes
|
|
|
|
*/
|
|
|
|
#include "orte_config.h"
|
|
|
|
|
|
|
|
#include "opal/class/opal_list.h"
|
|
|
|
|
|
|
|
#include "orte/dss/dss_types.h"
|
|
|
|
#include "orte/mca/gpr/gpr_types.h"
|
|
|
|
#include "orte/mca/ns/ns_types.h"
|
|
|
|
#include "orte/mca/ras/ras_types.h"
|
|
|
|
#include "orte/mca/rmgr/rmgr_types.h"
|
|
|
|
#include "orte/mca/rml/rml_types.h"
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* pls proxy commands
|
|
|
|
*/
|
|
|
|
typedef uint8_t orte_pls_cmd_flag_t;
|
|
|
|
#define ORTE_PLS_CMD ORTE_UINT8
|
|
|
|
#define ORTE_PLS_LAUNCH_JOB_CMD 1
|
|
|
|
#define ORTE_PLS_TERMINATE_JOB_CMD 2
|
|
|
|
#define ORTE_PLS_TERMINATE_PROC_CMD 3
|
|
|
|
#define ORTE_PLS_SIGNAL_JOB_CMD 4
|
|
|
|
#define ORTE_PLS_SIGNAL_PROC_CMD 5
|
|
|
|
#define ORTE_PLS_TERMINATE_ORTEDS_CMD 6
|
|
|
|
|
|
|
|
/*
|
|
|
|
* object for daemon information
|
|
|
|
*/
|
|
|
|
typedef struct orte_pls_daemon_info_t {
|
|
|
|
opal_list_item_t super;
|
|
|
|
orte_cellid_t cell;
|
|
|
|
char *nodename;
|
|
|
|
orte_process_name_t *name;
|
|
|
|
orte_jobid_t active_job;
|
|
|
|
} orte_pls_daemon_info_t;
|
|
|
|
OBJ_CLASS_DECLARATION(orte_pls_daemon_info_t);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Utility routine to set progress engine schedule
|
|
|
|
*/
|
|
|
|
ORTE_DECLSPEC int orte_pls_base_set_progress_sched(int sched);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Utilities for pls components that use proxy daemons
|
|
|
|
*/
|
|
|
|
int orte_pls_base_orted_exit(opal_list_t *daemons);
|
|
|
|
int orte_pls_base_orted_kill_local_procs(opal_list_t *daemons, orte_jobid_t job);
|
|
|
|
int orte_pls_base_orted_signal_local_procs(opal_list_t *daemons, int32_t signal);
|
|
|
|
int orte_pls_base_orted_add_local_procs(opal_list_t *daemons, orte_gpr_notify_data_t *ndat);
|
|
|
|
|
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 19:34:59 +00:00
|
|
|
int orte_pls_base_get_active_daemons(opal_list_t *daemons, orte_jobid_t job, opal_list_t *attrs);
|
2006-10-07 15:45:24 +00:00
|
|
|
int orte_pls_base_store_active_daemons(opal_list_t *daemons);
|
|
|
|
int orte_pls_base_remove_daemon(orte_pls_daemon_info_t *info);
|
|
|
|
|
2006-09-14 21:29:51 +00:00
|
|
|
/*
|
|
|
|
* communications utilities
|
|
|
|
*/
|
|
|
|
int orte_pls_base_comm_start(void);
|
|
|
|
int orte_pls_base_comm_stop(void);
|
|
|
|
void orte_pls_base_recv(int status, orte_process_name_t* sender,
|
|
|
|
orte_buffer_t* buffer, orte_rml_tag_t tag,
|
|
|
|
void* cbdata);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* general utilities
|
|
|
|
*/
|
|
|
|
int orte_pls_base_mca_argv(int *argc, char ***argv);
|
2006-10-20 16:50:13 +00:00
|
|
|
void orte_pls_base_purge_mca_params(char ***env);
|
2006-09-14 21:29:51 +00:00
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|