2004-01-09 06:26:12 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef LAM_MCA_PML_H
|
|
|
|
#define LAM_MCA_PML_H
|
|
|
|
|
2004-01-10 01:09:51 +03:00
|
|
|
#include "lam/lam.h"
|
|
|
|
#include "lam/proc.h"
|
2004-01-09 06:26:12 +03:00
|
|
|
#include "lam/lfc/list.h"
|
2004-01-09 22:20:50 +03:00
|
|
|
#include "mca/mca.h"
|
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-09 08:11:33 +03:00
|
|
|
typedef int (*mca_pml_query_fn_t)(int *priority);
|
|
|
|
typedef struct mca_pml_1_0_0 * (*mca_pml_init_1_0_0_fn_t)(
|
2004-01-09 22:20:50 +03:00
|
|
|
struct lam_proc_t **procs,
|
2004-01-09 08:11:33 +03:00
|
|
|
int nprocs,
|
|
|
|
int *max_tag,
|
|
|
|
int *max_cid
|
|
|
|
);
|
|
|
|
|
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-09 22:20:50 +03:00
|
|
|
typedef uint64_t mca_pml_sequence_t;
|
|
|
|
typedef uint64_t mca_pml_tstamp_t;
|
2004-01-10 01:48:57 +03:00
|
|
|
typedef lam_list_t mca_pml_queue_t;
|
2004-01-09 22:20:50 +03:00
|
|
|
|
2004-01-09 08:11:33 +03:00
|
|
|
typedef enum {
|
2004-01-09 22:20:50 +03:00
|
|
|
MCA_PML_REQUEST_TYPE_RECV,
|
|
|
|
MCA_PML_REQUEST_TYPE_SEND_STANDARD,
|
|
|
|
MCA_PML_REQUEST_TYPE_SEND_BUFFERED,
|
|
|
|
MCA_PML_REQUEST_TYPE_SEND_SYNCHRONOUS,
|
|
|
|
MCA_PML_REQUEST_TYPE_SEND_READY
|
2004-01-09 08:11:33 +03:00
|
|
|
} mca_pml_request_type_t;
|
|
|
|
|
|
|
|
|
2004-01-09 22:20:50 +03:00
|
|
|
/*
|
|
|
|
* PML interface functions
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct lam_communicator_t;
|
|
|
|
struct lam_datatype_t;
|
|
|
|
struct lam_proc_t;
|
|
|
|
struct lam_request_t;
|
|
|
|
|
|
|
|
typedef int (*mca_pml_progress_fn_t)(mca_pml_tstamp_t);
|
2004-01-09 08:11:33 +03:00
|
|
|
|
|
|
|
typedef int (*mca_pml_isend_fn_t)(
|
|
|
|
void *buf,
|
|
|
|
size_t size,
|
2004-01-09 22:20:50 +03:00
|
|
|
struct lam_datatype_t *datatype,
|
2004-01-09 08:11:33 +03:00
|
|
|
int dest,
|
|
|
|
int tag,
|
2004-01-09 22:20:50 +03:00
|
|
|
struct lam_communicator_t* comm,
|
2004-01-09 08:11:33 +03:00
|
|
|
mca_pml_request_type_t req_type,
|
2004-01-09 22:20:50 +03:00
|
|
|
struct lam_request_t **request
|
2004-01-09 08:11:33 +03:00
|
|
|
);
|
|
|
|
|
2004-01-09 22:20:50 +03:00
|
|
|
typedef int (*mca_pml_addprocs_fn_t)(lam_proc_t **procs, int nprocs);
|
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-09 22:20:50 +03:00
|
|
|
struct mca_pml_module_1_0_0_t {
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-10 20:28:05 +03:00
|
|
|
mca_module_1_0_0_t super;
|
2004-01-09 22:20:50 +03:00
|
|
|
mca_pml_query_fn_t pmlm_query;
|
|
|
|
mca_pml_init_1_0_0_fn_t pmlm_init;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-09 22:20:50 +03:00
|
|
|
};
|
|
|
|
typedef struct mca_pml_module_1_0_0_t mca_pml_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 22:20:50 +03:00
|
|
|
struct mca_pml_1_0_0_t {
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-09 08:11:33 +03:00
|
|
|
mca_pml_addprocs_fn_t pml_addprocs;
|
|
|
|
mca_pml_isend_fn_t pml_isend;
|
|
|
|
mca_pml_progress_fn_t pml_progress;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-09 22:20:50 +03:00
|
|
|
};
|
|
|
|
typedef struct mca_pml_1_0_0_t mca_pml_1_0_0_t;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2004-01-09 08:11:33 +03:00
|
|
|
* Set the default type to use version 1.1.0 of the PML
|
2004-01-09 06:26:12 +03:00
|
|
|
*/
|
|
|
|
|
2004-01-09 22:20:50 +03:00
|
|
|
typedef struct mca_pml_module_1_1_0_t mca_pml_module_t;
|
|
|
|
typedef struct mca_pml_1_1_0_t mca_pml_t;
|
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_query(void);
|
|
|
|
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
|
|
|
|
|
|
|
/*
|
|
|
|
* Global instance of array of pointers to lam_ssi_rpi_t. Will
|
|
|
|
* effectively be filled in by configure.
|
|
|
|
*/
|
|
|
|
|
2004-01-10 20:28:05 +03:00
|
|
|
extern const mca_module_t **mca_pml_modules;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
#endif /* LAM_MCA_PML_H */
|