OpenMPI
0.1.1
|
Matching Transport Layer. More...
#include "ompi_config.h"
#include "mpi.h"
#include "opal/mca/mca.h"
#include "ompi/mca/pml/pml.h"
#include "ompi/request/request.h"
Go to the source code of this file.
Data Structures | |
struct | mca_mtl_request_t |
struct | mca_mtl_base_component_2_0_0_t |
struct | mca_mtl_base_module_t |
MTL module interface functions and attributes. More... | |
Macros | |
#define | MCA_MTL_BASE_VERSION_2_0_0 |
#define | OMPI_MTL_CALL(a) ompi_mtl->mtl_ ## a |
Typedefs | |
typedef struct mca_mtl_request_t | mca_mtl_request_t |
typedef struct mca_mtl_base_module_t *(* | mca_mtl_base_component_init_fn_t )(bool enable_progress_threads, bool enable_mpi_threads) |
Initialization routine for MTL component. More... | |
typedef struct mca_mtl_base_component_2_0_0_t | mca_mtl_base_component_2_0_0_t |
typedef struct mca_mtl_base_component_2_0_0_t | mca_mtl_base_component_t |
typedef int(* | mca_mtl_base_module_finalize_fn_t )(struct mca_mtl_base_module_t *mtl) |
MCA->MTL Clean up any resources held by MTL module. More... | |
typedef int(* | mca_mtl_base_module_add_procs_fn_t )(struct mca_mtl_base_module_t *mtl, size_t nprocs, struct ompi_proc_t **procs, struct mca_mtl_base_endpoint_t **mtl_peer_data) |
PML->MTL notification of change in the process list. More... | |
typedef int(* | mca_mtl_base_module_del_procs_fn_t )(struct mca_mtl_base_module_t *mtl, size_t nprocs, struct ompi_proc_t **procs, struct mca_mtl_base_endpoint_t **mtl_peer_data) |
Notification of change to the process list. More... | |
typedef int(* | mca_mtl_base_module_send_fn_t )(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm, int dest, int tag, struct opal_convertor_t *convertor, mca_pml_base_send_mode_t mode) |
Blocking send to peer. More... | |
typedef int(* | mca_mtl_base_module_isend_fn_t )(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm, int dest, int tag, struct opal_convertor_t *convertor, mca_pml_base_send_mode_t mode, bool blocking, mca_mtl_request_t *mtl_request) |
Non-blocking send to peer. More... | |
typedef int(* | mca_mtl_base_module_irecv_fn_t )(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm, int src, int tag, struct opal_convertor_t *convertor, struct mca_mtl_request_t *mtl_request) |
Non-blocking receive. More... | |
typedef int(* | mca_mtl_base_module_iprobe_fn_t )(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm, int src, int tag, int *flag, struct ompi_status_public_t *status) |
Non-blocking probe. More... | |
typedef int(* | mca_mtl_base_module_imrecv_fn_t )(struct mca_mtl_base_module_t *mtl, struct opal_convertor_t *convertor, struct ompi_message_t **message, struct mca_mtl_request_t *mtl_request) |
typedef int(* | mca_mtl_base_module_improbe_fn_t )(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm, int src, int tag, int *matched, struct ompi_message_t **message, struct ompi_status_public_t *status) |
typedef int(* | mca_mtl_base_module_cancel_fn_t )(struct mca_mtl_base_module_t *mtl, mca_mtl_request_t *mtl_request, int flag) |
Cancel an existing request. More... | |
typedef int(* | mca_mtl_base_module_add_comm_fn_t )(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm) |
Downcall from PML layer when a new communicator is created. More... | |
typedef int(* | mca_mtl_base_module_del_comm_fn_t )(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm) |
Downcall from PML layer when a communicator is destroyed. More... | |
typedef struct mca_mtl_base_module_t | mca_mtl_base_module_t |
Variables | |
OMPI_DECLSPEC mca_mtl_base_module_t * | ompi_mtl |
Matching Transport Layer.
The Matching Transport Layer (MTL) provides device-layer support for transfer of MPI point-to-point messages over devices that support hardware / library message matching. This layer is used with the MTL PML component to provide lowest latency and highest bandwidth on given architectures. Features found in other PML interfaces, such as message fragmenting, multi-device support, and NIC failover are not provided by the upper layers.
In general, this interface should not be used for transport layer support. Instead, the BTL interface should be used. The BTL interface allows for multiplexing between multiple users (point-to-point, one-sided, etc.) and provides many features not found in this interface (RDMA from arbitrary buffers, active messaging, reasonable pinned memory caching, etc.)
#define MCA_MTL_BASE_VERSION_2_0_0 |
typedef struct mca_mtl_base_module_t*(* mca_mtl_base_component_init_fn_t)(bool enable_progress_threads, bool enable_mpi_threads) |
Initialization routine for MTL component.
Initialization routine for MTL component. This function should allocate resources for communication and try to do all local setup. It should not attempt to contract it's peers, as that should be done at add_procs time. Contact information should be published during this initialization function. It will be made available during add_procs().
enable_progress_threads | (IN) Progress threads have been enabled by the user and the component must be capable of making asycnhronous progress (either with its own thread, with the kernel, or with the event library. |
enable_mpi_threads | (IN) MPI threads have been enabled by the user and the component must be capable of coping with threads. If the component can cope with MPI_THREAD_MULTIPLE, enable_mpi_thread_multiple should be set to true. Otherwise, it is assumed that only THREAD_FUNNELLED and THREAD_SERIALIZED can be used. |
enable_mpi_thread_multiple | (OUT) Component does / does not support MPI_THREAD_MULTIPLE. This variable only needs to be set if enable_mpi_threads is true. Otherwise, the return value will be ignored. |
NULL | component can not operate on the current machine |
non-NULL | component interface function |
typedef int(* mca_mtl_base_module_add_comm_fn_t)(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm) |
Downcall from PML layer when a new communicator is created.
comm | Communicator |
Provides the MTL the opportunity to initialize/cache a data structure on the communicator.
typedef int(* mca_mtl_base_module_add_procs_fn_t)(struct mca_mtl_base_module_t *mtl, size_t nprocs, struct ompi_proc_t **procs, struct mca_mtl_base_endpoint_t **mtl_peer_data) |
PML->MTL notification of change in the process list.
The mca_mtl_base_module_add_procs_fn_t() is used by the PML to notify the MTL that new processes are connected to the current process. Any addressing information exported by the peer via the ompi_modex_send() function should be available during this call via the corresponding ompi_modex_recv() function. The MTL may utilize this information to determine reachability of each peer process.
It is an error for a proc to not be reachable by the given MTL, and an error should be returned if that case is detected. The PML provides the MTL the option to return a pointer to a data structure defined by the MTL that is passed in with all communication functions. The array of procinfo pointers will be allocated by the PML, but it is up to the MTL module to create the memory for the procinfo structure itself. The procinfo structure is opaque to the PML and is only used internally by the MTL.
mtl | (IN) MTL module |
nprocs | (IN) Number of processes |
procs | (IN) Set of processes |
endpoint | (OUT) Array of (optional) mca_mtl_base_procinfo_t structures, one per proc in procs |
OMPI_SUCCESS | successfully connected to processes |
other | failure during setup |
typedef int(* mca_mtl_base_module_cancel_fn_t)(struct mca_mtl_base_module_t *mtl, mca_mtl_request_t *mtl_request, int flag) |
Cancel an existing request.
Attempt to cancel an existing request. The (poorly defined) semantics for MPI_CANCEL must be implemented by this call. This, of course, allows the MTL module to do nothing at all. Implementations of the MTL should make a good faith effort to cancel receive requests that have not been started, as the "post a receive for control messages" paradigm is a common one in loosely coupled MPI applications.
request(IN) | Request that should be cancelled |
flag | Unknown exactly what this does. |
typedef int(* mca_mtl_base_module_del_comm_fn_t)(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm) |
Downcall from PML layer when a communicator is destroyed.
comm | Communicator |
Provides the MTL the opportunity to cleanup any datastructures associated with the communicator.
typedef int(* mca_mtl_base_module_del_procs_fn_t)(struct mca_mtl_base_module_t *mtl, size_t nprocs, struct ompi_proc_t **procs, struct mca_mtl_base_endpoint_t **mtl_peer_data) |
Notification of change to the process list.
When the process list changes, the PML notifies the MTL of the change, to provide the opportunity to cleanup or release any resources associated with the peer.
mtl | (IN) MTL module |
nprocs | (IN) Number of processes |
proc | (IN) Set of processes |
peer | (IN) Set of peer addressing information. |
typedef int(* mca_mtl_base_module_finalize_fn_t)(struct mca_mtl_base_module_t *mtl) |
MCA->MTL Clean up any resources held by MTL module.
Opposite of module_init. Called when communication will no longer be necessary. ussually this is during MPI_FINALIZE, but it can be earlier if the component was not selected to run. Assuming module_init was called, finalize will always be called before the component_close function is called.
mtl | (IN) MTL module returned from call to initialize |
OMPI_SUCCESS | cleanup finished successfully |
other | failure during cleanup |
typedef int(* mca_mtl_base_module_iprobe_fn_t)(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm, int src, int tag, int *flag, struct ompi_status_public_t *status) |
Non-blocking probe.
Non-blocking probe function. Standard MPI semantics for MPI_IPROBE must be implemented by this call.
comm | (IN) Communicator used for operation |
src | (IN) Source rank for send (relative to comm) |
tag | (IN) MPI tag used for sending. See note below. |
flag | (OUT) true if message available, false otherwise |
status | (OUT) Status structure for information on available message |
typedef int(* mca_mtl_base_module_irecv_fn_t)(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm, int src, int tag, struct opal_convertor_t *convertor, struct mca_mtl_request_t *mtl_request) |
Non-blocking receive.
Non-blocking receive function. Standard MPI semantics for MPI_Irecv must be implemented by this call.
The PML will handle creation of the request, leaving the number of bytes requested in teh module structure available for the MTL, directly after the ompi_request_t structure. The PML will handle proper destruction of the request once it can safely be destroyed (it has been completed and free'ed by a call to REQUEST_FREE or TEST/WAIT). The MTL should remove all resources associated with the request when it is marked as completed.
comm | (IN) Communicator used for operation |
src | (IN) Source rank for send (relative to comm) |
tag | (IN) MPI tag used for sending. See note below. |
convertor | (IN) Datatype convertor describing receive datatype. Already prepared for receive. |
mtl_request | (IN) Pointer to mtl_request. The ompi_req field will be populated with an initialized ompi_request_t before calling. |
typedef int(* mca_mtl_base_module_isend_fn_t)(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm, int dest, int tag, struct opal_convertor_t *convertor, mca_pml_base_send_mode_t mode, bool blocking, mca_mtl_request_t *mtl_request) |
Non-blocking send to peer.
Non-blocking send to peer. Standard MPI semantics must be met by this call, as mandated in the mode argument. There is one special mode argument, MCA_PML_BASE_SEND_COMPLETE, which requires local completion before the request is marked as complete.
The PML will handle creation of the request, leaving the number of bytes requested in the module structure available for the MTL directly after the ompi_request_t structure. The PML will handle proper destruction of the request once it can safely be destructed (it has been completed and freeed by a call to REQUEST_FReE or TEST/WAIT). The MTL should remove all resources associated with the request when it is marked as completed.
comm | (IN) Communicator used for operation |
dest | (IN) Destination rank for send (relative to comm) |
tag | (IN) MPI tag used for sending. See note below. |
convertor | (IN) Datatype convertor describing send datatype. Already prepared for send. |
mode | (IN) Mode for send operation (see pml.h) |
blocking | (IN) True if the call originated from a blocking call, but the PML decided to use a non-blocking operation, likely for internal performance decisions This is an optimization flag and is not needed for correctness. |
mtl_request | (IN) Pointer to mtl_request. The ompi_req field will be populated with an initialized ompi_request_t before calling. |
typedef int(* mca_mtl_base_module_send_fn_t)(struct mca_mtl_base_module_t *mtl, struct ompi_communicator_t *comm, int dest, int tag, struct opal_convertor_t *convertor, mca_pml_base_send_mode_t mode) |
Blocking send to peer.
Blocking send (Call should not return until the user buffer may be used again). Standard MPI semantics must be met by this call, as mandated in the mode argument. There is one special mode argument, MCA_PML_BASE_SEND_COMPLETE, which requires local completion before the function can return. This is an optimization for coillective routines that can otherwise lead to degenerate performance for broadcast-based collectives.
comm | (IN) Communicator used for operation |
dest | (IN) Destination rank for send (relative to comm) |
tag | (IN) MPI tag used for sending. See note below. |
convertor | (IN) Datatype convertor describing send datatype. Already prepared for send. |
mode | (IN) Mode for send operation |