2015-03-06 06:50:44 +03:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2008-02-28 04:57:57 +03:00
|
|
|
/*
|
2008-05-06 22:08:45 +04:00
|
|
|
* Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
|
2008-02-28 04:57:57 +03:00
|
|
|
* 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.
|
2015-03-06 06:50:44 +03:00
|
|
|
* Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights
|
|
|
|
* reserved.
|
2017-12-21 11:30:45 +03:00
|
|
|
* Copyright (c) 2017 Research Organization for Information Science
|
|
|
|
* and Technology (RIST). All rights reserved.
|
2008-02-28 04:57:57 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/** @file:
|
|
|
|
*
|
|
|
|
* The Process Lifecycle Management (PLM) subsystem serves as the central
|
|
|
|
* switchyard for all process management activities, including
|
|
|
|
* resource allocation, process mapping, process launch, and process
|
|
|
|
* monitoring.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ORTE_PLM_H
|
|
|
|
#define ORTE_PLM_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* includes
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "orte_config.h"
|
|
|
|
#include "orte/types.h"
|
|
|
|
|
2015-03-06 06:50:44 +03:00
|
|
|
#include "orte/mca/mca.h"
|
2008-04-14 22:26:08 +04:00
|
|
|
#include "opal/dss/dss_types.h"
|
2009-07-13 06:29:17 +04:00
|
|
|
#include "opal/class/opal_pointer_array.h"
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
#include "orte/runtime/orte_globals.h"
|
|
|
|
|
|
|
|
#include "plm_types.h"
|
|
|
|
|
|
|
|
BEGIN_C_DECLS
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Component functions - all MUST be provided
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* allow the selected module to initialize
|
|
|
|
*/
|
|
|
|
typedef int (*orte_plm_base_module_init_fn_t)(void);
|
|
|
|
|
|
|
|
/*
|
2012-04-06 18:23:13 +04:00
|
|
|
* Spawn a job - this is a non-blocking function!
|
2008-02-28 04:57:57 +03:00
|
|
|
*/
|
|
|
|
typedef int (*orte_plm_base_module_spawn_fn_t)(orte_job_t *jdata);
|
|
|
|
|
2008-04-14 22:26:08 +04:00
|
|
|
/*
|
|
|
|
* Remote spawn - spawn called by a daemon to launch a process on its own
|
|
|
|
*/
|
2017-12-21 11:30:45 +03:00
|
|
|
typedef int (*orte_plm_base_module_remote_spawn_fn_t)(void);
|
2008-04-14 22:26:08 +04:00
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
/*
|
|
|
|
* Entry point to set the HNP name
|
|
|
|
*/
|
|
|
|
typedef int (*orte_plm_base_module_set_hnp_name_fn_t)(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Cleanup resources held by module.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef int (*orte_plm_base_module_finalize_fn_t)(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Terminate any processes launched for the respective jobid by
|
|
|
|
* this component.
|
|
|
|
*/
|
|
|
|
typedef int (*orte_plm_base_module_terminate_job_fn_t)(orte_jobid_t);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Terminate the daemons
|
|
|
|
*/
|
|
|
|
typedef int (*orte_plm_base_module_terminate_orteds_fn_t)(void);
|
|
|
|
|
|
|
|
/**
|
2009-07-13 06:29:17 +04:00
|
|
|
* Terminate an array of specific procs
|
|
|
|
*/
|
|
|
|
typedef int (*orte_plm_base_module_terminate_procs_fn_t)(opal_pointer_array_t *procs);
|
2015-06-24 06:59:57 +03:00
|
|
|
|
2009-07-13 06:29:17 +04:00
|
|
|
/**
|
2008-02-28 04:57:57 +03:00
|
|
|
* Signal any processes launched for the respective jobid by
|
|
|
|
* this component.
|
|
|
|
*/
|
|
|
|
typedef int (*orte_plm_base_module_signal_job_fn_t)(orte_jobid_t, int32_t);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* plm module version 1.0.0
|
|
|
|
*/
|
|
|
|
struct orte_plm_base_module_1_0_0_t {
|
|
|
|
orte_plm_base_module_init_fn_t init;
|
|
|
|
orte_plm_base_module_set_hnp_name_fn_t set_hnp_name;
|
|
|
|
orte_plm_base_module_spawn_fn_t spawn;
|
2008-04-14 22:26:08 +04:00
|
|
|
orte_plm_base_module_remote_spawn_fn_t remote_spawn;
|
2008-02-28 04:57:57 +03:00
|
|
|
orte_plm_base_module_terminate_job_fn_t terminate_job;
|
|
|
|
orte_plm_base_module_terminate_orteds_fn_t terminate_orteds;
|
2009-07-13 06:29:17 +04:00
|
|
|
orte_plm_base_module_terminate_procs_fn_t terminate_procs;
|
2008-02-28 04:57:57 +03:00
|
|
|
orte_plm_base_module_signal_job_fn_t signal_job;
|
|
|
|
orte_plm_base_module_finalize_fn_t finalize;
|
|
|
|
};
|
|
|
|
|
|
|
|
/** shorten orte_plm_base_module_1_0_0_t declaration */
|
|
|
|
typedef struct orte_plm_base_module_1_0_0_t orte_plm_base_module_1_0_0_t;
|
|
|
|
/** shorten orte_plm_base_module_t declaration */
|
|
|
|
typedef struct orte_plm_base_module_1_0_0_t orte_plm_base_module_t;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2008-07-29 02:40:57 +04:00
|
|
|
* plm component
|
2008-02-28 04:57:57 +03:00
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
struct orte_plm_base_component_2_0_0_t {
|
2008-02-28 04:57:57 +03:00
|
|
|
/** component version */
|
2008-05-06 22:08:45 +04:00
|
|
|
mca_base_component_t base_version;
|
2008-02-28 04:57:57 +03:00
|
|
|
/** component data */
|
2008-07-29 02:40:57 +04:00
|
|
|
mca_base_component_data_t base_data;
|
2008-02-28 04:57:57 +03:00
|
|
|
};
|
|
|
|
/** Convenience typedef */
|
2008-07-29 02:40:57 +04:00
|
|
|
typedef struct orte_plm_base_component_2_0_0_t orte_plm_base_component_2_0_0_t;
|
2008-02-28 04:57:57 +03:00
|
|
|
/** Convenience typedef */
|
2008-07-29 02:40:57 +04:00
|
|
|
typedef orte_plm_base_component_2_0_0_t orte_plm_base_component_t;
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2008-07-29 02:40:57 +04:00
|
|
|
* Macro for use in modules that are of type plm
|
2008-02-28 04:57:57 +03:00
|
|
|
*/
|
2008-07-29 02:40:57 +04:00
|
|
|
#define ORTE_PLM_BASE_VERSION_2_0_0 \
|
2015-03-06 06:50:44 +03:00
|
|
|
ORTE_MCA_BASE_VERSION_2_1_0("plm", 2, 0, 0)
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
/* Global structure for accessing PLM functions */
|
|
|
|
ORTE_DECLSPEC extern orte_plm_base_module_t orte_plm; /* holds selected module's function pointers */
|
|
|
|
|
|
|
|
END_C_DECLS
|
|
|
|
|
|
|
|
#endif
|