Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 10:12:57

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-2022 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     char **cache;
0070 } prte_plm_globals_t;
0071 /**
0072  * Global instance of PLM framework data
0073  */
0074 PRTE_EXPORT extern prte_plm_globals_t prte_plm_globals;
0075 
0076 /**
0077  * Utility routine to set progress engine schedule
0078  */
0079 PRTE_EXPORT int prte_plm_base_set_progress_sched(int sched);
0080 
0081 /*
0082  * Launch support
0083  */
0084 PRTE_EXPORT void prte_plm_base_daemon_callback(int status, pmix_proc_t *sender,
0085                                                pmix_data_buffer_t *buffer, prte_rml_tag_t tag,
0086                                                void *cbdata);
0087 PRTE_EXPORT void prte_plm_base_daemon_failed(int status, pmix_proc_t *sender,
0088                                              pmix_data_buffer_t *buffer, prte_rml_tag_t tag,
0089                                              void *cbdata);
0090 PRTE_EXPORT void prte_plm_base_daemon_topology(int status, pmix_proc_t *sender,
0091                                                pmix_data_buffer_t *buffer, prte_rml_tag_t tag,
0092                                                void *cbdata);
0093 
0094 PRTE_EXPORT int prte_plm_base_create_jobid(prte_job_t *jdata);
0095 PRTE_EXPORT int prte_plm_base_set_hnp_name(void);
0096 PRTE_EXPORT void prte_plm_base_reset_job(prte_job_t *jdata);
0097 PRTE_EXPORT int prte_plm_base_setup_prted_cmd(int *argc, char ***argv);
0098 PRTE_EXPORT void prte_plm_base_check_all_complete(int fd, short args, void *cbdata);
0099 PRTE_EXPORT int prte_plm_base_setup_virtual_machine(prte_job_t *jdata);
0100 
0101 /**
0102  * Utilities for plm components that use proxy daemons
0103  */
0104 PRTE_EXPORT int prte_plm_base_prted_exit(prte_daemon_cmd_flag_t command);
0105 PRTE_EXPORT int prte_plm_base_prted_terminate_job(pmix_nspace_t jobid);
0106 PRTE_EXPORT int prte_plm_base_prted_kill_local_procs(pmix_pointer_array_t *procs);
0107 PRTE_EXPORT int prte_plm_base_prted_signal_local_procs(pmix_nspace_t job, int32_t signal);
0108 
0109 /*
0110  * communications utilities
0111  */
0112 PRTE_EXPORT int prte_plm_base_comm_start(void);
0113 PRTE_EXPORT int prte_plm_base_comm_stop(void);
0114 PRTE_EXPORT void prte_plm_base_recv(int status, pmix_proc_t *sender, pmix_data_buffer_t *buffer,
0115                                     prte_rml_tag_t tag, void *cbdata);
0116 
0117 /**
0118  * Construct basic PRTE Daemon command line arguments
0119  */
0120 PRTE_EXPORT int prte_plm_base_prted_append_basic_args(int *argc, char ***argv, char *ess_module,
0121                                                       int *proc_vpid_index);
0122 
0123 /*
0124  * Proxy functions for use by daemons and application procs
0125  * needing dynamic operations
0126  */
0127 PRTE_EXPORT int prte_plm_proxy_init(void);
0128 PRTE_EXPORT int prte_plm_proxy_spawn(prte_job_t *jdata);
0129 PRTE_EXPORT int prte_plm_proxy_finalize(void);
0130 
0131 END_C_DECLS
0132 
0133 #endif /* MCA_PLS_PRIVATE_H */