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-09 06:26:12 +03:00
|
|
|
|
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-09 08:11:33 +03:00
|
|
|
* PML module functions
|
2004-01-09 06:26:12 +03:00
|
|
|
*/
|
|
|
|
|
2004-01-14 06:42:02 +03:00
|
|
|
typedef struct mca_pml_t * (*mca_pml_base_init_fn_t)(int* priority, int* min_thread, int* max_thread);
|
2004-01-13 03:36:37 +03:00
|
|
|
typedef int (*mca_pml_base_fini_fn_t)(void);
|
2004-01-09 08:11:33 +03:00
|
|
|
|
2004-01-09 06:26:12 +03:00
|
|
|
/*
|
2004-01-09 22:20:50 +03:00
|
|
|
* PML types
|
2004-01-09 06:26:12 +03:00
|
|
|
*/
|
|
|
|
|
2004-01-13 03:36:37 +03:00
|
|
|
struct mca_ptl_t;
|
|
|
|
|
2004-01-12 00:31:52 +03:00
|
|
|
typedef uint64_t mca_pml_base_tstamp_t;
|
2004-01-09 22:20:50 +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;
|
|
|
|
|
|
|
|
|
|
|
|
struct mca_pml_base_status_t {
|
|
|
|
};
|
|
|
|
typedef struct mca_pml_base_status_t mca_pml_base_status_t;
|
2004-01-09 08:11:33 +03:00
|
|
|
|
2004-01-14 02:26:14 +03:00
|
|
|
#define LAM_ANY_TAG MPI_ANY_TAG
|
|
|
|
|
2004-01-09 08:11:33 +03:00
|
|
|
|
2004-01-09 22:20:50 +03:00
|
|
|
/*
|
|
|
|
* PML interface functions
|
|
|
|
*/
|
|
|
|
|
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);
|
|
|
|
typedef int (*mca_pml_base_add_ptls_fn_t)(struct mca_ptl_t **ptls, size_t nptls);
|
2004-01-12 00:31:52 +03:00
|
|
|
typedef int (*mca_pml_base_progress_fn_t)(mca_pml_base_tstamp_t);
|
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,
|
|
|
|
mca_pml_base_status_t* status
|
|
|
|
);
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
/*
|
2004-01-09 08:11:33 +03:00
|
|
|
* PML module definition.
|
2004-01-09 06:26:12 +03:00
|
|
|
*/
|
|
|
|
|
2004-01-12 00:31:52 +03:00
|
|
|
struct mca_pml_base_module_1_0_0_t {
|
2004-01-14 06:42:02 +03:00
|
|
|
mca_base_module_t pmlm_version;
|
|
|
|
mca_base_module_data_1_0_0_t pmlm_data;
|
|
|
|
mca_pml_base_init_fn_t pmlm_init;
|
2004-01-09 22:20:50 +03:00
|
|
|
};
|
2004-01-12 00:31:52 +03:00
|
|
|
typedef struct mca_pml_base_module_1_0_0_t mca_pml_base_module_1_0_0_t;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
|
2004-01-09 08:11:33 +03:00
|
|
|
/*
|
|
|
|
* Struct that represents the common state and interface functions
|
|
|
|
* provided by a PML.
|
|
|
|
*/
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-14 06:42:02 +03:00
|
|
|
struct mca_pml_t {
|
2004-01-13 03:36:37 +03:00
|
|
|
|
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-13 03:36:37 +03:00
|
|
|
mca_pml_base_add_ptls_fn_t pml_add_ptls;
|
|
|
|
mca_pml_base_fini_fn_t pml_fini;
|
|
|
|
|
|
|
|
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_progress_fn_t pml_progress;
|
|
|
|
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-14 06:42:02 +03:00
|
|
|
typedef struct mca_pml_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-09 08:11:33 +03:00
|
|
|
* Global functions for MCA: overall PML open and close
|
2004-01-09 06:26:12 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
int mca_pml_base_close(void);
|
|
|
|
int mca_pml_base_open(lam_cmd_line_t *cmd);
|
|
|
|
int mca_pml_base_init(void);
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Public variables
|
|
|
|
*/
|
|
|
|
|
2004-01-10 01:48:57 +03:00
|
|
|
extern lam_list_t *mca_pml_base_opened;
|
|
|
|
extern lam_list_t *mca_pml_base_available;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
/*
|
2004-01-12 00:31:52 +03:00
|
|
|
* Global instance of array of pointers to mca_base_module_t. Will
|
2004-01-09 06:26:12 +03:00
|
|
|
* effectively be filled in by configure.
|
|
|
|
*/
|
|
|
|
|
2004-01-12 00:31:52 +03:00
|
|
|
extern const mca_base_module_t **mca_pml_base_modules;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-12 00:31:52 +03:00
|
|
|
#endif /* MCA_PML_H */
|