2006-08-10 21:46:52 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 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.
|
2007-06-13 17:11:37 +00:00
|
|
|
* Copyright (c) 2006-2007 Sun Microsystems, Inc. All rights reserved.
|
2006-08-10 21:46:52 +00:00
|
|
|
* Use is subject to license terms.
|
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file:
|
|
|
|
* Process launcher for the Grid Engine
|
|
|
|
*
|
2007-06-13 17:23:03 +00:00
|
|
|
* See FAQ on how it works:
|
|
|
|
* http://www.open-mpi.org/faq/?category=running#run-n1ge-or-sge
|
2006-08-10 21:46:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ORTE_PLS_GRIDENGINE_EXPORT_H
|
|
|
|
#define ORTE_PLS_GRIDENGINE_EXPORT_H
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
2007-01-25 14:17:44 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_SYS_TIME_H
|
|
|
|
#include <sys/time.h>
|
|
|
|
#endif
|
|
|
|
|
2006-08-10 21:46:52 +00:00
|
|
|
#include "orte/mca/pls/pls.h"
|
|
|
|
#include "opal/mca/mca.h"
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Module open / close
|
|
|
|
*/
|
|
|
|
int orte_pls_gridengine_component_open(void);
|
|
|
|
int orte_pls_gridengine_component_close(void);
|
|
|
|
orte_pls_base_module_t* orte_pls_gridengine_component_init(int *priority);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Startup / Shutdown
|
|
|
|
*/
|
|
|
|
int orte_pls_gridengine_finalize(void);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Interface
|
|
|
|
*/
|
2006-09-14 21:29:51 +00:00
|
|
|
int orte_pls_gridengine_launch_job(orte_jobid_t);
|
2007-01-25 14:17:44 +00:00
|
|
|
int orte_pls_gridengine_terminate_job(orte_jobid_t, struct timeval *timeout, opal_list_t *attrs);
|
2007-04-25 11:51:18 +00:00
|
|
|
int orte_pls_gridengine_terminate_orteds(struct timeval *timeout, opal_list_t *attrs);
|
2006-08-10 21:46:52 +00:00
|
|
|
int orte_pls_gridengine_terminate_proc(const orte_process_name_t*);
|
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_gridengine_signal_job(orte_jobid_t, int32_t, opal_list_t *attrs);
|
2006-08-10 21:46:52 +00:00
|
|
|
int orte_pls_gridengine_signal_proc(const orte_process_name_t*, int32_t);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PLS Component
|
|
|
|
*/
|
|
|
|
struct orte_pls_gridengine_component_t {
|
|
|
|
orte_pls_base_component_t super;
|
2007-06-13 17:11:37 +00:00
|
|
|
bool debug;
|
|
|
|
bool verbose;
|
|
|
|
bool daemonize_orted;
|
2006-08-10 21:46:52 +00:00
|
|
|
int priority;
|
|
|
|
char* orted;
|
|
|
|
};
|
|
|
|
typedef struct orte_pls_gridengine_component_t orte_pls_gridengine_component_t;
|
|
|
|
|
2006-08-23 20:40:01 +00:00
|
|
|
ORTE_MODULE_DECLSPEC extern orte_pls_gridengine_component_t mca_pls_gridengine_component;
|
|
|
|
extern orte_pls_base_module_t orte_pls_gridengine_module;
|
2006-08-10 21:46:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* ORTE_PLS_GRIDENGINE_EXPORT_H */
|