2005-03-14 23:57:21 +03:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* 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.
|
2006-06-08 22:27:17 +04:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2005-03-14 23:57:21 +03:00
|
|
|
* 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.
|
2005-03-14 23:57:21 +03:00
|
|
|
* $COPYRIGHT$
|
2006-06-08 22:27:17 +04:00
|
|
|
*
|
2005-03-14 23:57:21 +03:00
|
|
|
* Additional copyrights may follow
|
2006-06-08 22:27:17 +04:00
|
|
|
*
|
2005-03-14 23:57:21 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
2005-08-22 22:02:10 +04:00
|
|
|
/**
|
|
|
|
* @file:
|
|
|
|
* Part of the rsh launcher. See pls_rsh.h for an overview of how it works.
|
|
|
|
*/
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
#ifndef ORTE_PLS_RSH_EXPORT_H
|
|
|
|
#define ORTE_PLS_RSH_EXPORT_H
|
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte_config.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
2007-01-25 17:17:44 +03:00
|
|
|
#ifdef HAVE_SYS_TIME_H
|
|
|
|
#include <sys/time.h>
|
|
|
|
#endif
|
|
|
|
|
2005-07-04 02:45:48 +04:00
|
|
|
#include "opal/threads/condition.h"
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "opal/mca/mca.h"
|
2007-01-25 17:17:44 +03:00
|
|
|
|
2006-02-12 04:33:29 +03:00
|
|
|
#include "orte/mca/pls/pls.h"
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Module open / close
|
|
|
|
*/
|
|
|
|
int orte_pls_rsh_component_open(void);
|
|
|
|
int orte_pls_rsh_component_close(void);
|
|
|
|
orte_pls_base_module_t* orte_pls_rsh_component_init(int *priority);
|
2005-08-30 10:58:37 +04:00
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/*
|
|
|
|
* Startup / Shutdown
|
|
|
|
*/
|
|
|
|
int orte_pls_rsh_finalize(void);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Interface
|
|
|
|
*/
|
|
|
|
int orte_pls_rsh_launch(orte_jobid_t);
|
2007-01-25 17:17:44 +03:00
|
|
|
int orte_pls_rsh_terminate_job(orte_jobid_t, struct timeval *timeout, opal_list_t*);
|
2007-04-25 00:53:54 +04:00
|
|
|
int orte_pls_rsh_terminate_orteds(struct timeval *timeout, opal_list_t*);
|
2005-03-14 23:57:21 +03:00
|
|
|
int orte_pls_rsh_terminate_proc(const orte_process_name_t* proc_name);
|
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
|
|
|
int orte_pls_rsh_signal_job(orte_jobid_t, int32_t, opal_list_t*);
|
2006-06-08 22:27:17 +04:00
|
|
|
int orte_pls_rsh_signal_proc(const orte_process_name_t* proc_name, int32_t);
|
|
|
|
|
2005-03-14 23:57:21 +03:00
|
|
|
/**
|
|
|
|
* PLS Component
|
|
|
|
*/
|
|
|
|
struct orte_pls_rsh_component_t {
|
|
|
|
orte_pls_base_component_t super;
|
2005-08-04 19:09:02 +04:00
|
|
|
bool debug;
|
2006-10-24 19:59:02 +04:00
|
|
|
bool debug_daemons;
|
Bring the timing instrumentation to the trunk.
If you want to look at our launch and MPI process startup times, you can do so with two MCA params:
OMPI_MCA_orte_timing: set it to anything non-zero and you will get the launch time for different steps in the job launch procedure. The degree of detail depends on the launch environment. rsh will provide you with the average, min, and max launch time for the daemons. SLURM block launches the daemon, so you only get the time to launch the daemons and the total time to launch the job. Ditto for bproc. TM looks more like rsh. Only those four environments are currently supported - anyone interested in extending this capability to other environs is welcome to do so. In all cases, you also get the time to setup the job for launch.
OMPI_MCA_ompi_timing: set it to anything non-zero and you will get the time for mpi_init to reach the compound registry command, the time to execute that command, the time to go from our stage1 barrier to the stage2 barrier, and the time to go from the stage2 barrier to the end of mpi_init. This will be output for each process, so you'll have to compile any statistics on your own. Note: if someone develops a nice parser to do so, it would be really appreciated if you could/would share!
This commit was SVN r12302.
2006-10-25 19:27:47 +04:00
|
|
|
bool timing;
|
2005-08-04 19:09:02 +04:00
|
|
|
bool assume_same_shell;
|
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
|
|
|
bool force_rsh;
|
2005-03-18 06:43:59 +03:00
|
|
|
int delay;
|
2005-03-14 23:57:21 +03:00
|
|
|
int priority;
|
2005-12-22 17:37:19 +03:00
|
|
|
char *agent_param;
|
|
|
|
char** agent_argv;
|
|
|
|
int agent_argc;
|
|
|
|
char* agent_path;
|
2005-03-14 23:57:21 +03:00
|
|
|
char* orted;
|
2006-10-24 20:40:49 +04:00
|
|
|
orte_std_cntr_t num_children;
|
|
|
|
orte_std_cntr_t num_concurrent;
|
2005-07-04 02:45:48 +04:00
|
|
|
opal_mutex_t lock;
|
|
|
|
opal_condition_t cond;
|
2005-03-14 23:57:21 +03:00
|
|
|
};
|
|
|
|
typedef struct orte_pls_rsh_component_t orte_pls_rsh_component_t;
|
2005-08-30 10:58:37 +04:00
|
|
|
|
2006-08-23 07:32:36 +04:00
|
|
|
ORTE_MODULE_DECLSPEC extern orte_pls_rsh_component_t mca_pls_rsh_component;
|
|
|
|
extern orte_pls_base_module_t orte_pls_rsh_module;
|
2005-03-14 23:57:21 +03:00
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* ORTE_PLS_RSH_EXPORT_H */
|