2004-06-03 22:13:01 +00:00
|
|
|
/*
|
2004-11-22 01:38:40 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2005-03-24 12:43:37 +00:00
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-06-03 22:13:01 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*/
|
|
|
|
#ifndef MCA_PTL_SM_H
|
|
|
|
#define MCA_PTL_SM_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/types.h>
|
2005-07-13 04:16:03 +00:00
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
2004-06-03 22:13:01 +00:00
|
|
|
#include <sys/socket.h>
|
2005-07-13 04:16:03 +00:00
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
2004-06-03 22:13:01 +00:00
|
|
|
#include <netinet/in.h>
|
2005-07-13 04:16:03 +00:00
|
|
|
#endif
|
|
|
|
|
2004-06-15 19:07:45 +00:00
|
|
|
#include "class/ompi_free_list.h"
|
2004-11-11 20:34:28 +00:00
|
|
|
#include "class/ompi_bitmap.h"
|
2004-12-07 15:38:01 +00:00
|
|
|
#include "class/ompi_fifo.h"
|
2005-07-03 23:09:55 +00:00
|
|
|
#include "opal/event/event.h"
|
2004-06-03 22:13:01 +00:00
|
|
|
#include "mca/pml/pml.h"
|
|
|
|
#include "mca/ptl/ptl.h"
|
2004-06-17 20:57:47 +00:00
|
|
|
#include "mca/mpool/mpool.h"
|
2004-08-06 19:35:57 +00:00
|
|
|
#include "mca/common/sm/common_sm_mmap.h"
|
2005-08-18 00:09:51 +00:00
|
|
|
#include "mca/ptl/sm/ptl_sm_peer.h"
|
2004-12-07 15:38:01 +00:00
|
|
|
|
2004-10-20 22:31:03 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2004-08-05 21:59:24 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Shared Memory resource managment
|
|
|
|
*/
|
|
|
|
struct mca_ptl_sm_module_resource_t {
|
2004-08-28 16:45:14 +00:00
|
|
|
/* base control structures */
|
2004-08-18 15:02:21 +00:00
|
|
|
mca_common_sm_file_header_t segment_header;
|
2004-08-28 16:45:14 +00:00
|
|
|
|
|
|
|
/* fifo queues - offsets relative to the base of the share memory
|
|
|
|
* segment will be stored here */
|
|
|
|
volatile ompi_fifo_t **fifo;
|
2004-08-05 21:59:24 +00:00
|
|
|
};
|
|
|
|
typedef struct mca_ptl_sm_module_resource_t mca_ptl_sm_module_resource_t;
|
|
|
|
extern mca_ptl_sm_module_resource_t mca_ptl_sm_module_resource;
|
2004-06-03 22:13:01 +00:00
|
|
|
|
2004-11-04 04:03:32 +00:00
|
|
|
#define SM_CONNECTED 1
|
|
|
|
#define SM_CONNECTED_SAME_BASE_ADDR 2
|
|
|
|
#define SM_CONNECTED_DIFFERENT_BASE_ADDR 3
|
|
|
|
|
2005-02-16 17:42:07 +00:00
|
|
|
#if OMPI_ENABLE_PROGRESS_THREADS == 1
|
2004-12-11 23:29:47 +00:00
|
|
|
#define DATA (char)0
|
|
|
|
#define DONE (char)1
|
|
|
|
#endif
|
2004-06-03 22:13:01 +00:00
|
|
|
/**
|
|
|
|
* Shared Memory (SM) PTL module.
|
|
|
|
*/
|
2004-08-02 00:24:22 +00:00
|
|
|
struct mca_ptl_sm_component_t {
|
|
|
|
mca_ptl_base_component_1_0_0_t super; /**< base PTL component */
|
2004-09-14 12:28:33 +00:00
|
|
|
int sm_first_frag_free_list_num; /**< initial size of free lists */
|
|
|
|
int sm_first_frag_free_list_max; /**< maximum size of free lists */
|
|
|
|
int sm_first_frag_free_list_inc; /**< number of elements to alloc when growing free lists */
|
|
|
|
int sm_second_frag_free_list_num; /**< initial size of free lists */
|
|
|
|
int sm_second_frag_free_list_max; /**< maximum size of free lists */
|
|
|
|
int sm_second_frag_free_list_inc; /**< number of elements to alloc when growing free lists */
|
2004-10-21 22:40:25 +00:00
|
|
|
int sm_max_procs; /**< upper limit on the number of processes using the shared memory pool */
|
|
|
|
int sm_extra_procs; /**< number of extra procs to allow */
|
2004-06-17 20:57:47 +00:00
|
|
|
char* sm_mpool_name; /**< name of shared memory pool module */
|
2004-08-04 17:23:34 +00:00
|
|
|
mca_mpool_base_module_t* sm_mpool; /**< shared memory pool */
|
2004-06-17 20:57:47 +00:00
|
|
|
void* sm_mpool_base; /**< base address of shared memory pool */
|
2004-09-13 13:52:43 +00:00
|
|
|
size_t first_fragment_size; /**< first fragment size */
|
|
|
|
size_t max_fragment_size; /**< maximum (second and
|
|
|
|
beyone) fragment size */
|
2004-09-03 22:34:52 +00:00
|
|
|
size_t fragment_alignment; /**< fragment alignment */
|
2005-07-03 22:45:48 +00:00
|
|
|
opal_mutex_t sm_lock;
|
2004-08-06 23:19:25 +00:00
|
|
|
char* sm_resouce_ctl_file; /**< name of shared memory file used
|
|
|
|
to coordinate resource usage */
|
2004-08-18 15:02:21 +00:00
|
|
|
mca_common_sm_mmap_t *mmap_file; /**< description of mmap'ed
|
|
|
|
file */
|
2004-08-28 16:45:14 +00:00
|
|
|
mca_ptl_sm_module_resource_t *sm_ctl_header; /* control header in
|
|
|
|
shared memory */
|
2004-09-16 15:40:24 +00:00
|
|
|
ompi_fifo_t **fifo; /**< cached copy of the pointer to the 2D
|
|
|
|
fifo array. The address in the shared
|
|
|
|
memory segment sm_ctl_header is a relative,
|
|
|
|
but this one, in process private memory, is
|
|
|
|
a real virtual address */
|
|
|
|
size_t size_of_cb_queue; /**< size of each circular buffer queue array */
|
|
|
|
size_t cb_lazy_free_freq; /**< frequency of lazy free */
|
2005-04-12 21:17:45 +00:00
|
|
|
ssize_t *sm_offset; /**< offset to be applied to shared memory
|
2004-11-04 04:03:32 +00:00
|
|
|
addresses, per local process value */
|
|
|
|
int *sm_proc_connect; /* scratch array used by the 0'th ptl to
|
|
|
|
* set indicate sm connectivty. Used by
|
|
|
|
* the 1'st ptl */
|
2004-10-18 23:24:53 +00:00
|
|
|
size_t num_smp_procs; /**< current number of smp procs on this
|
2004-08-28 16:45:14 +00:00
|
|
|
host */
|
2004-11-04 04:03:32 +00:00
|
|
|
int num_smp_procs_same_base_addr; /* number of procs with same
|
|
|
|
base shared memory virtual
|
|
|
|
address as this process */
|
|
|
|
int num_smp_procs_different_base_addr; /* number of procs with
|
|
|
|
different base shared memory
|
|
|
|
virtual address as this
|
|
|
|
process */
|
|
|
|
int *list_smp_procs_same_base_addr; /* number of procs with same
|
|
|
|
base shared memory virtual
|
|
|
|
address as this process */
|
|
|
|
int *list_smp_procs_different_base_addr; /* number of procs with different
|
|
|
|
base shared memory virtual
|
|
|
|
address as this process */
|
2005-01-17 21:37:56 +00:00
|
|
|
uint32_t my_smp_rank; /**< My SMP process rank. Used for accessing
|
|
|
|
* SMP specfic data structures. */
|
2004-11-04 04:03:32 +00:00
|
|
|
ompi_free_list_t sm_first_frags; /**< free list of sm first
|
|
|
|
fragments */
|
|
|
|
ompi_free_list_t sm_second_frags; /**< free list of sm second
|
|
|
|
and above fragments */
|
|
|
|
ompi_free_list_t sm_send_requests; /**< free list of sm send requests -- sendreq + sendfrag */
|
|
|
|
ompi_free_list_t sm_first_frags_to_progress; /**< list of first
|
|
|
|
fragments that are
|
|
|
|
awaiting resources */
|
2005-07-03 22:45:48 +00:00
|
|
|
opal_mutex_t sm_pending_ack_lock;
|
2005-07-03 16:22:16 +00:00
|
|
|
opal_list_t sm_pending_ack; /**< list of fragmnent that need to be
|
2004-11-04 04:03:32 +00:00
|
|
|
acked */
|
2004-12-07 15:38:01 +00:00
|
|
|
|
|
|
|
struct mca_ptl_base_peer_t **sm_peers;
|
2005-02-16 17:42:07 +00:00
|
|
|
#if OMPI_ENABLE_PROGRESS_THREADS == 1
|
2004-12-07 15:38:01 +00:00
|
|
|
char sm_fifo_path[PATH_MAX]; /**< path to fifo used to signal this process */
|
|
|
|
int sm_fifo_fd; /**< file descriptor corresponding to opened fifo */
|
2005-07-03 22:45:48 +00:00
|
|
|
opal_thread_t sm_fifo_thread;
|
2004-12-07 15:38:01 +00:00
|
|
|
#endif
|
2004-06-03 22:13:01 +00:00
|
|
|
};
|
2004-08-02 00:24:22 +00:00
|
|
|
typedef struct mca_ptl_sm_component_t mca_ptl_sm_component_t;
|
|
|
|
extern mca_ptl_sm_component_t mca_ptl_sm_component;
|
2004-06-03 22:13:01 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Register shared memory module parameters with the MCA framework
|
|
|
|
*/
|
2004-08-02 00:24:22 +00:00
|
|
|
extern int mca_ptl_sm_component_open(void);
|
2004-06-03 22:13:01 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Any final cleanup before being unloaded.
|
|
|
|
*/
|
2004-08-02 00:24:22 +00:00
|
|
|
extern int mca_ptl_sm_component_close(void);
|
2004-06-03 22:13:01 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* SM module initialization.
|
|
|
|
*
|
|
|
|
* @param num_ptls (OUT) Number of PTLs returned in PTL array.
|
2005-03-27 13:05:23 +00:00
|
|
|
* @param enable_progress_threads (IN) Flag indicating whether PTL is allowed to have progress threads
|
|
|
|
* @param enable_mpi_threads (IN) Flag indicating whether PTL must support multilple simultaneous invocations from different threads
|
2004-06-03 22:13:01 +00:00
|
|
|
*
|
|
|
|
*/
|
2004-08-02 00:24:22 +00:00
|
|
|
extern mca_ptl_base_module_t** mca_ptl_sm_component_init(
|
2004-06-03 22:13:01 +00:00
|
|
|
int *num_ptls,
|
2005-03-27 13:05:23 +00:00
|
|
|
bool enable_progress_threads,
|
|
|
|
bool enable_mpi_threads
|
2004-06-03 22:13:01 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
2004-08-02 00:24:22 +00:00
|
|
|
* shared memory component control.
|
2004-06-03 22:13:01 +00:00
|
|
|
*/
|
2004-08-02 00:24:22 +00:00
|
|
|
extern int mca_ptl_sm_component_control(
|
2004-06-03 22:13:01 +00:00
|
|
|
int param,
|
|
|
|
void* value,
|
|
|
|
size_t size
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
2004-08-02 00:24:22 +00:00
|
|
|
* shared memory component progress.
|
2004-06-03 22:13:01 +00:00
|
|
|
*/
|
2004-08-02 00:24:22 +00:00
|
|
|
extern int mca_ptl_sm_component_progress(
|
2004-06-03 22:13:01 +00:00
|
|
|
mca_ptl_tstamp_t tstamp
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SM PTL Interface
|
|
|
|
*/
|
|
|
|
struct mca_ptl_sm_t {
|
2004-08-02 00:24:22 +00:00
|
|
|
mca_ptl_base_module_t super; /**< base PTL interface */
|
2004-09-16 15:40:24 +00:00
|
|
|
|
2004-10-21 22:40:25 +00:00
|
|
|
bool ptl_inited; /**< flag indicating if ptl has been inited */
|
2004-06-03 22:13:01 +00:00
|
|
|
};
|
|
|
|
typedef struct mca_ptl_sm_t mca_ptl_sm_t;
|
|
|
|
|
2004-11-04 04:03:32 +00:00
|
|
|
extern mca_ptl_sm_t mca_ptl_sm[2];
|
2004-06-03 22:13:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Cleanup any resources held by the PTL.
|
|
|
|
*
|
|
|
|
* @param ptl PTL instance.
|
2004-06-07 15:33:53 +00:00
|
|
|
* @return OMPI_SUCCESS or error status on failure.
|
2004-06-03 22:13:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
extern int mca_ptl_sm_finalize(
|
2004-08-02 00:24:22 +00:00
|
|
|
struct mca_ptl_base_module_t* ptl
|
2004-06-03 22:13:01 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PML->PTL notification of change in the process list.
|
2004-11-04 04:03:32 +00:00
|
|
|
* PML->PTL Notification that a receive fragment has been matched.
|
|
|
|
* Called for message that is send from process with the virtual
|
|
|
|
* address of the shared memory segment being different than that of
|
|
|
|
* the receiver.
|
2004-06-03 22:13:01 +00:00
|
|
|
*
|
|
|
|
* @param ptl (IN)
|
|
|
|
* @param proc (IN)
|
|
|
|
* @param peer (OUT)
|
2004-06-07 15:33:53 +00:00
|
|
|
* @return OMPI_SUCCESS or error status on failure.
|
2004-06-03 22:13:01 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
extern int mca_ptl_sm_add_procs(
|
2004-08-02 00:24:22 +00:00
|
|
|
struct mca_ptl_base_module_t* ptl,
|
2004-06-03 22:13:01 +00:00
|
|
|
size_t nprocs,
|
2004-06-07 15:33:53 +00:00
|
|
|
struct ompi_proc_t **procs,
|
2004-06-03 22:13:01 +00:00
|
|
|
struct mca_ptl_base_peer_t** peers,
|
2004-11-05 07:52:30 +00:00
|
|
|
struct ompi_bitmap_t* reachability
|
2004-06-03 22:13:01 +00:00
|
|
|
);
|
|
|
|
|
2005-07-15 15:22:15 +00:00
|
|
|
|
2004-11-04 04:03:32 +00:00
|
|
|
/**
|
|
|
|
* PML->PTL notification of change in the process list.
|
|
|
|
* PML->PTL Notification that a receive fragment has been matched.
|
|
|
|
* Called for message that is send from process with the virtual
|
|
|
|
* address of the shared memory segment being the same as that of
|
|
|
|
* the receiver.
|
|
|
|
*
|
|
|
|
* @param ptl (IN)
|
|
|
|
* @param proc (IN)
|
|
|
|
* @param peer (OUT)
|
|
|
|
* @return OMPI_SUCCESS or error status on failure.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
extern int mca_ptl_sm_add_procs_same_base_addr(
|
|
|
|
struct mca_ptl_base_module_t* ptl,
|
|
|
|
size_t nprocs,
|
|
|
|
struct ompi_proc_t **procs,
|
|
|
|
struct mca_ptl_base_peer_t** peers,
|
|
|
|
ompi_bitmap_t* reachability
|
|
|
|
);
|
|
|
|
|
2005-07-15 15:22:15 +00:00
|
|
|
|
2004-06-03 22:13:01 +00:00
|
|
|
/**
|
|
|
|
* PML->PTL notification of change in the process list.
|
|
|
|
*
|
|
|
|
* @param ptl (IN) PTL instance
|
|
|
|
* @param proc (IN) Peer process
|
|
|
|
* @param peer (IN) Peer addressing information.
|
|
|
|
* @return Status indicating if cleanup was successful
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern int mca_ptl_sm_del_procs(
|
2004-08-02 00:24:22 +00:00
|
|
|
struct mca_ptl_base_module_t* ptl,
|
2004-06-03 22:13:01 +00:00
|
|
|
size_t nprocs,
|
2004-06-07 15:33:53 +00:00
|
|
|
struct ompi_proc_t **procs,
|
2004-06-03 22:13:01 +00:00
|
|
|
struct mca_ptl_base_peer_t **peers
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PML->PTL Allocate a send request from the PTL modules free list.
|
|
|
|
*
|
|
|
|
* @param ptl (IN) PTL instance
|
|
|
|
* @param request (OUT) Pointer to allocated request.
|
|
|
|
* @return Status indicating if allocation was successful.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern int mca_ptl_sm_request_alloc(
|
2004-08-02 00:24:22 +00:00
|
|
|
struct mca_ptl_base_module_t* ptl,
|
2005-05-09 19:37:10 +00:00
|
|
|
struct mca_ptl_base_send_request_t*
|
2004-06-03 22:13:01 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PML->PTL Return a send request to the PTL modules free list.
|
|
|
|
*
|
|
|
|
* @param ptl (IN) PTL instance
|
|
|
|
* @param request (IN) Pointer to allocated request.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern void mca_ptl_sm_request_return(
|
2004-08-02 00:24:22 +00:00
|
|
|
struct mca_ptl_base_module_t* ptl,
|
2005-05-09 19:37:10 +00:00
|
|
|
struct mca_ptl_base_send_request_t*
|
2004-06-03 22:13:01 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PML->PTL Notification that a receive fragment has been matched.
|
2004-11-04 04:03:32 +00:00
|
|
|
* Called for message that is send from process with the virtual
|
|
|
|
* address of the shared memory segment being the same as that of
|
|
|
|
* the receiver.
|
|
|
|
*
|
|
|
|
* @param ptl (IN) PTL instance
|
|
|
|
* @param recv_frag (IN) Receive fragment
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern void mca_ptl_sm_matched_same_base_addr(
|
|
|
|
struct mca_ptl_base_module_t* ptl,
|
|
|
|
struct mca_ptl_base_recv_frag_t* frag
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PML->PTL notification of change in the process list.
|
|
|
|
*
|
|
|
|
* @param ptl (IN) PTL instance
|
|
|
|
* @param proc (IN) Peer process
|
|
|
|
* @param peer (IN) Peer addressing information.
|
|
|
|
* @return Status indicating if cleanup was successful
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern int mca_ptl_sm_del_procs(
|
|
|
|
struct mca_ptl_base_module_t* ptl,
|
|
|
|
size_t nprocs,
|
|
|
|
struct ompi_proc_t **procs,
|
|
|
|
struct mca_ptl_base_peer_t **peers
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PML->PTL Allocate a send request from the PTL modules free list.
|
|
|
|
*
|
|
|
|
* @param ptl (IN) PTL instance
|
|
|
|
* @param request (OUT) Pointer to allocated request.
|
|
|
|
* @return Status indicating if allocation was successful.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern int mca_ptl_sm_request_alloc(
|
|
|
|
struct mca_ptl_base_module_t* ptl,
|
2005-05-09 19:37:10 +00:00
|
|
|
struct mca_ptl_base_send_request_t*
|
2004-11-04 04:03:32 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PML->PTL Return a send request to the PTL modules free list.
|
|
|
|
*
|
|
|
|
* @param ptl (IN) PTL instance
|
|
|
|
* @param request (IN) Pointer to allocated request.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern void mca_ptl_sm_request_return(
|
|
|
|
struct mca_ptl_base_module_t* ptl,
|
2005-05-09 19:37:10 +00:00
|
|
|
struct mca_ptl_base_send_request_t*
|
2004-11-04 04:03:32 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PML->PTL Notification that a receive fragment has been matched.
|
|
|
|
* Called for message that is send from process with the virtual
|
|
|
|
* address of the shared memory segment being different than that of
|
|
|
|
* the receiver.
|
2004-06-03 22:13:01 +00:00
|
|
|
*
|
|
|
|
* @param ptl (IN) PTL instance
|
|
|
|
* @param recv_frag (IN) Receive fragment
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern void mca_ptl_sm_matched(
|
2004-08-02 00:24:22 +00:00
|
|
|
struct mca_ptl_base_module_t* ptl,
|
2004-06-03 22:13:01 +00:00
|
|
|
struct mca_ptl_base_recv_frag_t* frag
|
|
|
|
);
|
2004-11-04 04:03:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* PML->PTL Notification that a receive fragment has been matched.
|
|
|
|
* Called for message that is send from process with the virtual
|
|
|
|
* address of the shared memory segment being the same as that of
|
|
|
|
* the receiver.
|
|
|
|
*
|
|
|
|
* @param ptl (IN) PTL instance
|
|
|
|
* @param recv_frag (IN) Receive fragment
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
extern void mca_ptl_sm_matched_common_base_addr(
|
|
|
|
struct mca_ptl_base_module_t* ptl,
|
|
|
|
struct mca_ptl_base_recv_frag_t* frag
|
|
|
|
);
|
|
|
|
|
2004-06-03 22:13:01 +00:00
|
|
|
/**
|
|
|
|
* PML->PTL Initiate a send of the specified size.
|
|
|
|
*
|
|
|
|
* @param ptl (IN) PTL instance
|
|
|
|
* @param ptl_base_peer (IN) PTL peer addressing
|
|
|
|
* @param send_request (IN/OUT) Send request (allocated by PML via mca_ptl_base_request_alloc_fn_t)
|
|
|
|
* @param size (IN) Number of bytes PML is requesting PTL to deliver
|
|
|
|
* @param flags (IN) Flags that should be passed to the peer via the message header.
|
2004-06-07 15:33:53 +00:00
|
|
|
* @param request (OUT) OMPI_SUCCESS if the PTL was able to queue one or more fragments
|
2004-06-03 22:13:01 +00:00
|
|
|
*/
|
|
|
|
extern int mca_ptl_sm_send(
|
2004-08-02 00:24:22 +00:00
|
|
|
struct mca_ptl_base_module_t* ptl,
|
2004-06-03 22:13:01 +00:00
|
|
|
struct mca_ptl_base_peer_t* ptl_peer,
|
2005-05-09 19:37:10 +00:00
|
|
|
struct mca_ptl_base_send_request_t*,
|
2004-06-03 22:13:01 +00:00
|
|
|
size_t offset,
|
2004-06-24 19:28:30 +00:00
|
|
|
size_t size,
|
2004-06-03 22:13:01 +00:00
|
|
|
int flags
|
|
|
|
);
|
|
|
|
|
2004-10-11 22:56:46 +00:00
|
|
|
/**
|
|
|
|
* PML->PTL send second and subsequent fragments
|
|
|
|
*
|
|
|
|
* @param ptl (IN) PTL instance
|
|
|
|
* @param ptl_base_peer (IN) PTL peer addressing
|
|
|
|
* @param send_request (IN/OUT) Send request (allocated by PML via mca_ptl_base_request_alloc_fn_t)
|
|
|
|
* @param size (IN) Number of bytes PML is requesting PTL to deliver
|
|
|
|
* @param flags (IN) Flags that should be passed to the peer via the message header.
|
|
|
|
* @param request (OUT) OMPI_SUCCESS if the PTL was able to queue one or more fragments
|
|
|
|
*/
|
|
|
|
extern int mca_ptl_sm_send_continue(
|
|
|
|
struct mca_ptl_base_module_t* ptl,
|
|
|
|
struct mca_ptl_base_peer_t* ptl_peer,
|
2005-05-09 19:37:10 +00:00
|
|
|
struct mca_ptl_base_send_request_t*,
|
2004-10-11 22:56:46 +00:00
|
|
|
size_t offset,
|
|
|
|
size_t size,
|
|
|
|
int flags
|
|
|
|
);
|
|
|
|
|
2004-06-11 20:42:01 +00:00
|
|
|
|
2005-02-16 17:42:07 +00:00
|
|
|
#if OMPI_ENABLE_PROGRESS_THREADS == 1
|
2005-07-03 16:06:07 +00:00
|
|
|
void mca_ptl_sm_component_event_thread(opal_object_t*);
|
2004-12-07 15:38:01 +00:00
|
|
|
#endif
|
2005-07-15 15:22:15 +00:00
|
|
|
|
|
|
|
|
2005-02-16 17:42:07 +00:00
|
|
|
#if OMPI_ENABLE_PROGRESS_THREADS == 1
|
2004-12-07 15:38:01 +00:00
|
|
|
#define MCA_PTL_SM_SIGNAL_PEER(peer) \
|
|
|
|
{ \
|
2004-12-11 23:29:47 +00:00
|
|
|
unsigned char cmd = DATA; \
|
2004-12-07 15:38:01 +00:00
|
|
|
if(write(peer->fifo_fd, &cmd, sizeof(cmd)) != sizeof(cmd)) { \
|
2005-07-03 23:31:27 +00:00
|
|
|
opal_output(0, "mca_ptl_sm_send: write fifo failed: errno=%d\n", errno); \
|
2004-12-07 15:38:01 +00:00
|
|
|
} \
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#define MCA_PTL_SM_SIGNAL_PEER(peer)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-10-20 22:31:03 +00:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2004-06-03 22:13:01 +00:00
|
|
|
#endif
|
|
|
|
|