This source file includes following definitions.
- isolated_init
- remote_spawn
- isolated_launch
- launch_daemons
- isolated_terminate_orteds
- isolated_finalize
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 
  24 
  25 
  26 
  27 
  28 
  29 
  30 
  31 
  32 
  33 #include "orte_config.h"
  34 #include "orte/constants.h"
  35 
  36 #include "opal/util/output.h"
  37 #include "opal/mca/event/event.h"
  38 
  39 #include "orte/util/show_help.h"
  40 #include "orte/runtime/orte_globals.h"
  41 #include "orte/util/name_fns.h"
  42 #include "orte/util/proc_info.h"
  43 #include "orte/util/threads.h"
  44 
  45 #include "orte/mca/errmgr/errmgr.h"
  46 #include "orte/mca/state/state.h"
  47 
  48 #include "orte/mca/plm/plm.h"
  49 #include "orte/mca/plm/base/base.h"
  50 #include "orte/mca/plm/base/plm_private.h"
  51 #include "orte/mca/plm/isolated/plm_isolated.h"
  52 
  53 static int isolated_init(void);
  54 static int isolated_launch(orte_job_t *jdata);
  55 static int remote_spawn(void);
  56 static int isolated_terminate_orteds(void);
  57 static int isolated_finalize(void);
  58 
  59 orte_plm_base_module_t orte_plm_isolated_module = {
  60     isolated_init,
  61     orte_plm_base_set_hnp_name,
  62     isolated_launch,
  63     remote_spawn,
  64     orte_plm_base_orted_terminate_job,
  65     isolated_terminate_orteds,
  66     orte_plm_base_orted_kill_local_procs,
  67     orte_plm_base_orted_signal_local_procs,
  68     isolated_finalize
  69 };
  70 
  71 static void launch_daemons(int fd, short args, void *cbdata);
  72 
  73 
  74 
  75 
  76 static int isolated_init(void)
  77 {
  78     int rc;
  79 
  80     
  81     if (ORTE_SUCCESS != (rc = orte_state.add_job_state(ORTE_JOB_STATE_LAUNCH_DAEMONS,
  82                                                        launch_daemons, ORTE_SYS_PRI))) {
  83         ORTE_ERROR_LOG(rc);
  84         return rc;
  85     }
  86 
  87     
  88     if (ORTE_SUCCESS != (rc = orte_plm_base_comm_start())) {
  89         ORTE_ERROR_LOG(rc);
  90     }
  91 
  92     return rc;
  93 }
  94 
  95 
  96 
  97 
  98 static int remote_spawn(void)
  99 {
 100     
 101     return ORTE_SUCCESS;
 102 }
 103 
 104 static int isolated_launch(orte_job_t *jdata)
 105 {
 106     if (ORTE_FLAG_TEST(jdata, ORTE_JOB_FLAG_RESTART)) {
 107         
 108         ORTE_ACTIVATE_JOB_STATE(jdata, ORTE_JOB_STATE_MAP);
 109     } else {
 110         
 111         ORTE_ACTIVATE_JOB_STATE(jdata, ORTE_JOB_STATE_INIT);
 112     }
 113     return ORTE_SUCCESS;
 114 }
 115 
 116 static void launch_daemons(int fd, short args, void *cbdata)
 117 {
 118     orte_state_caddy_t *state = (orte_state_caddy_t*)cbdata;
 119 
 120     ORTE_ACQUIRE_OBJECT(state);
 121 
 122     
 123 
 124 
 125     ORTE_ACTIVATE_JOB_STATE(state->jdata, ORTE_JOB_STATE_DAEMONS_REPORTED);
 126     OBJ_RELEASE(state);
 127 }
 128 
 129 static int isolated_terminate_orteds(void)
 130 {
 131     int rc;
 132 
 133     
 134     if (ORTE_SUCCESS != (rc = orte_plm_base_orted_exit(ORTE_DAEMON_EXIT_CMD))) {
 135         ORTE_ERROR_LOG(rc);
 136     }
 137     return rc;
 138 }
 139 
 140 static int isolated_finalize(void)
 141 {
 142     int rc;
 143 
 144     
 145     if (ORTE_SUCCESS != (rc = orte_plm_base_comm_stop())) {
 146         ORTE_ERROR_LOG(rc);
 147     }
 148 
 149     return rc;
 150 }