1
1

* complete all outstanding Portals events before shutting down

* Remove all knowledge of PML requests from the Portals MTL

This commit was SVN r10675.
Этот коммит содержится в:
Brian Barrett 2006-07-06 14:33:29 +00:00
родитель 26eee59032
Коммит 95118f83f6
4 изменённых файлов: 16 добавлений и 18 удалений

Просмотреть файл

@ -177,6 +177,9 @@ ompi_mtl_portals_finalize(struct mca_mtl_base_module_t *mtl)
assert(mtl == &ompi_mtl_portals.base); assert(mtl == &ompi_mtl_portals.base);
opal_progress_unregister(ompi_mtl_portals_progress); opal_progress_unregister(ompi_mtl_portals_progress);
while (0 != ompi_mtl_portals_progress()) { }
ompi_common_portals_ni_finalize(); ompi_common_portals_ni_finalize();
ompi_common_portals_finalize(); ompi_common_portals_finalize();

Просмотреть файл

@ -25,7 +25,6 @@
#include "ompi/communicator/communicator.h" #include "ompi/communicator/communicator.h"
#include "ompi/datatype/convertor.h" #include "ompi/datatype/convertor.h"
#include "ompi/mca/mtl/base/base.h" #include "ompi/mca/mtl/base/base.h"
#include "ompi/mca/pml/base/pml_base_recvreq.h"
#include "mtl_portals.h" #include "mtl_portals.h"
#include "mtl_portals_endpoint.h" #include "mtl_portals_endpoint.h"
@ -39,37 +38,34 @@ static int
ompi_mtl_portals_recv_progress(ptl_event_t *ev, ompi_mtl_portals_recv_progress(ptl_event_t *ev,
struct ompi_mtl_portals_request_t* ptl_request) struct ompi_mtl_portals_request_t* ptl_request)
{ {
mca_pml_base_recv_request_t *recvreq =
(mca_pml_base_recv_request_t*) ptl_request->super.ompi_req;
switch (ev->type) { switch (ev->type) {
case PTL_EVENT_PUT_END: case PTL_EVENT_PUT_END:
/* make sure the data is in the right place */ /* make sure the data is in the right place */
ompi_mtl_datatype_unpack(&recvreq->req_convertor, ompi_mtl_datatype_unpack(ptl_request->convertor,
ev->md.start, ev->mlength); ev->md.start, ev->mlength);
/* set the status */ /* set the status */
recvreq->req_base.req_ompi.req_status.MPI_SOURCE = ptl_request->super.ompi_req->req_status.MPI_SOURCE =
PTL_GET_SOURCE(ev->match_bits); PTL_GET_SOURCE(ev->match_bits);
recvreq->req_base.req_ompi.req_status.MPI_TAG = ptl_request->super.ompi_req->req_status.MPI_TAG =
PTL_GET_TAG(ev->match_bits); PTL_GET_TAG(ev->match_bits);
recvreq->req_base.req_ompi.req_status.MPI_ERROR = ptl_request->super.ompi_req->req_status.MPI_ERROR =
(ev->rlength > ev->mlength) ? (ev->rlength > ev->mlength) ?
MPI_ERR_TRUNCATE : MPI_SUCCESS; MPI_ERR_TRUNCATE : MPI_SUCCESS;
recvreq->req_base.req_ompi.req_status._count = ptl_request->super.ompi_req->req_status._count =
ev->mlength; ev->mlength;
ptl_request->super.completion_callback(&ptl_request->super); ptl_request->super.completion_callback(&ptl_request->super);
break; break;
case PTL_EVENT_REPLY_END: case PTL_EVENT_REPLY_END:
/* make sure the data is in the right place */ /* make sure the data is in the right place */
ompi_mtl_datatype_unpack(&recvreq->req_convertor, ompi_mtl_datatype_unpack(ptl_request->convertor,
ev->md.start, ev->mlength); ev->md.start, ev->mlength);
PtlMDUnlink(ev->md_handle); PtlMDUnlink(ev->md_handle);
/* set the status */ /* set the status */
recvreq->req_base.req_ompi.req_status._count = ptl_request->super.ompi_req->req_status._count =
ev->mlength; ev->mlength;
ptl_request->super.completion_callback(&ptl_request->super); ptl_request->super.completion_callback(&ptl_request->super);
@ -98,8 +94,6 @@ ompi_mtl_portals_get_data(ompi_mtl_portals_event_t *recv_event,
abort(); abort();
} else { } else {
size_t buflen; size_t buflen;
mca_pml_base_recv_request_t *recvreq =
(mca_pml_base_recv_request_t*) ptl_request->super.ompi_req;
ret = ompi_mtl_datatype_recv_buf(convertor, &md.start, &buflen, ret = ompi_mtl_datatype_recv_buf(convertor, &md.start, &buflen,
&ptl_request->free_after); &ptl_request->free_after);
@ -125,11 +119,11 @@ ompi_mtl_portals_get_data(ompi_mtl_portals_event_t *recv_event,
0); 0);
if (PTL_OK != ret) abort(); if (PTL_OK != ret) abort();
recvreq->req_base.req_ompi.req_status.MPI_SOURCE = ptl_request->super.ompi_req->req_status.MPI_SOURCE =
PTL_GET_SOURCE(recv_event->ev.match_bits); PTL_GET_SOURCE(recv_event->ev.match_bits);
recvreq->req_base.req_ompi.req_status.MPI_TAG = ptl_request->super.ompi_req->req_status.MPI_TAG =
PTL_GET_TAG(recv_event->ev.match_bits); PTL_GET_TAG(recv_event->ev.match_bits);
recvreq->req_base.req_ompi.req_status.MPI_ERROR = ptl_request->super.ompi_req->req_status.MPI_ERROR =
(recv_event->ev.rlength > buflen) ? (recv_event->ev.rlength > buflen) ?
MPI_ERR_TRUNCATE : MPI_SUCCESS; MPI_ERR_TRUNCATE : MPI_SUCCESS;
} }
@ -157,6 +151,8 @@ ompi_mtl_portals_irecv(struct mca_mtl_base_module_t* mtl,
(ompi_mtl_portals_request_t*) mtl_request; (ompi_mtl_portals_request_t*) mtl_request;
size_t buflen; size_t buflen;
ptl_request->convertor = convertor;
if (MPI_ANY_SOURCE == src) { if (MPI_ANY_SOURCE == src) {
remote_proc.nid = PTL_NID_ANY; remote_proc.nid = PTL_NID_ANY;
remote_proc.pid = PTL_PID_ANY; remote_proc.pid = PTL_PID_ANY;

Просмотреть файл

@ -21,8 +21,8 @@
struct ompi_mtl_portals_request_t { struct ompi_mtl_portals_request_t {
struct mca_mtl_request_t super; struct mca_mtl_request_t super;
ptl_handle_eq_t eq_h;
bool free_after; bool free_after;
struct ompi_convertor_t *convertor;
int (*event_callback)(ptl_event_t *ev, struct ompi_mtl_portals_request_t*); int (*event_callback)(ptl_event_t *ev, struct ompi_mtl_portals_request_t*);
}; };

Просмотреть файл

@ -22,7 +22,6 @@
#include "ompi/communicator/communicator.h" #include "ompi/communicator/communicator.h"
#include "ompi/datatype/convertor.h" #include "ompi/datatype/convertor.h"
#include "ompi/mca/mtl/base/base.h" #include "ompi/mca/mtl/base/base.h"
#include "ompi/mca/pml/base/pml_base_sendreq.h"
#include "mtl_portals.h" #include "mtl_portals.h"
#include "mtl_portals_request.h" #include "mtl_portals_request.h"