OpenMPI  0.1.1
base.h
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-2005 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$
13  *
14  * Additional copyrights may follow
15  *
16  * $HEADER$
17  */
18 #ifndef OMPI_MCA_DPM_BASE_H
19 #define OMPI_MCA_DPM_BASE_H
20 
21 #include "ompi_config.h"
22 #include "ompi/constants.h"
23 
24 #include "ompi/mca/dpm/dpm.h"
25 
26 /*
27  * Global functions for MCA overall DPM
28  */
29 
30 BEGIN_C_DECLS
31 
33  ompi_communicator_t *comm;
34  int size;
35  struct ompi_request_t **reqs;
36  int buf;
37 };
39 
40 /**
41  * Initialize the DPM MCA framework
42  *
43  * @retval OMPI_SUCCESS Upon success
44  * @retval OMPI_ERROR Upon failures
45  *
46  * This function is invoked during ompi_init();
47  */
48 OMPI_DECLSPEC int ompi_dpm_base_open(void);
49 
50 /**
51  * Select an available component.
52  *
53  * @retval OMPI_SUCCESS Upon Success
54  * @retval OMPI_NOT_FOUND If no component can be selected
55  * @retval OMPI_ERROR Upon other failure
56  *
57  */
58 OMPI_DECLSPEC int ompi_dpm_base_select(void);
59 
60 /**
61  * Finalize the DPM MCA framework
62  *
63  * @retval OMPI_SUCCESS Upon success
64  * @retval OMPI_ERROR Upon failures
65  *
66  * This function is invoked during ompi_finalize();
67  */
68 OMPI_DECLSPEC int ompi_dpm_base_close(void);
69 
70 #if !ORTE_DISABLE_FULL_SUPPORT
71 
72 /* Internal support functions */
73 OMPI_DECLSPEC char* ompi_dpm_base_dyn_init (void);
74 OMPI_DECLSPEC int ompi_dpm_base_dyn_finalize (void);
75 OMPI_DECLSPEC void ompi_dpm_base_mark_dyncomm (ompi_communicator_t *comm);
76 OMPI_DECLSPEC ompi_dpm_base_disconnect_obj *ompi_dpm_base_disconnect_init ( ompi_communicator_t *comm);
77 OMPI_DECLSPEC void ompi_dpm_base_disconnect_waitall (int count, ompi_dpm_base_disconnect_obj **objs);
78 
79 #endif
80 
81 /* NULL component functions */
82 int ompi_dpm_base_null_connect_accept (ompi_communicator_t *comm, int root,
83  char *port_string, bool send_first,
84  ompi_communicator_t **newcomm);
85 void ompi_dpm_base_null_disconnect(ompi_communicator_t *comm);
86 int ompi_dpm_base_null_spawn(int count, char **array_of_commands,
87  char ***array_of_argv,
88  int *array_of_maxprocs,
89  MPI_Info *array_of_info,
90  char *port_name);
91 int ompi_dpm_base_null_dyn_init(void);
92 int ompi_dpm_base_null_dyn_finalize (void);
93 void ompi_dpm_base_null_mark_dyncomm (ompi_communicator_t *comm);
94 int ompi_dpm_base_null_open_port(char *port_name, orte_rml_tag_t given_tag);
95 int ompi_dpm_base_null_parse_port(char *port_name,
96  char **hnp_uri, char **rml_uri, orte_rml_tag_t *tag);
97 int ompi_dpm_base_null_route_to_port(char *rml_uri, orte_process_name_t *rproc);
98 int ompi_dpm_base_null_close_port(char *port_name);
99 
100 /* useful globals */
101 OMPI_DECLSPEC extern int ompi_dpm_base_output;
102 OMPI_DECLSPEC extern opal_list_t ompi_dpm_base_components_available;
103 OMPI_DECLSPEC extern ompi_dpm_base_component_t ompi_dpm_base_selected_component;
104 OMPI_DECLSPEC extern ompi_dpm_base_module_t ompi_dpm;
105 
106 END_C_DECLS
107 
108 #endif /* OMPI_MCA_DPM_BASE_H */
Structure for DPM modules.
Definition: dpm.h:148
Definition: types.h:146
Definition: base.h:32
Dynamic Process Management Interface.
Definition: info.h:38
uint32_t orte_rml_tag_t
Message matching tag.
Definition: rml_types.h:220
Definition: opal_list.h:147
Structure for DPM components.
Definition: dpm.h:183
Definition: communicator.h:118
Main top-level request struct definition.
Definition: request.h:100