Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:47:30

0001 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
0002 /*
0003  * Copyright (c) 2004-2008 The Trustees of Indiana University and Indiana
0004  *                         University Research and Technology
0005  *                         Corporation.  All rights reserved.
0006  * Copyright (c) 2004-2006 The University of Tennessee and The University
0007  *                         of Tennessee Research Foundation.  All rights
0008  *                         reserved.
0009  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
0010  *                         University of Stuttgart.  All rights reserved.
0011  * Copyright (c) 2004-2005 The Regents of the University of California.
0012  *                         All rights reserved.
0013  * Copyright (c) 2011-2015 Los Alamos National Security, LLC. All rights
0014  *                         reserved.
0015  * Copyright (c) 2017      Research Organization for Information Science
0016  *                         and Technology (RIST). All rights reserved.
0017  * Copyright (c) 2018-2019 Intel, Inc.  All rights reserved.
0018  * Copyright (c) 2020      Cisco Systems, Inc.  All rights reserved
0019  * Copyright (c) 2021-2022 Nanook Consulting.  All rights reserved.
0020  * $COPYRIGHT$
0021  *
0022  * Additional copyrights may follow
0023  *
0024  * $HEADER$
0025  */
0026 /** @file:
0027  *
0028  * The Process Lifecycle Management (PLM) subsystem serves as the central
0029  * switchyard for all process management activities, including
0030  * resource allocation, process mapping, process launch, and process
0031  * monitoring.
0032  */
0033 
0034 #ifndef PRTE_PLM_H
0035 #define PRTE_PLM_H
0036 
0037 /*
0038  * includes
0039  */
0040 
0041 #include "prte_config.h"
0042 #include "types.h"
0043 
0044 #include "src/class/pmix_pointer_array.h"
0045 #include "src/mca/mca.h"
0046 #include "src/pmix/pmix-internal.h"
0047 #include "src/runtime/prte_globals.h"
0048 
0049 #include "plm_types.h"
0050 
0051 BEGIN_C_DECLS
0052 
0053 /*
0054  * Component functions - all MUST be provided
0055  */
0056 
0057 /*
0058  * allow the selected module to initialize
0059  */
0060 typedef int (*prte_plm_base_module_init_fn_t)(void);
0061 
0062 /*
0063  * Spawn a job - this is a non-blocking function!
0064  */
0065 typedef int (*prte_plm_base_module_spawn_fn_t)(prte_job_t *jdata);
0066 
0067 /*
0068  * Remote spawn - spawn called by a daemon to launch a process on its own
0069  */
0070 typedef int (*prte_plm_base_module_remote_spawn_fn_t)(void);
0071 
0072 /*
0073  * Entry point to set the HNP name
0074  */
0075 typedef int (*prte_plm_base_module_set_hnp_name_fn_t)(void);
0076 
0077 /**
0078  * Cleanup resources held by module.
0079  */
0080 
0081 typedef int (*prte_plm_base_module_finalize_fn_t)(void);
0082 
0083 /**
0084  * Terminate any processes launched for the respective jobid by
0085  * this component.
0086  */
0087 typedef int (*prte_plm_base_module_terminate_job_fn_t)(pmix_nspace_t);
0088 
0089 /**
0090  * Terminate the daemons
0091  */
0092 typedef int (*prte_plm_base_module_terminate_orteds_fn_t)(void);
0093 
0094 /**
0095  * Terminate an array of specific procs
0096  */
0097 typedef int (*prte_plm_base_module_terminate_procs_fn_t)(pmix_pointer_array_t *procs);
0098 
0099 /**
0100  * Signal any processes launched for the respective jobid by
0101  * this component.
0102  */
0103 typedef int (*prte_plm_base_module_signal_job_fn_t)(pmix_nspace_t, int32_t);
0104 
0105 /**
0106  * plm module version 1.0.0
0107  */
0108 struct prte_plm_base_module_1_0_0_t {
0109     prte_plm_base_module_init_fn_t init;
0110     prte_plm_base_module_set_hnp_name_fn_t set_hnp_name;
0111     prte_plm_base_module_spawn_fn_t spawn;
0112     prte_plm_base_module_remote_spawn_fn_t remote_spawn;
0113     prte_plm_base_module_terminate_job_fn_t terminate_job;
0114     prte_plm_base_module_terminate_orteds_fn_t terminate_orteds;
0115     prte_plm_base_module_terminate_procs_fn_t terminate_procs;
0116     prte_plm_base_module_signal_job_fn_t signal_job;
0117     prte_plm_base_module_finalize_fn_t finalize;
0118 };
0119 
0120 /** shprten prte_plm_base_module_1_0_0_t declaration */
0121 typedef struct prte_plm_base_module_1_0_0_t prte_plm_base_module_1_0_0_t;
0122 /** shprten prte_plm_base_module_t declaration */
0123 typedef struct prte_plm_base_module_1_0_0_t prte_plm_base_module_t;
0124 
0125 /**
0126  * plm component
0127  */
0128 typedef pmix_mca_base_component_t prte_plm_base_component_t;
0129 
0130 /**
0131  * Macro for use in modules that are of type plm
0132  */
0133 #define PRTE_PLM_BASE_VERSION_2_0_0 PRTE_MCA_BASE_VERSION_3_0_0("plm", 2, 0, 0)
0134 
0135 /* Global structure for accessing PLM functions */
0136 PRTE_EXPORT extern prte_plm_base_module_t prte_plm; /* holds selected module's function pointers */
0137 
0138 END_C_DECLS
0139 
0140 #endif