OpenMPI  0.1.1
odls_private.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2004-2007 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 Cisco Systems, Inc. All rights reserved.
13  * $COPYRIGHT$
14  *
15  * Additional copyrights may follow
16  *
17  * $HEADER$
18  */
19 /** @file:
20  */
21 
22 #ifndef MCA_ODLS_PRIVATE_H
23 #define MCA_ODLS_PRIVATE_H
24 
25 /*
26  * includes
27  */
28 #include "orte_config.h"
29 #include "orte/types.h"
30 
31 #include "opal/class/opal_list.h"
33 #include "opal/class/opal_bitmap.h"
34 #include "opal/threads/mutex.h"
35 #include "opal/threads/condition.h"
36 #include "opal/dss/dss_types.h"
37 
39 #include "orte/mca/rml/rml_types.h"
41 
43 
44 BEGIN_C_DECLS
45 
46 /*
47  * General ODLS types
48  */
49 
50 typedef struct {
51  /** Verbose/debug output stream */
52  int output;
53  /** Time to allow process to forcibly die */
55  /* mutex */
56  opal_mutex_t mutex;
57  /* condition variable */
58  opal_condition_t cond;
59  /* byte object to store daemon map for later xmit to procs */
60  opal_byte_object_t *dmap;
61  /* any co-spawned debugger daemon */
62  orte_odls_job_t *debugger;
63  /* debugger launched */
64  bool debugger_launched;
65  /* list of ranks to be displayed on separate xterms */
66  opal_list_t xterm_ranks;
67  /* the xterm cmd to be used */
68  char **xtermcmd;
70 
71 ORTE_DECLSPEC extern orte_odls_globals_t orte_odls_globals;
72 
73 
74 /*
75  * Default functions that are common to most environments - can
76  * be overridden by specific environments if they need something
77  * different (e.g., bproc)
78  */
79 ORTE_DECLSPEC int
80 orte_odls_base_default_get_add_procs_data(opal_buffer_t *data,
81  orte_jobid_t job);
82 
83 ORTE_DECLSPEC int
84 orte_odls_base_default_update_daemon_info(opal_buffer_t *data);
85 
86 ORTE_DECLSPEC int
87 orte_odls_base_default_construct_child_list(opal_buffer_t *data,
88  orte_jobid_t *job);
89 
90 /* define a function that will fork a local proc */
91 typedef int (*orte_odls_base_fork_local_proc_fn_t)(orte_app_context_t *context,
92  orte_odls_child_t *child,
93  char **environ_copy,
94  orte_odls_job_t *jobdat);
95 
96 ORTE_DECLSPEC int
97 orte_odls_base_default_launch_local(orte_jobid_t job,
98  orte_odls_base_fork_local_proc_fn_t fork_local);
99 
100 ORTE_DECLSPEC int
101 orte_odls_base_default_deliver_message(orte_jobid_t job, opal_buffer_t *buffer, orte_rml_tag_t tag);
102 
103 ORTE_DECLSPEC void odls_base_default_wait_local_proc(pid_t pid, int status, void* cbdata);
104 
105 ORTE_DECLSPEC void orte_odls_base_default_report_abort(orte_process_name_t *proc);
106 
107 /* define a function type to signal a local proc */
108 typedef int (*orte_odls_base_signal_local_fn_t)(pid_t pid, int signum);
109 
110 ORTE_DECLSPEC int
112  orte_odls_base_signal_local_fn_t signal_local);
113 
114 /* define a function type for killing a local proc */
115 typedef int (*orte_odls_base_kill_local_fn_t)(pid_t pid, int signum);
116 
117 /* define a function type to detect that a child died */
118 typedef bool (*orte_odls_base_child_died_fn_t)(orte_odls_child_t *child);
119 
120 ORTE_DECLSPEC int
121 orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs,
122  orte_odls_base_kill_local_fn_t kill_local,
123  orte_odls_base_child_died_fn_t child_died);
124 
125 ORTE_DECLSPEC int orte_odls_base_default_require_sync(orte_process_name_t *proc,
126  opal_buffer_t *buffer,
127  bool drop_nidmap);
128 
129 ORTE_DECLSPEC int orte_odls_base_default_restart_proc(orte_odls_child_t *child,
130  orte_odls_base_fork_local_proc_fn_t fork_local);
131 
132 /*
133  * Preload binary/files functions
134  */
135 ORTE_DECLSPEC int orte_odls_base_preload_files_app_context(orte_app_context_t* context);
136 
137 /*
138  * Obtain process stats on a child proc
139  */
140 ORTE_DECLSPEC int orte_odls_base_get_proc_stats(opal_buffer_t *answer, orte_process_name_t *proc);
141 
142 END_C_DECLS
143 
144 #endif
Information about a specific application to be launched in the RTE.
Definition: orte_globals.h:196
int timeout_before_sigkill
Time to allow process to forcibly die.
Definition: odls_private.h:54
int output
Verbose/debug output stream.
Definition: odls_private.h:52
dynamic pointer array
Definition: opal_pointer_array.h:45
Definition: condition.h:49
Definition: odls_types.h:130
uint32_t orte_jobid_t
Set the allowed range for ids in each space.
Definition: types.h:76
ORTE_DECLSPEC int orte_odls_base_default_signal_local_procs(const orte_process_name_t *proc, int32_t signal, orte_odls_base_signal_local_fn_t signal_local)
Pass a signal to my local procs.
Definition: odls_base_default_fns.c:1799
Definition: types.h:146
A bitmap implementation.
Definition: mutex_unix.h:53
The opal_list_t interface is used to provide a generic doubly-linked list container for Open MPI...
See opal_bitmap.h for an explanation of why there is a split between OPAL and ORTE for this generic c...
Definition: odls_private.h:50
Definition: odls_types.h:100
Buffer management types.
uint32_t orte_rml_tag_t
Message matching tag.
Definition: rml_types.h:220
Definition: opal_list.h:147
Global params for OpenRTE.
The OpenRTE Group Communications.
Structure for holding a buffer to be used with the RML or OOB subsystems.
Definition: dss_types.h:159
Definition: dss_types.h:47
Mutual exclusion functions.
Contains the typedefs for the use of the rml.