2004-01-09 06:26:12 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
2004-01-14 06:42:02 +03:00
|
|
|
/** @file
|
|
|
|
*
|
|
|
|
* P2P Transport Layer (PTL)
|
|
|
|
*/
|
2004-01-09 06:26:12 +03:00
|
|
|
#ifndef LAM_MCA_PTL_H
|
|
|
|
#define LAM_MCA_PTL_H
|
|
|
|
|
|
|
|
#include "mca/mca.h"
|
2004-01-12 21:17:29 +03:00
|
|
|
#include "lam/lam.h"
|
2004-01-09 06:26:12 +03:00
|
|
|
#include "lam/lfc/list.h"
|
2004-01-12 21:17:29 +03:00
|
|
|
#include "mpi/proc/proc.h"
|
|
|
|
#include "mca/mpi/pml/pml.h"
|
2004-01-14 06:42:02 +03:00
|
|
|
#include "mca/mpi/ptl/ptl.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-01-15 20:43:54 +03:00
|
|
|
struct mca_ptl_addr_t;
|
2004-01-14 06:42:02 +03:00
|
|
|
struct mca_ptl_base_fragment_t;
|
|
|
|
struct mca_ptl_base_send_request_t;
|
|
|
|
|
|
|
|
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
|
|
|
*
|
|
|
|
* @param num_ptls (OUT) Returns the number of ptl instances created.
|
|
|
|
* @param thread_min (OUT) Minimum thread level supported by the PTL.
|
|
|
|
* @param thread_max (OUT) Maximum thread level supported by the PTL.
|
|
|
|
* @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-14 06:42:02 +03:00
|
|
|
int* num_ptls,
|
|
|
|
int *thread_min,
|
|
|
|
int *thread_max
|
|
|
|
);
|
|
|
|
|
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,
|
|
|
|
struct mca_ptl_addr_t**
|
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
|
|
|
*/
|
|
|
|
typedef int (*mca_ptl_base_fini_fn_t)(
|
2004-01-14 18:18:14 +03:00
|
|
|
struct mca_ptl_t* ptl
|
2004-01-14 06:42:02 +03:00
|
|
|
);
|
|
|
|
|
2004-01-14 18:18:14 +03:00
|
|
|
/**
|
|
|
|
* PML->PTL notification of change in the process list.
|
|
|
|
*
|
|
|
|
* @param ptl (IN)
|
|
|
|
* @param procs (IN)
|
|
|
|
* @param nprocs (IN)
|
|
|
|
* @return
|
|
|
|
*/
|
2004-01-14 06:42:02 +03:00
|
|
|
typedef int (*mca_ptl_base_request_alloc_fn_t)(
|
|
|
|
struct mca_ptl_t* ptl,
|
2004-01-14 18:18:14 +03:00
|
|
|
struct mca_ptl_base_send_request_t** send_request
|
2004-01-14 06:42:02 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
typedef int (*mca_ptl_base_send_fn_t)(
|
|
|
|
struct mca_ptl_t* ptl,
|
2004-01-15 20:43:54 +03:00
|
|
|
struct mca_ptl_addr_t* ptl_addr,
|
2004-01-14 18:18:14 +03:00
|
|
|
struct mca_ptl_base_send_request_t* send_request,
|
|
|
|
size_t size,
|
|
|
|
bool* complete
|
2004-01-14 06:42:02 +03:00
|
|
|
);
|
2004-01-09 06:26:12 +03:00
|
|
|
|
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 20:43:54 +03:00
|
|
|
int ptl_exclusive; /**< indicates this PTL should be used exclusively */
|
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 */
|
|
|
|
uint32_t ptl_latency; /**< relative/absolute measure of latency */
|
|
|
|
uint64_t ptl_bandwidth; /**< bandwidth (bytes/sec) supported by each endpoint */
|
2004-01-09 06:26:12 +03:00
|
|
|
|
2004-01-09 08:11:33 +03:00
|
|
|
/* PTL function table */
|
2004-01-15 20:43:54 +03:00
|
|
|
mca_ptl_base_add_proc_fn_t ptl_add_proc;
|
2004-01-14 06:42:02 +03:00
|
|
|
mca_ptl_base_fini_fn_t ptl_fini;
|
|
|
|
mca_ptl_base_send_fn_t ptl_send;
|
|
|
|
mca_ptl_base_request_alloc_fn_t ptl_request_alloc;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
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-09 08:11:33 +03:00
|
|
|
* Global functions for MCA: overall PTL open and close
|
2004-01-09 06:26:12 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
int mca_ptl_base_close(void);
|
2004-01-14 18:18:14 +03:00
|
|
|
int mca_ptl_base_open(void);
|
2004-01-09 06:26:12 +03:00
|
|
|
int mca_ptl_base_query(void);
|
|
|
|
int mca_ptl_base_init(void);
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Public variables
|
|
|
|
*/
|
|
|
|
|
2004-01-09 08:25:27 +03:00
|
|
|
extern lam_list_t *mca_ptl_base_opened;
|
|
|
|
extern lam_list_t *mca_ptl_base_available;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
/*
|
2004-01-09 08:11:33 +03:00
|
|
|
* Global instance of array of pointers to mca_t. Will
|
2004-01-09 06:26:12 +03:00
|
|
|
* effectively be filled in by configure.
|
|
|
|
*/
|
|
|
|
|
2004-01-12 21:17:29 +03:00
|
|
|
extern const mca_base_module_t **mca_ptl_base_modules;
|
2004-01-09 06:26:12 +03:00
|
|
|
|
|
|
|
#endif /* LAM_MCA_PTL_H */
|