Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 09:08:07

0001 /*
0002  * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
0003  *                         University Research and Technology
0004  *                         Corporation.  All rights reserved.
0005  * Copyright (c) 2004-2006 The University of Tennessee and The University
0006  *                         of Tennessee Research Foundation.  All rights
0007  *                         reserved.
0008  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
0009  *                         University of Stuttgart.  All rights reserved.
0010  * Copyright (c) 2004-2005 The Regents of the University of California.
0011  *                         All rights reserved.
0012  * Copyright (c) 2011-2013 Los Alamos National Security, LLC.
0013  *                         All rights reserved.
0014  * Copyright (c) 2017-2020 Intel, Inc.  All rights reserved.
0015  * Copyright (c) 2017-2019 Research Organization for Information Science
0016  *                         and Technology (RIST).  All rights reserved.
0017  * Copyright (c) 2020      Cisco Systems, Inc.  All rights reserved
0018  * Copyright (c) 2021-2025 Nanook Consulting  All rights reserved.
0019  * $COPYRIGHT$
0020  *
0021  * Additional copyrights may follow
0022  *
0023  * $HEADER$
0024  */
0025 /** @file:
0026  */
0027 
0028 #ifndef MCA_PLM_PRIVATE_H
0029 #define MCA_PLM_PRIVATE_H
0030 
0031 /*
0032  * includes
0033  */
0034 #include "prte_config.h"
0035 #include "types.h"
0036 
0037 #ifdef HAVE_SYS_TIME_H
0038 #    include <sys/time.h>
0039 #endif /* HAVE_SYS_TIME_H */
0040 
0041 #include "src/class/pmix_list.h"
0042 #include "src/class/pmix_pointer_array.h"
0043 #include "src/mca/base/pmix_mca_base_framework.h"
0044 
0045 #include "src/mca/odls/odls_types.h"
0046 #include "src/mca/plm/plm_types.h"
0047 #include "src/rml/rml_types.h"
0048 #include "src/runtime/prte_globals.h"
0049 
0050 BEGIN_C_DECLS
0051 
0052 PRTE_EXPORT extern pmix_mca_base_framework_t prte_plm_base_framework;
0053 
0054 /* globals for use solely within PLM framework */
0055 typedef struct {
0056     /* base nspace for this DVM */
0057     char *base_nspace;
0058     /* next jobid */
0059     uint32_t next_jobid;
0060     /* time when daemons started launch */
0061     struct timeval daemonlaunchstart;
0062     /* tree spawn cmd */
0063     pmix_data_buffer_t tree_spawn_cmd;
0064     /* daemon nodes assigned at launch */
0065     bool daemon_nodes_assigned_at_launch;
0066     size_t node_regex_threshold;
0067     pmix_list_t daemon_cache;
0068     bool daemon1_has_reported;
0069 } prte_plm_globals_t;
0070 /**
0071  * Global instance of PLM framework data
0072  */
0073 PRTE_EXPORT extern prte_plm_globals_t prte_plm_globals;
0074 
0075 /**
0076  * Utility routine to set progress engine schedule
0077  */
0078 PRTE_EXPORT int prte_plm_base_set_progress_sched(int sched);
0079 
0080 /*
0081  * Launch support
0082  */
0083 PRTE_EXPORT void prte_plm_base_daemon_callback(int status, pmix_proc_t *sender,
0084                                                pmix_data_buffer_t *buffer, prte_rml_tag_t tag,
0085                                                void *cbdata);
0086 PRTE_EXPORT void prte_plm_base_daemon_failed(int status, pmix_proc_t *sender,
0087                                              pmix_data_buffer_t *buffer, prte_rml_tag_t tag,
0088                                              void *cbdata);
0089 PRTE_EXPORT void prte_plm_base_daemon_topology(int status, pmix_proc_t *sender,
0090                                                pmix_data_buffer_t *buffer, prte_rml_tag_t tag,
0091                                                void *cbdata);
0092 
0093 PRTE_EXPORT int prte_plm_base_create_jobid(prte_job_t *jdata);
0094 PRTE_EXPORT int prte_plm_base_set_hnp_name(void);
0095 PRTE_EXPORT void prte_plm_base_reset_job(prte_job_t *jdata);
0096 PRTE_EXPORT int prte_plm_base_setup_prted_cmd(int *argc, char ***argv);
0097 PRTE_EXPORT void prte_plm_base_check_all_complete(int fd, short args, void *cbdata);
0098 PRTE_EXPORT int prte_plm_base_setup_virtual_machine(prte_job_t *jdata);
0099 
0100 /**
0101  * Utilities for plm components that use proxy daemons
0102  */
0103 PRTE_EXPORT int prte_plm_base_prted_exit(prte_daemon_cmd_flag_t command);
0104 PRTE_EXPORT int prte_plm_base_prted_terminate_job(pmix_nspace_t jobid);
0105 PRTE_EXPORT int prte_plm_base_prted_kill_local_procs(pmix_pointer_array_t *procs);
0106 PRTE_EXPORT int prte_plm_base_prted_signal_local_procs(pmix_nspace_t job, int32_t signal);
0107 
0108 /*
0109  * communications utilities
0110  */
0111 PRTE_EXPORT int prte_plm_base_comm_start(void);
0112 PRTE_EXPORT int prte_plm_base_comm_stop(void);
0113 PRTE_EXPORT void prte_plm_base_recv(int status, pmix_proc_t *sender, pmix_data_buffer_t *buffer,
0114                                     prte_rml_tag_t tag, void *cbdata);
0115 
0116 /**
0117  * Construct basic PRTE Daemon command line arguments
0118  */
0119 PRTE_EXPORT int prte_plm_base_prted_append_basic_args(int *argc, char ***argv, char *ess_module,
0120                                                       int *proc_vpid_index);
0121 
0122 /*
0123  * Proxy functions for use by daemons and application procs
0124  * needing dynamic operations
0125  */
0126 PRTE_EXPORT int prte_plm_proxy_init(void);
0127 PRTE_EXPORT int prte_plm_proxy_spawn(prte_job_t *jdata);
0128 PRTE_EXPORT int prte_plm_proxy_finalize(void);
0129 
0130 END_C_DECLS
0131 
0132 #endif /* MCA_PLS_PRIVATE_H */