2004-01-09 06:26:12 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
2004-01-12 00:31:52 +03:00
|
|
|
#ifndef MCA_PML_H
|
|
|
|
#define MCA_PML_H
|
|
|
|
|
|
|
|
#include "lam_config.h"
|
2004-01-10 01:09:51 +03:00
|
|
|
#include "lam/lam.h"
|
2004-02-11 01:15:55 +03:00
|
|
|
#include "lam/lfc/lam_list.h"
|
2004-01-12 00:31:52 +03:00
|
|
|
#include "mpi/communicator/communicator.h"
|
|
|
|
#include "mpi/datatype/datatype.h"
|
|
|
|
#include "mpi/request/request.h"
|
2004-01-09 22:20:50 +03:00
|
|
|
#include "mca/mca.h"
|
2004-01-14 02:26:14 +03:00
|
|
|
#include "mpi.h" /* needed for MPI_ANY_TAG */
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-12 00:31:52 +03:00
|
|
|
|
2004-01-09 06:26:12 +03:00
|
|
|
/*
|
2004-01-14 18:18:14 +03:00
|
|
|
* PML module types
|
2004-01-09 06:26:12 +03:00
|
|
|
*/
|
|
|
|
|
2004-01-13 03:36:37 +03:00
|
|
|
struct mca_ptl_t;
|
2004-01-15 20:43:54 +03:00
|
|
|
struct mca_ptl_addr_t;
|
|
|
|
|
2004-01-13 03:36:37 +03:00
|
|
|
|
2004-01-09 08:11:33 +03:00
|
|
|
typedef enum {
|
2004-01-12 22:17:09 +03:00
|
|
|
MCA_PML_BASE_SEND_STANDARD,
|
|
|
|
MCA_PML_BASE_SEND_BUFFERED,
|
|
|
|
MCA_PML_BASE_SEND_SYNCHRONOUS,
|
|
|
|
MCA_PML_BASE_SEND_READY
|
2004-01-13 03:36:37 +03:00
|
|
|
} mca_pml_base_send_mode_t;
|
|
|
|
|
2004-03-17 00:56:19 +03:00
|
|
|
/* renamed MPI constants */
|
|
|
|
#define LAM_ANY_TAG MPI_ANY_TAG
|
|
|
|
#define LAM_ANY_SOURCE MPI_ANY_SOURCE
|
|
|
|
#define LAM_PROC_NULL MPI_PROC_NULL
|
2004-01-14 02:26:14 +03:00
|
|
|
|
2004-01-14 18:18:14 +03:00
|
|
|
/**
|
|
|
|
* MCA->PML Called by MCA framework to initialize the module.
|
|
|
|
*
|
2004-01-31 02:00:48 +03:00
|
|
|
* @param priority (OUT) Relative priority or ranking used by MCA to
|
|
|
|
* selected a module.
|
|
|
|
*
|
|
|
|
* @param allow_multi_user_threads (OUT) Whether this module can run
|
|
|
|
* at MPI_THREAD_MULTIPLE or not.
|
|
|
|
*
|
|
|
|
* @param have_hidden_threads (OUT) Whether this module may use
|
|
|
|
* hidden threads (e.g., progress threads) or not.
|
2004-01-14 18:18:14 +03:00
|
|
|
*/
|
2004-01-29 05:43:58 +03:00
|
|
|
typedef struct mca_pml_1_0_0_t * (*mca_pml_base_module_init_fn_t)(
|
2004-01-31 02:00:48 +03:00
|
|
|
int *priority,
|
|
|
|
bool *allow_multi_user_threads,
|
|
|
|
bool *have_hidden_threads);
|
2004-01-14 18:18:14 +03:00
|
|
|
|
2004-02-01 00:45:32 +03:00
|
|
|
typedef int (*mca_pml_base_module_finalize_fn_t)(void);
|
|
|
|
|
2004-01-14 18:18:14 +03:00
|
|
|
/**
|
|
|
|
* PML module version and interface functions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct mca_pml_base_module_1_0_0_t {
|
|
|
|
mca_base_module_t pmlm_version;
|
|
|
|
mca_base_module_data_1_0_0_t pmlm_data;
|
|
|
|
mca_pml_base_module_init_fn_t pmlm_init;
|
2004-02-01 00:45:32 +03:00
|
|
|
mca_pml_base_module_finalize_fn_t pmlm_finalize;
|
2004-01-14 18:18:14 +03:00
|
|
|
};
|
|
|
|
typedef struct mca_pml_base_module_1_0_0_t mca_pml_base_module_1_0_0_t;
|
2004-01-29 05:43:58 +03:00
|
|
|
typedef mca_pml_base_module_1_0_0_t mca_pml_base_module_t;
|
2004-01-14 18:18:14 +03:00
|
|
|
|
2004-01-09 08:11:33 +03:00
|
|
|
|
2004-01-09 22:20:50 +03:00
|
|
|
/*
|
2004-01-14 18:18:14 +03:00
|
|
|
* PML instance interface functions and datatype
|
2004-01-09 22:20:50 +03:00
|
|
|
*/
|
|
|
|
|
2004-01-13 07:50:56 +03:00
|
|
|
typedef int (*mca_pml_base_add_comm_fn_t)(struct lam_communicator_t*);
|
|
|
|
typedef int (*mca_pml_base_del_comm_fn_t)(struct lam_communicator_t*);
|
|
|
|
typedef int (*mca_pml_base_add_procs_fn_t)(struct lam_proc_t **procs, size_t nprocs);
|
|
|
|
typedef int (*mca_pml_base_del_procs_fn_t)(struct lam_proc_t **procs, size_t nprocs);
|
2004-01-31 02:00:48 +03:00
|
|
|
typedef int (*mca_pml_base_add_ptls_fn_t)(lam_list_t *ptls);
|
2004-01-14 18:18:14 +03:00
|
|
|
typedef int (*mca_pml_base_progress_fn_t)(void);
|
2004-01-09 22:20:50 +03:00
|
|
|
|
2004-01-13 03:36:37 +03:00
|
|
|
typedef int (*mca_pml_base_irecv_init_fn_t)(
|
|
|
|
void *buf,
|
|
|
|
size_t size,
|
|
|
|
struct lam_datatype_t *datatype,
|
|
|
|
int src,
|
|
|
|
int tag,
|
|
|
|
bool persistent,
|
|
|
|
struct lam_communicator_t* comm,
|
|
|
|
struct lam_request_t **request
|
|
|
|
);
|
|
|
|
|
|
|
|
typedef int (*mca_pml_base_irecv_fn_t)(
|
|
|
|
void *buf,
|
|
|
|
size_t size,
|
|
|
|
struct lam_datatype_t *datatype,
|
|
|
|
int src,
|
|
|
|
int tag,
|
|
|
|
struct lam_communicator_t* comm,
|
|
|
|
struct lam_request_t **request
|
|
|
|
);
|
|
|
|
|
2004-03-03 19:44:41 +03:00
|
|
|
typedef int (*mca_pml_base_recv_fn_t)(
|
|
|
|
void *buf,
|
|
|
|
size_t size,
|
|
|
|
struct lam_datatype_t *datatype,
|
|
|
|
int src,
|
|
|
|
int tag,
|
|
|
|
struct lam_communicator_t* comm,
|
|
|
|
lam_status_public_t* status
|
|
|
|
);
|
|
|
|
|
2004-01-13 03:36:37 +03:00
|
|
|
typedef int (*mca_pml_base_isend_init_fn_t)(
|
|
|
|
void *buf,
|
|
|
|
size_t size,
|
|
|
|
struct lam_datatype_t *datatype,
|
|
|
|
int dst,
|
|
|
|
int tag,
|
|
|
|
mca_pml_base_send_mode_t mode,
|
|
|
|
bool persistent,
|
|
|
|
struct lam_communicator_t* comm,
|
|
|
|
struct lam_request_t **request
|
|
|
|
);
|
|
|
|
|
2004-01-12 00:31:52 +03:00
|
|
|
typedef int (*mca_pml_base_isend_fn_t)(
|
2004-01-09 08:11:33 +03:00
|
|
|
void *buf,
|
|
|
|
size_t size,
|
2004-01-09 22:20:50 +03:00
|
|
|
struct lam_datatype_t *datatype,
|
2004-01-13 03:36:37 +03:00
|
|
|
int dst,
|
2004-01-09 08:11:33 +03:00
|
|
|
int tag,
|
2004-01-13 03:36:37 +03:00
|
|
|
mca_pml_base_send_mode_t mode,
|
2004-01-09 22:20:50 +03:00
|
|
|
struct lam_communicator_t* comm,
|
|
|
|
struct lam_request_t **request
|
2004-01-09 08:11:33 +03:00
|
|
|
);
|
|
|
|
|
2004-03-03 19:44:41 +03:00
|
|
|
typedef int (*mca_pml_base_send_fn_t)(
|
|
|
|
void *buf,
|
|
|
|
size_t size,
|
|
|
|
struct lam_datatype_t *datatype,
|
|
|
|
int dst,
|
|
|
|
int tag,
|
|
|
|
mca_pml_base_send_mode_t mode,
|
|
|
|
struct lam_communicator_t* comm
|
|
|
|
);
|
|
|
|
|
2004-01-13 03:36:37 +03:00
|
|
|
typedef int (*mca_pml_base_start_fn_t)(
|
|
|
|
lam_request_t* request
|
|
|
|
);
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-13 03:36:37 +03:00
|
|
|
typedef int (*mca_pml_base_test_fn_t)(
|
2004-02-11 16:41:12 +03:00
|
|
|
lam_request_t* request,
|
|
|
|
bool *completed,
|
|
|
|
lam_status_public_t* status
|
2004-01-13 03:36:37 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
typedef int (*mca_pml_base_wait_fn_t)(
|
2004-03-17 00:56:19 +03:00
|
|
|
lam_request_t** request,
|
2004-01-14 18:57:54 +03:00
|
|
|
lam_status_public_t* status
|
2004-01-13 03:36:37 +03:00
|
|
|
);
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-03-17 00:56:19 +03:00
|
|
|
typedef int (*mca_pml_base_null_fn_t)(
|
|
|
|
lam_request_t** request
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-14 18:18:14 +03:00
|
|
|
/**
|
|
|
|
* PML instance interface functions.
|
2004-01-09 08:11:33 +03:00
|
|
|
*/
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-29 05:43:58 +03:00
|
|
|
struct mca_pml_1_0_0_t {
|
2004-01-13 03:36:37 +03:00
|
|
|
|
2004-01-15 20:43:54 +03:00
|
|
|
/* downcalls from MCA to PML */
|
2004-01-13 07:50:56 +03:00
|
|
|
mca_pml_base_add_comm_fn_t pml_add_comm;
|
|
|
|
mca_pml_base_del_comm_fn_t pml_del_comm;
|
2004-01-13 03:36:37 +03:00
|
|
|
mca_pml_base_add_procs_fn_t pml_add_procs;
|
2004-01-13 07:50:56 +03:00
|
|
|
mca_pml_base_del_procs_fn_t pml_del_procs;
|
2004-01-29 22:27:39 +03:00
|
|
|
mca_pml_base_add_ptls_fn_t pml_add_ptls;
|
2004-01-15 20:43:54 +03:00
|
|
|
mca_pml_base_progress_fn_t pml_progress;
|
2004-01-13 03:36:37 +03:00
|
|
|
|
2004-01-15 20:43:54 +03:00
|
|
|
/* downcalls from MPI to PML */
|
2004-01-13 03:36:37 +03:00
|
|
|
mca_pml_base_irecv_init_fn_t pml_irecv_init;
|
|
|
|
mca_pml_base_irecv_fn_t pml_irecv;
|
2004-03-03 19:44:41 +03:00
|
|
|
mca_pml_base_recv_fn_t pml_recv;
|
2004-01-13 03:36:37 +03:00
|
|
|
mca_pml_base_isend_init_fn_t pml_isend_init;
|
|
|
|
mca_pml_base_isend_fn_t pml_isend;
|
2004-03-03 19:44:41 +03:00
|
|
|
mca_pml_base_send_fn_t pml_send;
|
2004-01-13 03:36:37 +03:00
|
|
|
mca_pml_base_start_fn_t pml_start;
|
|
|
|
mca_pml_base_test_fn_t pml_test;
|
|
|
|
mca_pml_base_wait_fn_t pml_wait;
|
2004-03-17 00:56:19 +03:00
|
|
|
mca_pml_base_null_fn_t pml_null;
|
2004-01-09 22:20:50 +03:00
|
|
|
};
|
2004-01-29 05:43:58 +03:00
|
|
|
typedef struct mca_pml_1_0_0_t mca_pml_1_0_0_t;
|
|
|
|
typedef mca_pml_1_0_0_t mca_pml_t;
|
2004-03-03 19:44:41 +03:00
|
|
|
extern mca_pml_t mca_pml;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
/*
|
2004-01-12 00:31:52 +03:00
|
|
|
* Macro for use in modules that are of type pml v1.0.0
|
2004-01-09 06:26:12 +03:00
|
|
|
*/
|
2004-01-12 00:31:52 +03:00
|
|
|
#define MCA_PML_BASE_VERSION_1_0_0 \
|
|
|
|
/* pml v1.0 is chained to MCA v1.0 */ \
|
|
|
|
MCA_BASE_VERSION_1_0_0, \
|
|
|
|
/* pml v1.0 */ \
|
|
|
|
"pml", 1, 0, 0
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-12 00:31:52 +03:00
|
|
|
#endif /* MCA_PML_H */
|