2004-07-01 18:49:54 +04:00
|
|
|
/*
|
2004-01-10 08:13:00 +03:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
2004-07-01 18:49:54 +04:00
|
|
|
/** @file:
|
2004-01-10 11:09:54 +03:00
|
|
|
*
|
2004-08-05 03:42:51 +04:00
|
|
|
* Contains the internal functions and typedefs for the use of the oob
|
2004-07-01 18:49:54 +04:00
|
|
|
*/
|
|
|
|
|
2004-08-05 03:42:51 +04:00
|
|
|
#ifndef MCA_OOB_H_
|
|
|
|
#define MCA_OOB_H_
|
2004-01-10 08:13:00 +03:00
|
|
|
|
2004-08-05 03:42:51 +04:00
|
|
|
#include "ompi_config.h"
|
2004-01-10 11:09:54 +03:00
|
|
|
|
2004-08-05 03:42:51 +04:00
|
|
|
#include "include/types.h"
|
|
|
|
#include "mca/mca.h"
|
|
|
|
#include "mca/oob/base/base.h"
|
|
|
|
/********
|
|
|
|
* NOTE: these are functions and prototypes for the use of the modules
|
|
|
|
* and components.
|
|
|
|
* THESE ARE NOT USER INTERFACE FUNCTIONS.
|
|
|
|
* the user interface is in mca/oob/base/base.h
|
2004-07-01 18:49:54 +04:00
|
|
|
*/
|
|
|
|
|
2004-01-10 08:13:00 +03:00
|
|
|
/*
|
2004-07-01 18:49:54 +04:00
|
|
|
* OOB Component/Module function prototypes.
|
2004-01-10 08:13:00 +03:00
|
|
|
*/
|
|
|
|
|
2004-07-01 18:49:54 +04:00
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_send().
|
2004-08-05 03:42:51 +04:00
|
|
|
*
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param peer (IN) Opaque name of peer process.
|
|
|
|
* @param msg (IN) Array of iovecs describing user buffers and lengths.
|
|
|
|
* @param count (IN) Number of elements in iovec array.
|
2004-08-03 01:24:00 +04:00
|
|
|
* @param tag (IN) User defined tag for matching send/recv.
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param flags (IN) Currently unused.
|
|
|
|
* @return OMPI error code (<0) on error number of bytes actually sent.
|
|
|
|
*/
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_oob_base_module_send_fn_t)(
|
2004-08-05 03:42:51 +04:00
|
|
|
const ompi_process_name_t* peer,
|
|
|
|
const struct iovec *msg,
|
|
|
|
int count,
|
2004-08-03 01:24:00 +04:00
|
|
|
int tag,
|
2004-07-01 18:49:54 +04:00
|
|
|
int flags);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_recv().
|
|
|
|
*
|
2004-08-05 03:42:51 +04:00
|
|
|
* @param peer (IN) Opaque name of peer process or MCA_OOB_NAME_ANY for wildcard receive.
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param msg (IN) Array of iovecs describing user buffers and lengths.
|
|
|
|
* @param types (IN) Parallel array to iovecs describing data type of each iovec element.
|
|
|
|
* @param count (IN) Number of elements in iovec array.
|
2004-08-03 01:24:00 +04:00
|
|
|
* @param tag (IN) User defined tag for matching send/recv.
|
2004-07-15 23:08:54 +04:00
|
|
|
* @param flags (IN) May be MCA_OOB_PEEK to return up to the number of bytes provided in the
|
2004-07-01 18:49:54 +04:00
|
|
|
* iovec array without removing the message from the queue.
|
|
|
|
* @return OMPI error code (<0) on error or number of bytes actually received.
|
|
|
|
*/
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_oob_base_module_recv_fn_t)(
|
2004-08-05 03:42:51 +04:00
|
|
|
ompi_process_name_t* peer,
|
|
|
|
const struct iovec *msg,
|
|
|
|
int count,
|
2004-08-03 01:24:00 +04:00
|
|
|
int tag,
|
2004-07-01 18:49:54 +04:00
|
|
|
int flags);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_send_nb().
|
|
|
|
*
|
|
|
|
* @param peer (IN) Opaque name of peer process.
|
|
|
|
* @param msg (IN) Array of iovecs describing user buffers and lengths.
|
|
|
|
* @param count (IN) Number of elements in iovec array.
|
2004-08-03 01:24:00 +04:00
|
|
|
* @param tag (IN) User defined tag for matching send/recv.
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param flags (IN) Currently unused.
|
|
|
|
* @param cbfunc (IN) Callback function on send completion.
|
|
|
|
* @param cbdata (IN) User data that is passed to callback function.
|
|
|
|
* @return OMPI error code (<0) on error number of bytes actually sent.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_oob_base_module_send_nb_fn_t)(
|
2004-08-05 03:42:51 +04:00
|
|
|
const ompi_process_name_t* peer,
|
|
|
|
const struct iovec* msg,
|
|
|
|
int count,
|
2004-08-03 01:24:00 +04:00
|
|
|
int tag,
|
2004-08-05 03:42:51 +04:00
|
|
|
int flags,
|
2004-07-01 18:49:54 +04:00
|
|
|
mca_oob_callback_fn_t cbfunc,
|
|
|
|
void* cbdata);
|
2004-01-10 11:09:54 +03:00
|
|
|
|
2004-07-01 18:49:54 +04:00
|
|
|
/**
|
|
|
|
* Implementation of mca_oob_recv_nb().
|
|
|
|
*
|
2004-08-05 03:42:51 +04:00
|
|
|
* @param peer (IN) Opaque name of peer process or MCA_OOB_NAME_ANY for wildcard receive.
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param msg (IN) Array of iovecs describing user buffers and lengths.
|
|
|
|
* @param count (IN) Number of elements in iovec array.
|
2004-08-03 01:24:00 +04:00
|
|
|
* @param tag (IN) User defined tag for matching send/recv.
|
2004-07-15 23:08:54 +04:00
|
|
|
* @param flags (IN) May be MCA_OOB_PEEK to return up to size bytes of msg w/out removing it from the queue,
|
2004-07-01 18:49:54 +04:00
|
|
|
* @param cbfunc (IN) Callback function on recv completion.
|
|
|
|
* @param cbdata (IN) User data that is passed to callback function.
|
|
|
|
* @return OMPI error code (<0) on error or number of bytes actually received.
|
|
|
|
*/
|
|
|
|
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_oob_base_module_recv_nb_fn_t)(
|
2004-08-05 03:42:51 +04:00
|
|
|
ompi_process_name_t* peer,
|
|
|
|
const struct iovec* msg,
|
|
|
|
int count,
|
2004-08-03 01:24:00 +04:00
|
|
|
int tag,
|
2004-08-05 03:42:51 +04:00
|
|
|
int flags,
|
2004-07-01 18:49:54 +04:00
|
|
|
mca_oob_callback_fn_t cbfunc,
|
|
|
|
void* cbdata);
|
|
|
|
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
2004-07-01 18:49:54 +04:00
|
|
|
* OOB Module
|
|
|
|
*/
|
2004-08-03 01:24:00 +04:00
|
|
|
struct mca_oob_1_0_0_t {
|
2004-08-05 03:42:51 +04:00
|
|
|
mca_oob_base_module_send_fn_t oob_send;
|
2004-08-02 04:24:22 +04:00
|
|
|
mca_oob_base_module_recv_fn_t oob_recv;
|
|
|
|
mca_oob_base_module_send_nb_fn_t oob_send_nb;
|
|
|
|
mca_oob_base_module_recv_nb_fn_t oob_recv_nb;
|
2004-01-10 21:23:53 +03:00
|
|
|
};
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
|
|
|
* Convenience Typedef
|
|
|
|
*/
|
2004-08-03 01:24:00 +04:00
|
|
|
typedef struct mca_oob_1_0_0_t mca_oob_1_0_0_t;
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
|
|
|
* Convenience typedef
|
|
|
|
*/
|
2004-08-03 01:24:00 +04:00
|
|
|
typedef struct mca_oob_1_0_0_t mca_oob_t;
|
2004-07-01 18:49:54 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* OOB Component
|
|
|
|
*/
|
2004-08-03 01:24:00 +04:00
|
|
|
typedef mca_oob_t* (*mca_oob_base_component_init_fn_t)(
|
2004-07-01 18:49:54 +04:00
|
|
|
bool *allow_multi_user_threads,
|
|
|
|
bool *have_hidden_threads);
|
2004-08-02 04:24:22 +04:00
|
|
|
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
|
|
|
* OOB finalize function
|
|
|
|
*/
|
2004-08-02 04:24:22 +04:00
|
|
|
typedef int (*mca_oob_base_component_finalize_fn_t)(void);
|
|
|
|
|
2004-07-01 18:49:54 +04:00
|
|
|
/**
|
|
|
|
* the standard component data structure
|
|
|
|
*/
|
|
|
|
struct mca_oob_base_component_1_0_0_t {
|
2004-08-02 04:24:22 +04:00
|
|
|
mca_base_component_t oob_version;
|
|
|
|
mca_base_component_data_1_0_0_t oob_data;
|
|
|
|
|
|
|
|
mca_oob_base_component_init_fn_t oob_init;
|
|
|
|
mca_oob_base_component_finalize_fn_t oob_finalize;
|
2004-07-01 18:49:54 +04:00
|
|
|
};
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
|
|
|
* Convenience Typedef
|
|
|
|
*/
|
2004-07-01 18:49:54 +04:00
|
|
|
typedef struct mca_oob_base_component_1_0_0_t mca_oob_base_component_1_0_0_t;
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
|
|
|
* Convenience Typedef
|
|
|
|
*/
|
2004-07-01 18:49:54 +04:00
|
|
|
typedef mca_oob_base_component_1_0_0_t mca_oob_base_component_t;
|
2004-01-10 08:13:00 +03:00
|
|
|
|
2004-02-01 00:43:26 +03:00
|
|
|
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
2004-07-01 18:49:54 +04:00
|
|
|
* Macro for use in components that are of type oob v1.0.0
|
2004-01-12 01:52:59 +03:00
|
|
|
*/
|
|
|
|
#define MCA_OOB_BASE_VERSION_1_0_0 \
|
2004-08-05 03:42:51 +04:00
|
|
|
/* oob v1.0 is chained to MCA v1.0 */ \
|
2004-01-12 01:52:59 +03:00
|
|
|
MCA_BASE_VERSION_1_0_0, \
|
2004-08-05 03:42:51 +04:00
|
|
|
/* oob v1.0 */ \
|
2004-01-12 01:52:59 +03:00
|
|
|
"oob", 1, 0, 0
|
|
|
|
|
2004-08-05 03:42:51 +04:00
|
|
|
/*
|
|
|
|
* This is the first module on the list. This is here temporarily
|
|
|
|
* to make things work
|
|
|
|
*/
|
|
|
|
extern mca_oob_t mca_oob;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* associate a component and a module that belongs to it
|
|
|
|
*/
|
|
|
|
struct mca_oob_base_info_t {
|
|
|
|
ompi_list_item_t super;
|
|
|
|
mca_oob_base_component_t *oob_component;
|
|
|
|
mca_oob_t *oob_module;
|
|
|
|
};
|
2004-08-10 03:07:53 +04:00
|
|
|
/**
|
|
|
|
* Convenience Typedef
|
|
|
|
*/
|
2004-08-05 03:42:51 +04:00
|
|
|
typedef struct mca_oob_base_info_t mca_oob_base_info_t;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* declare the association structure as a class
|
|
|
|
*/
|
|
|
|
OBJ_CLASS_DECLARATION(mca_oob_base_info_t);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Global functions for MCA overall collective open and close
|
|
|
|
*/
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
int mca_oob_base_open(void);
|
|
|
|
int mca_oob_base_init(bool *allow_multi_user_threads, bool *have_hidden_threads);
|
|
|
|
int mca_oob_base_close(void);
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
2004-01-10 08:13:00 +03:00
|
|
|
#endif
|
2004-07-01 18:49:54 +04:00
|
|
|
|
2004-08-05 03:42:51 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Global struct holding the selected module's function pointers
|
|
|
|
*/
|
|
|
|
extern int mca_oob_base_output;
|
|
|
|
extern ompi_list_t mca_oob_base_components;
|
|
|
|
extern ompi_list_t mca_oob_base_modules;
|
|
|
|
|
|
|
|
#endif
|