File: base.h

package info (click to toggle)
openmpi 1.6.5-9.1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 91,628 kB
  • ctags: 44,305
  • sloc: ansic: 408,966; cpp: 44,454; sh: 27,828; makefile: 10,486; asm: 3,882; python: 1,239; lex: 805; perl: 549; csh: 253; fortran: 232; f90: 126; tcl: 12
file content (108 lines) | stat: -rw-r--r-- 3,733 bytes parent folder | download | duplicates (2)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
 * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
 *                         University Research and Technology
 *                         Corporation.  All rights reserved.
 * Copyright (c) 2004-2005 The University of Tennessee and The University
 *                         of Tennessee Research Foundation.  All rights
 *                         reserved.
 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 
 *                         University of Stuttgart.  All rights reserved.
 * Copyright (c) 2004-2005 The Regents of the University of California.
 *                         All rights reserved.
 * $COPYRIGHT$
 * 
 * Additional copyrights may follow
 * 
 * $HEADER$
 */
#ifndef OMPI_MCA_DPM_BASE_H
#define OMPI_MCA_DPM_BASE_H

#include "ompi_config.h"
#include "ompi/constants.h"

#include "ompi/mca/dpm/dpm.h"

/*
 * Global functions for MCA overall DPM
 */

BEGIN_C_DECLS

struct ompi_dpm_base_disconnect_obj {
    ompi_communicator_t       *comm;
    int                       size;
    struct ompi_request_t     **reqs;
    int                       buf;
};
typedef struct ompi_dpm_base_disconnect_obj ompi_dpm_base_disconnect_obj;

/**
 * Initialize the DPM MCA framework
 *
 * @retval OMPI_SUCCESS Upon success
 * @retval OMPI_ERROR   Upon failures
 * 
 * This function is invoked during ompi_init();
 */
OMPI_DECLSPEC int ompi_dpm_base_open(void);

/**
 * Select an available component.
 *
 * @retval OMPI_SUCCESS Upon Success
 * @retval OMPI_NOT_FOUND If no component can be selected
 * @retval OMPI_ERROR Upon other failure
 *
 */
OMPI_DECLSPEC int ompi_dpm_base_select(void);

/**
 * Finalize the DPM MCA framework
 *
 * @retval OMPI_SUCCESS Upon success
 * @retval OMPI_ERROR   Upon failures
 * 
 * This function is invoked during ompi_finalize();
 */
OMPI_DECLSPEC int ompi_dpm_base_close(void);

#if !ORTE_DISABLE_FULL_SUPPORT

/* Internal support functions */
OMPI_DECLSPEC char* ompi_dpm_base_dyn_init (void);
OMPI_DECLSPEC int ompi_dpm_base_dyn_finalize (void);
OMPI_DECLSPEC void ompi_dpm_base_mark_dyncomm (ompi_communicator_t *comm);
OMPI_DECLSPEC ompi_dpm_base_disconnect_obj *ompi_dpm_base_disconnect_init ( ompi_communicator_t *comm);
OMPI_DECLSPEC void ompi_dpm_base_disconnect_waitall (int count, ompi_dpm_base_disconnect_obj **objs);

#endif

/* NULL component functions */
int ompi_dpm_base_null_connect_accept (ompi_communicator_t *comm, int root,
                                       char *port_string, bool send_first,
                                       ompi_communicator_t **newcomm);
void ompi_dpm_base_null_disconnect(ompi_communicator_t *comm);
int ompi_dpm_base_null_spawn(int count, char **array_of_commands,
                             char ***array_of_argv,
                             int *array_of_maxprocs,
                             MPI_Info *array_of_info,
                             char *port_name);
int ompi_dpm_base_null_dyn_init(void);
int ompi_dpm_base_null_dyn_finalize (void);
void ompi_dpm_base_null_mark_dyncomm (ompi_communicator_t *comm);
int ompi_dpm_base_null_open_port(char *port_name, orte_rml_tag_t given_tag);
int ompi_dpm_base_null_parse_port(char *port_name, 
                                  char **hnp_uri, char **rml_uri, orte_rml_tag_t *tag);
int ompi_dpm_base_null_route_to_port(char *rml_uri, orte_process_name_t *rproc);
int ompi_dpm_base_null_close_port(char *port_name);

/* useful globals */
OMPI_DECLSPEC extern int  ompi_dpm_base_output;
OMPI_DECLSPEC extern opal_list_t ompi_dpm_base_components_available;
OMPI_DECLSPEC extern ompi_dpm_base_component_t ompi_dpm_base_selected_component;
OMPI_DECLSPEC extern ompi_dpm_base_module_t ompi_dpm;

END_C_DECLS

#endif /* OMPI_MCA_DPM_BASE_H */