2004-01-09 06:26:12 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
2004-02-10 19:53:41 +03:00
|
|
|
/*
|
2004-01-14 06:42:02 +03:00
|
|
|
* P2P Transport Layer (PTL)
|
|
|
|
*/
|
2004-01-29 05:49:32 +03:00
|
|
|
#ifndef MCA_PTL_H
|
|
|
|
#define MCA_PTL_H
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
#include "mca/mca.h"
|
2004-03-17 21:45:16 +03:00
|
|
|
#include "lam.h"
|
|
|
|
#include "lfc/lam_list.h"
|
|
|
|
#include "proc/proc.h"
|
|
|
|
#include "mca/pml/pml.h"
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
|
2004-01-12 22:17:09 +03:00
|
|
|
/*
|
2004-01-14 06:42:02 +03:00
|
|
|
* PTL types
|
2004-01-12 22:17:09 +03:00
|
|
|
*/
|
|
|
|
|
2004-01-14 06:42:02 +03:00
|
|
|
struct mca_ptl_t;
|
2004-02-05 03:50:37 +03:00
|
|
|
struct mca_ptl_base_peer_t;
|
2004-01-14 06:42:02 +03:00
|
|
|
struct mca_ptl_base_fragment_t;
|
2004-02-10 19:53:41 +03:00
|
|
|
struct mca_ptl_base_recv_request_t;
|
2004-01-14 06:42:02 +03:00
|
|
|
struct mca_ptl_base_send_request_t;
|
2004-02-04 00:33:29 +03:00
|
|
|
struct mca_ptl_base_recv_frag_t;
|
2004-02-10 19:53:41 +03:00
|
|
|
struct mca_ptl_base_send_frag_t;
|
2004-02-12 23:55:10 +03:00
|
|
|
struct mca_ptl_base_match_header_t;
|
2004-01-14 06:42:02 +03:00
|
|
|
|
|
|
|
typedef uint64_t mca_ptl_base_sequence_t;
|
|
|
|
typedef uint64_t mca_ptl_base_tstamp_t;
|
|
|
|
typedef lam_list_t mca_ptl_base_queue_t;
|
|
|
|
|
2004-01-14 18:18:14 +03:00
|
|
|
/*
|
|
|
|
* PTL module interface functions and datatype.
|
|
|
|
*/
|
|
|
|
|
2004-01-14 06:42:02 +03:00
|
|
|
/**
|
2004-01-14 18:18:14 +03:00
|
|
|
* MCA->PTL Intializes the PTL module and creates specific PTL instance(s).
|
2004-01-14 06:42:02 +03:00
|
|
|
*
|
2004-01-31 02:02:39 +03:00
|
|
|
* @param num_ptls (OUT) Returns the number of ptl instances created.
|
|
|
|
*
|
|
|
|
* @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.
|
|
|
|
*
|
|
|
|
* @return Array of pointers to PTL instances.
|
2004-01-09 06:26:12 +03:00
|
|
|
*/
|
2004-01-14 18:18:14 +03:00
|
|
|
typedef struct mca_ptl_t** (*mca_ptl_base_module_init_fn_t)(
|
2004-01-31 02:02:39 +03:00
|
|
|
int *num_ptls,
|
|
|
|
bool *allow_multi_user_threads,
|
|
|
|
bool *have_hidden_threads
|
2004-01-14 06:42:02 +03:00
|
|
|
);
|
|
|
|
|
2004-01-14 18:18:14 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* PML->PTL Progresses outstanding requests in each PTL module.
|
|
|
|
*
|
|
|
|
* @param timstamp (IN) The current time - used for retransmisstion timers.
|
|
|
|
*/
|
|
|
|
typedef void (*mca_ptl_base_module_progress_fn_t)(
|
|
|
|
mca_ptl_base_tstamp_t timestamp
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PTL module version and interface functions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct mca_ptl_base_module_1_0_0_t {
|
|
|
|
mca_base_module_t ptlm_version;
|
|
|
|
mca_base_module_data_1_0_0_t ptlm_data;
|
|
|
|
mca_ptl_base_module_init_fn_t ptlm_init;
|
|
|
|
mca_ptl_base_module_progress_fn_t ptlm_progress;
|
|
|
|
};
|
|
|
|
typedef struct mca_ptl_base_module_1_0_0_t mca_ptl_base_module_1_0_0_t;
|
|
|
|
typedef struct mca_ptl_base_module_1_0_0_t mca_ptl_base_module_t;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* PTL instance interface functions and datatype.
|
|
|
|
*/
|
|
|
|
|
2004-01-14 06:42:02 +03:00
|
|
|
/**
|
|
|
|
* PML->PTL notification of change in the process list.
|
|
|
|
*
|
|
|
|
* @param ptl (IN)
|
|
|
|
* @param procs (IN)
|
|
|
|
* @param nprocs (IN)
|
|
|
|
* @return
|
2004-01-09 06:26:12 +03:00
|
|
|
*/
|
2004-01-15 20:43:54 +03:00
|
|
|
typedef int (*mca_ptl_base_add_proc_fn_t)(
|
2004-01-14 06:42:02 +03:00
|
|
|
struct mca_ptl_t* ptl,
|
2004-01-15 20:43:54 +03:00
|
|
|
struct lam_proc_t* proc,
|
2004-02-05 03:50:37 +03:00
|
|
|
struct mca_ptl_base_peer_t**
|
2004-01-14 06:42:02 +03:00
|
|
|
);
|
|
|
|
|
2004-01-15 22:51:06 +03:00
|
|
|
/**
|
|
|
|
* PML->PTL notification of change in the process list.
|
|
|
|
*
|
|
|
|
* @param ptl (IN)
|
|
|
|
* @param procs (IN)
|
|
|
|
* @param nprocs (IN)
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
typedef int (*mca_ptl_base_del_proc_fn_t)(
|
|
|
|
struct mca_ptl_t* ptl,
|
|
|
|
struct lam_proc_t* proc,
|
2004-02-05 03:50:37 +03:00
|
|
|
struct mca_ptl_base_peer_t*
|
2004-01-15 22:51:06 +03:00
|
|
|
);
|
|
|
|
|
2004-01-14 06:42:02 +03:00
|
|
|
/**
|
2004-01-14 18:18:14 +03:00
|
|
|
* MCA->PTL Clean up any resources held by PTL instance before the module is unloaded.
|
|
|
|
*
|
|
|
|
* @param ptl (IN) The PTL module instance that is being unloaded.
|
2004-01-14 06:42:02 +03:00
|
|
|
*/
|
2004-01-31 02:02:39 +03:00
|
|
|
typedef int (*mca_ptl_base_finalize_fn_t)(
|
2004-01-14 18:18:14 +03:00
|
|
|
struct mca_ptl_t* ptl
|
2004-01-14 06:42:02 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
typedef int (*mca_ptl_base_request_alloc_fn_t)(
|
|
|
|
struct mca_ptl_t* ptl,
|
2004-01-29 22:27:39 +03:00
|
|
|
struct mca_ptl_base_send_request_t** request
|
|
|
|
);
|
|
|
|
|
2004-01-30 02:50:31 +03:00
|
|
|
typedef void (*mca_ptl_base_request_return_fn_t)(
|
2004-01-29 22:27:39 +03:00
|
|
|
struct mca_ptl_t* ptl,
|
|
|
|
struct mca_ptl_base_send_request_t* request
|
2004-01-14 06:42:02 +03:00
|
|
|
);
|
|
|
|
|
2004-02-04 00:33:29 +03:00
|
|
|
typedef void (*mca_ptl_base_frag_return_fn_t)(
|
|
|
|
struct mca_ptl_t* ptl,
|
|
|
|
struct mca_ptl_base_recv_frag_t* frag
|
|
|
|
);
|
|
|
|
|
2004-01-14 06:42:02 +03:00
|
|
|
typedef int (*mca_ptl_base_send_fn_t)(
|
|
|
|
struct mca_ptl_t* ptl,
|
2004-02-05 03:50:37 +03:00
|
|
|
struct mca_ptl_base_peer_t* ptl_base_peer,
|
2004-01-14 18:18:14 +03:00
|
|
|
struct mca_ptl_base_send_request_t* send_request,
|
2004-03-16 18:12:11 +03:00
|
|
|
size_t size,
|
|
|
|
int flags
|
2004-01-14 06:42:02 +03:00
|
|
|
);
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-02-10 19:53:41 +03:00
|
|
|
typedef void (*mca_ptl_base_recv_fn_t)(
|
2004-02-04 00:33:29 +03:00
|
|
|
struct mca_ptl_t* ptl,
|
2004-03-16 18:12:11 +03:00
|
|
|
struct mca_ptl_base_recv_frag_t* recv_frag,
|
|
|
|
struct lam_status_public_t* recv_status
|
2004-02-04 00:33:29 +03:00
|
|
|
);
|
|
|
|
|
2004-02-12 23:55:10 +03:00
|
|
|
typedef int (*mca_ptl_base_match_fn_t)(
|
|
|
|
struct mca_ptl_base_recv_frag_t* frag,
|
|
|
|
struct mca_ptl_base_match_header_t* header
|
|
|
|
);
|
|
|
|
|
2004-02-10 19:53:41 +03:00
|
|
|
typedef void (*mca_ptl_base_recv_progress_fn_t)(
|
|
|
|
struct mca_ptl_base_recv_request_t* recv_request,
|
|
|
|
struct mca_ptl_base_recv_frag_t* recv_frag
|
|
|
|
);
|
|
|
|
|
|
|
|
typedef void (*mca_ptl_base_send_progress_fn_t)(
|
|
|
|
struct mca_ptl_base_send_request_t* send_request,
|
|
|
|
struct mca_ptl_base_send_frag_t* send_frag
|
|
|
|
);
|
|
|
|
|
2004-01-14 06:42:02 +03:00
|
|
|
/**
|
2004-01-14 18:18:14 +03:00
|
|
|
* PTL instance interface functions and common state.
|
2004-01-09 08:11:33 +03:00
|
|
|
*/
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-14 06:42:02 +03:00
|
|
|
struct mca_ptl_t {
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-09 08:11:33 +03:00
|
|
|
/* PTL common attributes */
|
2004-01-14 06:42:02 +03:00
|
|
|
mca_ptl_base_module_t* ptl_module;
|
2004-01-15 03:58:54 +03:00
|
|
|
size_t ptl_first_frag_size; /**< maximum size of first fragment */
|
|
|
|
size_t ptl_min_frag_size; /**< threshold below which the PTL will not fragment */
|
|
|
|
size_t ptl_max_frag_size; /**< maximum fragment size supported by the PTL */
|
2004-01-15 22:51:06 +03:00
|
|
|
uint32_t ptl_exclusivity; /**< indicates this PTL should be used exclusively */
|
|
|
|
uint32_t ptl_latency; /**< relative ranking of latency used to prioritize ptls */
|
|
|
|
uint32_t ptl_bandwidth; /**< bandwidth (Mbytes/sec) supported by each endpoint */
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-02-10 19:53:41 +03:00
|
|
|
/* PML->PTL function table */
|
2004-01-29 22:27:39 +03:00
|
|
|
mca_ptl_base_add_proc_fn_t ptl_add_proc;
|
|
|
|
mca_ptl_base_del_proc_fn_t ptl_del_proc;
|
2004-01-31 02:02:39 +03:00
|
|
|
mca_ptl_base_finalize_fn_t ptl_finalize;
|
2004-01-29 22:27:39 +03:00
|
|
|
mca_ptl_base_send_fn_t ptl_send;
|
2004-02-05 03:50:37 +03:00
|
|
|
mca_ptl_base_recv_fn_t ptl_recv;
|
2004-01-29 22:27:39 +03:00
|
|
|
mca_ptl_base_request_alloc_fn_t ptl_request_alloc;
|
|
|
|
mca_ptl_base_request_return_fn_t ptl_request_return;
|
2004-02-04 00:33:29 +03:00
|
|
|
mca_ptl_base_frag_return_fn_t ptl_frag_return;
|
2004-02-10 19:53:41 +03:00
|
|
|
|
|
|
|
/* PTL->PML function table - filled in by PML at init */
|
2004-02-12 23:55:10 +03:00
|
|
|
mca_ptl_base_match_fn_t ptl_match;
|
2004-02-10 19:53:41 +03:00
|
|
|
mca_ptl_base_send_progress_fn_t ptl_send_progress;
|
|
|
|
mca_ptl_base_recv_progress_fn_t ptl_recv_progress;
|
2004-01-12 22:17:09 +03:00
|
|
|
};
|
2004-01-14 06:42:02 +03:00
|
|
|
typedef struct mca_ptl_t mca_ptl_t;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
/*
|
2004-01-30 06:55:39 +03:00
|
|
|
* Macro for use in modules that are of type ptl v1.0.0
|
2004-01-09 06:26:12 +03:00
|
|
|
*/
|
2004-01-30 06:55:39 +03:00
|
|
|
#define MCA_PTL_BASE_VERSION_1_0_0 \
|
|
|
|
/* coll v1.0 is chained to MCA v1.0 */ \
|
|
|
|
MCA_BASE_VERSION_1_0_0, \
|
|
|
|
/* ptl v1.0 */ \
|
|
|
|
"ptl", 1, 0, 0
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
#endif /* LAM_MCA_PTL_H */
|