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-01-09 06:26:12 +03:00
|
|
|
#include "lam/lfc/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-01-14 02:26:14 +03:00
|
|
|
#define LAM_ANY_TAG MPI_ANY_TAG
|
|
|
|
|
2004-01-14 18:18:14 +03:00
|
|
|
/**
|
|
|
|
* MCA->PML Called by MCA framework to initialize the module.
|
|
|
|
*
|
|
|
|
* @param priority (OUT) Relative priority or ranking used by MCA to selected a module.
|
|
|
|
* @param thread_min (OUT) Minimum thread level supported by the module.
|
|
|
|
* @param thread_max (OUT) Maximum thread level supported by the module.
|
|
|
|
*/
|
|
|
|
|
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-14 18:18:14 +03:00
|
|
|
int* priority,
|
|
|
|
int* min_thread,
|
|
|
|
int* max_thread);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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;
|
|
|
|
};
|
|
|
|
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-29 22:27:39 +03:00
|
|
|
typedef int (*mca_pml_base_add_ptls_fn_t)(struct mca_ptl_t **ptls, size_t nptls);
|
2004-01-14 18:18:14 +03:00
|
|
|
typedef int (*mca_pml_base_fini_fn_t)(void);
|
|
|
|
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
|
|
|
|
);
|
|
|
|
|
|
|
|
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-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)(
|
|
|
|
lam_request_t** request,
|
|
|
|
int count,
|
|
|
|
int *completed
|
|
|
|
);
|
|
|
|
|
|
|
|
typedef int (*mca_pml_base_wait_fn_t)(
|
|
|
|
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-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-13 03:36:37 +03:00
|
|
|
mca_pml_base_fini_fn_t pml_fini;
|
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;
|
|
|
|
mca_pml_base_isend_init_fn_t pml_isend_init;
|
|
|
|
mca_pml_base_isend_fn_t pml_isend;
|
|
|
|
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-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-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 */
|