2008-02-28 04:57:57 +03:00
|
|
|
/*
|
|
|
|
* 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.
|
2013-08-23 22:02:50 +04:00
|
|
|
* Copyright (c) 2013 Intel, Inc. All rights reserved
|
2008-02-28 04:57:57 +03:00
|
|
|
* $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"
|
|
|
|
|
2013-08-23 22:02:50 +04:00
|
|
|
#if HAVE_TIME_H
|
|
|
|
#include <time.h>
|
|
|
|
#endif
|
|
|
|
#if HAVE_SYS_TIME_H
|
|
|
|
#include <sys/time.h>
|
|
|
|
#endif
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
#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;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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);
|
|
|
|
|
|
|
|
/* 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);
|
2013-05-16 19:04:37 +04:00
|
|
|
OMPI_DECLSPEC int ompi_dpm_base_disconnect_waitall (int count, ompi_dpm_base_disconnect_obj **objs);
|
2008-02-28 04:57:57 +03:00
|
|
|
|
2008-06-18 07:15:56 +04:00
|
|
|
/* NULL component functions */
|
2008-06-18 12:20:02 +04:00
|
|
|
int ompi_dpm_base_null_connect_accept (ompi_communicator_t *comm, int root,
|
|
|
|
char *port_string, bool send_first,
|
|
|
|
ompi_communicator_t **newcomm);
|
2013-05-16 19:04:37 +04:00
|
|
|
int ompi_dpm_base_null_disconnect(ompi_communicator_t *comm);
|
2008-06-18 12:20:02 +04:00
|
|
|
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);
|
2013-01-28 03:25:10 +04:00
|
|
|
int ompi_dpm_base_null_open_port(char *port_name, ompi_rml_tag_t given_tag);
|
2008-09-27 17:22:32 +04:00
|
|
|
int ompi_dpm_base_null_parse_port(char *port_name,
|
2013-01-28 03:25:10 +04:00
|
|
|
char **hnp_uri, char **rml_uri, ompi_rml_tag_t *tag);
|
|
|
|
int ompi_dpm_base_null_route_to_port(char *rml_uri, ompi_process_name_t *rproc);
|
2008-06-18 12:20:02 +04:00
|
|
|
int ompi_dpm_base_null_close_port(char *port_name);
|
2013-08-23 22:02:50 +04:00
|
|
|
int ompi_dpm_base_null_pconnect(char *port,
|
|
|
|
struct timeval *timeout,
|
|
|
|
ompi_dpm_base_paccept_connect_callback_fn_t cbfunc,
|
|
|
|
void *cbdata);
|
|
|
|
int ompi_dpm_base_null_paccept(char *port,
|
|
|
|
ompi_dpm_base_paccept_connect_callback_fn_t cbfunc,
|
|
|
|
void *cbdata);
|
|
|
|
void ompi_dpm_base_null_pclose(char *port);
|
2008-02-28 04:57:57 +03:00
|
|
|
|
|
|
|
/* useful globals */
|
|
|
|
OMPI_DECLSPEC extern ompi_dpm_base_component_t ompi_dpm_base_selected_component;
|
|
|
|
OMPI_DECLSPEC extern ompi_dpm_base_module_t ompi_dpm;
|
|
|
|
|
2013-03-28 01:17:31 +04:00
|
|
|
OMPI_DECLSPEC extern mca_base_framework_t ompi_dpm_base_framework;
|
|
|
|
|
2008-02-28 04:57:57 +03:00
|
|
|
END_C_DECLS
|
|
|
|
|
|
|
|
#endif /* OMPI_MCA_DPM_BASE_H */
|