Changes to pass allocmem IBM test
- don't free the send buffer unless the converter tells us we need to - properly do the math to determine when the receive buffer has been fully used and unlinked itself This commit was SVN r5703.
Этот коммит содержится в:
родитель
f5657fb8ee
Коммит
e2c2c72b84
@ -164,8 +164,6 @@ mca_ptl_portals_component_open(void)
|
|||||||
mca_ptl_portals_param_register_int("first_frag_queue_size",
|
mca_ptl_portals_param_register_int("first_frag_queue_size",
|
||||||
PTL_PORTALS_DEFAULT_FIRST_FRAG_QUEUE_SIZE);
|
PTL_PORTALS_DEFAULT_FIRST_FRAG_QUEUE_SIZE);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* finish with objects */
|
/* finish with objects */
|
||||||
asprintf(&(portals_output_stream.lds_prefix), "ptl_portals (%5d): ", getpid());
|
asprintf(&(portals_output_stream.lds_prefix), "ptl_portals (%5d): ", getpid());
|
||||||
|
|
||||||
@ -337,7 +335,11 @@ mca_ptl_portals_component_progress(mca_ptl_tstamp_t tstamp)
|
|||||||
assert(which == 0);
|
assert(which == 0);
|
||||||
|
|
||||||
#if PTL_PORTALS_HAVE_EVENT_UNLINK
|
#if PTL_PORTALS_HAVE_EVENT_UNLINK
|
||||||
if (PTL_EVENT_UNLINK == ev.type) continue;
|
if (PTL_EVENT_UNLINK == ev.type) {
|
||||||
|
ompi_output_verbose(2000, mca_ptl_portals_component.portals_output,
|
||||||
|
"-----> unlink event occurred <-----");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (ev.md.user_ptr == NULL) {
|
if (ev.md.user_ptr == NULL) {
|
||||||
/* no request associated with it - it's a receive */
|
/* no request associated with it - it's a receive */
|
||||||
|
@ -271,7 +271,7 @@ mca_ptl_portals_process_recv_event(struct mca_ptl_portals_module_t *ptl,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* see if we need to repost an md */
|
/* see if we need to repost an md */
|
||||||
if (ev->offset > ev->md.length - ev->md.max_size) {
|
if (ev->offset + ev->md.length > ev->md.max_size) {
|
||||||
ompi_output_verbose(100, mca_ptl_portals_component.portals_output,
|
ompi_output_verbose(100, mca_ptl_portals_component.portals_output,
|
||||||
"must repost event: %lld, %lld, %lld",
|
"must repost event: %lld, %lld, %lld",
|
||||||
ev->offset, ev->md.length, ev->md.max_size);
|
ev->offset, ev->md.length, ev->md.max_size);
|
||||||
|
@ -84,7 +84,6 @@ mca_ptl_portals_send(struct mca_ptl_base_module_t *ptl_base,
|
|||||||
struct iovec iov;
|
struct iovec iov;
|
||||||
unsigned int iov_count;
|
unsigned int iov_count;
|
||||||
unsigned int max_data;
|
unsigned int max_data;
|
||||||
int32_t freeAfter;
|
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
convertor = &sendfrag->frag_send.frag_base.frag_convertor;
|
convertor = &sendfrag->frag_send.frag_base.frag_convertor;
|
||||||
@ -111,7 +110,7 @@ mca_ptl_portals_send(struct mca_ptl_base_module_t *ptl_base,
|
|||||||
&iov,
|
&iov,
|
||||||
&iov_count,
|
&iov_count,
|
||||||
&max_data,
|
&max_data,
|
||||||
&freeAfter)) < 0) {
|
&(sendfrag->free_data))) < 0) {
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
sendfrag->frag_vector[1].iov_base = iov.iov_base;
|
sendfrag->frag_vector[1].iov_base = iov.iov_base;
|
||||||
@ -198,19 +197,16 @@ mca_ptl_portals_process_send_event(ptl_event_t *ev)
|
|||||||
"SEND_END event for msg %d",
|
"SEND_END event for msg %d",
|
||||||
(int) hdr->hdr_match.hdr_msg_seq);
|
(int) hdr->hdr_match.hdr_msg_seq);
|
||||||
} else if (ev->type == PTL_EVENT_ACK) {
|
} else if (ev->type == PTL_EVENT_ACK) {
|
||||||
bool frag_ack;
|
|
||||||
ompi_output_verbose(100, mca_ptl_portals_component.portals_output,
|
ompi_output_verbose(100, mca_ptl_portals_component.portals_output,
|
||||||
"ACK event for msg %d",
|
"ACK event for msg %d",
|
||||||
(int) hdr->hdr_match.hdr_msg_seq);
|
(int) hdr->hdr_match.hdr_msg_seq);
|
||||||
|
|
||||||
/* discard ACKs for acks */
|
/* discard ACKs for acks */
|
||||||
if (frag->frag_send.frag_request == NULL) {
|
if (frag->frag_send.frag_request == NULL) {
|
||||||
if (frag->frag_send.frag_base.frag_addr != NULL) {
|
|
||||||
free(frag->frag_send.frag_base.frag_addr);
|
|
||||||
}
|
|
||||||
OMPI_FREE_LIST_RETURN(&mca_ptl_portals_component.portals_send_frags,
|
OMPI_FREE_LIST_RETURN(&mca_ptl_portals_component.portals_send_frags,
|
||||||
(ompi_list_item_t*) frag);
|
(ompi_list_item_t*) frag);
|
||||||
} else {
|
} else {
|
||||||
|
bool frag_ack;
|
||||||
|
|
||||||
frag_ack = (hdr->hdr_common.hdr_flags & MCA_PTL_FLAGS_ACK) ? true : false;
|
frag_ack = (hdr->hdr_common.hdr_flags & MCA_PTL_FLAGS_ACK) ? true : false;
|
||||||
if (frag_ack == false) {
|
if (frag_ack == false) {
|
||||||
@ -225,8 +221,8 @@ mca_ptl_portals_process_send_event(ptl_event_t *ev)
|
|||||||
/* return frag to freelist if not part of request */
|
/* return frag to freelist if not part of request */
|
||||||
if (frag->frag_send.frag_request->req_cached == false ||
|
if (frag->frag_send.frag_request->req_cached == false ||
|
||||||
frag->frag_send.frag_base.frag_header.hdr_common.hdr_type == MCA_PTL_HDR_TYPE_FRAG) {
|
frag->frag_send.frag_base.frag_header.hdr_common.hdr_type == MCA_PTL_HDR_TYPE_FRAG) {
|
||||||
if (frag->frag_send.frag_base.frag_addr != NULL) {
|
if (frag->free_data) {
|
||||||
free(frag->frag_send.frag_base.frag_addr);
|
free(frag->frag_vector[1].iov_base);
|
||||||
}
|
}
|
||||||
OMPI_FREE_LIST_RETURN(&mca_ptl_portals_component.portals_send_frags,
|
OMPI_FREE_LIST_RETURN(&mca_ptl_portals_component.portals_send_frags,
|
||||||
(ompi_list_item_t*) frag);
|
(ompi_list_item_t*) frag);
|
||||||
|
@ -29,6 +29,7 @@ extern "C" {
|
|||||||
struct mca_ptl_portals_send_frag_t {
|
struct mca_ptl_portals_send_frag_t {
|
||||||
mca_ptl_base_send_frag_t frag_send;
|
mca_ptl_base_send_frag_t frag_send;
|
||||||
ptl_md_iovec_t frag_vector[2];
|
ptl_md_iovec_t frag_vector[2];
|
||||||
|
int32_t free_data;
|
||||||
};
|
};
|
||||||
typedef struct mca_ptl_portals_send_frag_t mca_ptl_portals_send_frag_t;
|
typedef struct mca_ptl_portals_send_frag_t mca_ptl_portals_send_frag_t;
|
||||||
OBJ_CLASS_DECLARATION (mca_ptl_portals_send_frag_t);
|
OBJ_CLASS_DECLARATION (mca_ptl_portals_send_frag_t);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user