2004-01-14 06:42:02 +03:00
|
|
|
/*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_PML_BASE_SEND_REQUEST_H
|
|
|
|
#define MCA_PML_BASE_SEND_REQUEST_H
|
|
|
|
|
|
|
|
#include "lam_config.h"
|
|
|
|
|
|
|
|
#include "mca/mpi/ptl/ptl.h"
|
|
|
|
#include "mca/mpi/pml/base/pml_base_request.h"
|
2004-03-12 01:02:01 +03:00
|
|
|
#include "mca/mpi/ptl/base/ptl_base_comm.h"
|
2004-01-14 06:42:02 +03:00
|
|
|
|
|
|
|
|
2004-02-13 01:42:39 +03:00
|
|
|
extern lam_class_t mca_ptl_base_send_request_t_class;
|
2004-02-10 19:53:41 +03:00
|
|
|
struct mca_ptl_base_send_frag_t;
|
2004-01-29 01:52:51 +03:00
|
|
|
|
|
|
|
|
2004-01-14 06:42:02 +03:00
|
|
|
struct mca_ptl_base_send_request_t {
|
|
|
|
/* request object - common data structure for use by wait/test */
|
|
|
|
mca_pml_base_request_t super;
|
|
|
|
/* number of bytes that have already been assigned to a fragment */
|
2004-01-29 01:52:51 +03:00
|
|
|
size_t req_offset;
|
|
|
|
/* number of fragments that have been allocated */
|
|
|
|
size_t req_frags;
|
|
|
|
/* number of bytes that have been sent */
|
|
|
|
size_t req_bytes_sent;
|
2004-01-14 06:42:02 +03:00
|
|
|
/* number of bytes that have been acked */
|
|
|
|
size_t req_bytes_acked;
|
|
|
|
/* clear to send flag */
|
|
|
|
bool req_clear_to_send;
|
|
|
|
/* type of send */
|
|
|
|
mca_pml_base_send_mode_t req_send_mode;
|
|
|
|
/* sequence number for MPI pt-2-pt ordering */
|
2004-03-12 01:02:01 +03:00
|
|
|
mca_ptl_base_sequence_t req_msg_seq;
|
2004-01-14 06:42:02 +03:00
|
|
|
/* queue of fragments that are waiting to be acknowledged */
|
|
|
|
mca_ptl_base_queue_t req_unacked_frags;
|
2004-01-14 18:18:14 +03:00
|
|
|
/* PTL that allocated this descriptor */
|
2004-01-30 02:50:31 +03:00
|
|
|
struct mca_ptl_t* req_owner;
|
|
|
|
/* PTL peer instance that will be used for first fragment */
|
2004-02-05 03:50:37 +03:00
|
|
|
struct mca_ptl_base_peer_t* req_peer;
|
|
|
|
/* peer matched receive */
|
|
|
|
lam_ptr_t req_peer_request;
|
2004-01-14 06:42:02 +03:00
|
|
|
};
|
|
|
|
typedef struct mca_ptl_base_send_request_t mca_ptl_base_send_request_t;
|
|
|
|
|
|
|
|
|
2004-01-29 01:52:51 +03:00
|
|
|
static inline void mca_ptl_base_send_request_reinit(
|
2004-01-14 06:42:02 +03:00
|
|
|
mca_ptl_base_send_request_t *request,
|
2004-01-29 22:27:39 +03:00
|
|
|
void *addr,
|
2004-01-14 06:42:02 +03:00
|
|
|
size_t length,
|
|
|
|
lam_datatype_t* datatype,
|
|
|
|
int peer,
|
|
|
|
int tag,
|
|
|
|
lam_communicator_t* comm,
|
|
|
|
mca_pml_base_send_mode_t sendmode,
|
|
|
|
bool persistent)
|
|
|
|
{
|
|
|
|
request->req_clear_to_send = false;
|
2004-01-29 01:52:51 +03:00
|
|
|
request->req_offset = 0;
|
|
|
|
request->req_frags = 0;
|
|
|
|
request->req_bytes_sent = 0;
|
2004-01-14 06:42:02 +03:00
|
|
|
request->req_bytes_acked = 0;
|
|
|
|
request->req_send_mode = sendmode;
|
2004-02-05 03:50:37 +03:00
|
|
|
request->req_peer_request.lval = 0;
|
2004-03-12 01:02:01 +03:00
|
|
|
request->req_msg_seq = mca_pml_ptl_comm_send_sequence(comm->c_pml_comm, peer);
|
2004-01-29 22:27:39 +03:00
|
|
|
request->super.req_addr = addr;
|
|
|
|
request->super.req_length = length;
|
2004-01-14 06:42:02 +03:00
|
|
|
request->super.req_datatype = datatype;
|
|
|
|
request->super.req_peer = peer;
|
|
|
|
request->super.req_tag = tag;
|
2004-03-12 01:02:01 +03:00
|
|
|
request->super.req_comm = comm;
|
2004-01-14 06:42:02 +03:00
|
|
|
request->super.req_type = MCA_PML_REQUEST_SEND;
|
|
|
|
request->super.req_persistent = persistent;
|
|
|
|
request->super.req_mpi_done = false;
|
2004-03-12 01:02:01 +03:00
|
|
|
request->super.req_pml_done = false;
|
2004-01-14 06:42:02 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|