
1. add a "cancel_operation" API to the pls components that allows orterun to demand that an orted operation (e.g., terminate_job) be immediately cancelled and abandoned. 2. changes the pls orted commands from blocking to non-blocking. This allows us to interrupt those operations should an orted be non-responsive. The change also adds an orte_abort_timeout that limits how long orterun will automatically wait for the orteds to respond - if the terminate command, for example, doesn't see orted response within that time, then we printout an appropriate error message and just give up. 3. modifies orterun to allow multiple ctrl-c's to simply abort the program even if the orteds have not responded 4. does some cleanup on the orte-level mca params so that their implementation looks a lot more like that of ompi - makes it easier to maintain. This change also includes the definition of an orte_abort_timeout struct and associated MCA param (can't have too many!) so you can set the time after which orterun gives up on waiting for orteds to respond This needs more testing before migrating to 1.2. This commit was SVN r13304.
105 строки
3.2 KiB
C
105 строки
3.2 KiB
C
/* -*- C -*-
|
|
*
|
|
* 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-2006 The Regents of the University of California.
|
|
* All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*
|
|
*
|
|
*/
|
|
/**
|
|
* @file:
|
|
* Header file for the xcpu launcher. This will use xcpu to launch jobs on
|
|
* the list of nodes that it will get from RAS (resource allocation
|
|
* system
|
|
* -# pls_xcpu is called by orterun. It first setsup environment for the
|
|
* process to be launched on remote node, then reads the ompi registry and
|
|
* then launch the binary on the nodes specified in the registry.
|
|
*/
|
|
|
|
#ifndef orte_pls_xcpu_H_
|
|
#define orte_pls_xcpu_H_
|
|
|
|
#include "orte_config.h"
|
|
|
|
#ifdef HAVE_SYS_TIME_H
|
|
#include <sys/time.h>
|
|
#endif
|
|
|
|
#include "orte/class/orte_pointer_array.h"
|
|
#include "orte/orte_constants.h"
|
|
#include "orte/mca/pls/base/base.h"
|
|
#include "orte/util/proc_info.h"
|
|
#include "opal/threads/condition.h"
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
* Module open / close -- defined in component file
|
|
*/
|
|
int orte_pls_xcpu_component_open(void);
|
|
int orte_pls_xcpu_component_close(void);
|
|
|
|
/*
|
|
* Startup / Shutdown
|
|
*/
|
|
orte_pls_base_module_t* orte_pls_xcpu_init(int *priority); /* in component file */
|
|
|
|
/*
|
|
* Interface
|
|
*/
|
|
int orte_pls_xcpu_launch_job(orte_jobid_t);
|
|
int orte_pls_xcpu_terminate_job(orte_jobid_t, struct timeval *timeout, opal_list_t *);
|
|
int orte_pls_xcpu_terminate_orteds(orte_jobid_t jobid, struct timeval *timeout, opal_list_t * attrs);
|
|
int orte_pls_xcpu_terminate_proc(const orte_process_name_t* proc_name);
|
|
int orte_pls_xcpu_signal_job(orte_jobid_t jobid, int32_t sig, opal_list_t*);
|
|
int orte_pls_xcpu_signal_proc(const orte_process_name_t* proc_name, int32_t sig);
|
|
int orte_pls_xcpu_cancel_operation(void);
|
|
int orte_pls_xcpu_finalize(void);
|
|
|
|
void orte_pls_xcpu_close_sessions(void);
|
|
|
|
/**
|
|
* (P)rocess (L)aunch (S)ubsystem xcpu Component
|
|
*/
|
|
struct orte_pls_xcpu_component_t {
|
|
orte_pls_base_component_t super;
|
|
|
|
int debug;
|
|
/* If greater than 0 print debugging information */
|
|
int priority;
|
|
/* The priority of this component. This will be returned if
|
|
* we determine that xcpu is available and running on this node,
|
|
*/
|
|
int terminate_sig;
|
|
/* The signal that gets sent to a process to kill it. */
|
|
opal_mutex_t lock;
|
|
/* Lock used to prevent some race conditions */
|
|
opal_condition_t condition;
|
|
/* Condition that is signaled when all the daemons have died */
|
|
int chatty;
|
|
};
|
|
typedef struct orte_pls_xcpu_component_t orte_pls_xcpu_component_t;
|
|
|
|
ORTE_DECLSPEC extern orte_pls_xcpu_component_t mca_pls_xcpu_component;
|
|
ORTE_DECLSPEC extern orte_pls_base_module_t orte_pls_xcpu_module;
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
}
|
|
#endif
|
|
#endif /* orte_pls_xcpu_H_ */
|
|
|