root/orte/mca/plm/base/plm_private.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2006 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * Copyright (c) 2011-2013 Los Alamos National Security, LLC.
  13  *                         All rights reserved.
  14  * Copyright (c) 2017-2018 Intel, Inc. All rights reserved.
  15  * Copyright (c) 2017      Research Organization for Information Science
  16  *                         and Technology (RIST). All rights reserved.
  17  * $COPYRIGHT$
  18  *
  19  * Additional copyrights may follow
  20  *
  21  * $HEADER$
  22  */
  23 /** @file:
  24  */
  25 
  26 #ifndef MCA_PLM_PRIVATE_H
  27 #define MCA_PLM_PRIVATE_H
  28 
  29 /*
  30  * includes
  31  */
  32 #include "orte_config.h"
  33 #include "orte/types.h"
  34 
  35 #ifdef HAVE_SYS_TIME_H
  36 #include <sys/time.h>
  37 #endif  /* HAVE_SYS_TIME_H */
  38 
  39 #include "opal/class/opal_list.h"
  40 #include "opal/class/opal_pointer_array.h"
  41 #include "opal/dss/dss_types.h"
  42 
  43 #include "opal/dss/dss_types.h"
  44 #include "orte/mca/plm/plm_types.h"
  45 #include "orte/mca/rml/rml_types.h"
  46 #include "orte/mca/odls/odls_types.h"
  47 #include "orte/runtime/orte_globals.h"
  48 
  49 
  50 BEGIN_C_DECLS
  51 
  52 ORTE_DECLSPEC extern mca_base_framework_t orte_plm_base_framework;
  53 
  54 /* globals for use solely within PLM framework */
  55 typedef struct {
  56     /* next jobid */
  57     uint16_t next_jobid;
  58     /* time when daemons started launch */
  59     struct timeval daemonlaunchstart;
  60     /* tree spawn cmd */
  61     opal_buffer_t tree_spawn_cmd;
  62     /* daemon nodes assigned at launch */
  63     bool daemon_nodes_assigned_at_launch;
  64     size_t node_regex_threshold;
  65 } orte_plm_globals_t;
  66 /**
  67  * Global instance of PLM framework data
  68  */
  69 ORTE_DECLSPEC extern orte_plm_globals_t orte_plm_globals;
  70 
  71 
  72 /**
  73  * Utility routine to set progress engine schedule
  74  */
  75 ORTE_DECLSPEC int orte_plm_base_set_progress_sched(int sched);
  76 
  77 /*
  78  * Launch support
  79  */
  80 ORTE_DECLSPEC void orte_plm_base_daemon_callback(int status, orte_process_name_t* sender,
  81                                                  opal_buffer_t *buffer,
  82                                                  orte_rml_tag_t tag, void *cbdata);
  83 ORTE_DECLSPEC void orte_plm_base_daemon_failed(int status, orte_process_name_t* sender,
  84                                                opal_buffer_t *buffer,
  85                                                orte_rml_tag_t tag, void *cbdata);
  86 ORTE_DECLSPEC void orte_plm_base_daemon_topology(int status, orte_process_name_t* sender,
  87                                                  opal_buffer_t *buffer,
  88                                                  orte_rml_tag_t tag, void *cbdata);
  89 
  90 ORTE_DECLSPEC int orte_plm_base_create_jobid(orte_job_t *jdata);
  91 ORTE_DECLSPEC int orte_plm_base_set_hnp_name(void);
  92 ORTE_DECLSPEC void orte_plm_base_reset_job(orte_job_t *jdata);
  93 ORTE_DECLSPEC int orte_plm_base_setup_orted_cmd(int *argc, char ***argv);
  94 ORTE_DECLSPEC void orte_plm_base_check_all_complete(int fd, short args, void *cbdata);
  95 ORTE_DECLSPEC int orte_plm_base_setup_virtual_machine(orte_job_t *jdata);
  96 
  97 /**
  98  * Utilities for plm components that use proxy daemons
  99  */
 100 ORTE_DECLSPEC int orte_plm_base_orted_exit(orte_daemon_cmd_flag_t command);
 101 ORTE_DECLSPEC int orte_plm_base_orted_terminate_job(orte_jobid_t jobid);
 102 ORTE_DECLSPEC int orte_plm_base_orted_kill_local_procs(opal_pointer_array_t *procs);
 103 ORTE_DECLSPEC int orte_plm_base_orted_signal_local_procs(orte_jobid_t job, int32_t signal);
 104 
 105 /*
 106  * communications utilities
 107  */
 108 ORTE_DECLSPEC int orte_plm_base_comm_start(void);
 109 ORTE_DECLSPEC int orte_plm_base_comm_stop(void);
 110 ORTE_DECLSPEC void orte_plm_base_recv(int status, orte_process_name_t* sender,
 111                                       opal_buffer_t* buffer, orte_rml_tag_t tag,
 112                                       void* cbdata);
 113 
 114 
 115 /**
 116  * Construct basic ORTE Daemon command line arguments
 117  */
 118 ORTE_DECLSPEC int orte_plm_base_orted_append_basic_args(int *argc, char ***argv,
 119                                                         char *ess_module,
 120                                                         int *proc_vpid_index);
 121 
 122 /*
 123  * Proxy functions for use by daemons and application procs
 124  * needing dynamic operations
 125  */
 126 ORTE_DECLSPEC int orte_plm_proxy_init(void);
 127 ORTE_DECLSPEC int orte_plm_proxy_spawn(orte_job_t *jdata);
 128 ORTE_DECLSPEC int orte_plm_proxy_finalize(void);
 129 
 130 END_C_DECLS
 131 
 132 #endif  /* MCA_PLS_PRIVATE_H */

/* [<][>][^][v][top][bottom][index][help] */