cleanup for data structure reorg
This commit was SVN r5659.
Этот коммит содержится в:
родитель
876dfc4cfc
Коммит
d54c6fafe0
@ -61,14 +61,14 @@ AC_DEFUN([MCA_CONFIGURE_STUB],[
|
||||
EXTRA_LDFLAGS=
|
||||
if test -n "$with_ptl_ib_libdir"; then
|
||||
if test -d "$with_ptl_ib_libdir/lib"; then
|
||||
EXTRA_LDFLAGS="-L$with_ptl_ib_libdir/lib"
|
||||
EXTRA_LDFLAGS="-L$with_ptl_ib_libdir/lib64"
|
||||
else
|
||||
AC_MSG_WARN([*** Warning: cannot find $with_ptl_ib_libdir/lib])
|
||||
AC_MSG_WARN([*** Will still try to configure ib ptl anyway...])
|
||||
fi
|
||||
elif test -n "$with_ptl_ib"; then
|
||||
if test -d "$with_ptl_ib/lib"; then
|
||||
EXTRA_LDFLAGS="-L$with_ptl_ib/lib"
|
||||
EXTRA_LDFLAGS="-L$with_ptl_ib/lib64"
|
||||
else
|
||||
AC_MSG_WARN([*** Warning: cannot find $with_ptl_ib/lib])
|
||||
AC_MSG_WARN([*** Will still try to configure ib ptl anyway...])
|
||||
@ -80,18 +80,8 @@ AC_DEFUN([MCA_CONFIGURE_STUB],[
|
||||
|
||||
LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
|
||||
AC_CHECK_LIB([vapi], [EVAPI_list_hcas], [], [vapi_badness=true],
|
||||
[-lmtl_common -lmpga -lmosal])
|
||||
if test -n "$vapi_badness"; then
|
||||
AC_CHECK_LIB([pthread], [pthread_create],
|
||||
[pthread=yes LIBS="$LIBS -lpthread"],
|
||||
[pthread=no])
|
||||
if test "$pthread" = "yes"; then
|
||||
AC_CHECK_LIB([vapi], [EVAPI_open_hca], [],
|
||||
[AC_MSG_ERROR([*** Cannot find libvapi])],
|
||||
[-lmtl_common -lmpga -lmosal])
|
||||
fi
|
||||
fi
|
||||
LIBS="$LIBS -lmtl_common -lmpga"
|
||||
[-lmpga -lmosal])
|
||||
LIBS="$LIBS -lmpga -lmosal"
|
||||
|
||||
#
|
||||
# Save extra compiler/linker flags so that they can be added in
|
||||
|
@ -129,7 +129,7 @@ int mca_ptl_ib_finalize(struct mca_ptl_base_module_t* ptl)
|
||||
}
|
||||
|
||||
int mca_ptl_ib_request_init( struct mca_ptl_base_module_t* ptl,
|
||||
struct mca_pml_base_send_request_t* request)
|
||||
struct mca_ptl_base_send_request_t* request)
|
||||
{
|
||||
mca_ptl_ib_module_t* ib_ptl = (mca_ptl_ib_module_t*)ptl;
|
||||
mca_ptl_ib_send_frag_t* sendfrag;
|
||||
@ -146,7 +146,7 @@ int mca_ptl_ib_request_init( struct mca_ptl_base_module_t* ptl,
|
||||
|
||||
|
||||
void mca_ptl_ib_request_fini( struct mca_ptl_base_module_t* ptl,
|
||||
struct mca_pml_base_send_request_t* request)
|
||||
struct mca_ptl_base_send_request_t* request)
|
||||
{
|
||||
mca_ptl_ib_module_t* ib_ptl = (mca_ptl_ib_module_t*)ptl;
|
||||
mca_ptl_ib_send_request_t* sendreq = (mca_ptl_ib_send_request_t*)request;
|
||||
@ -162,7 +162,7 @@ void mca_ptl_ib_request_fini( struct mca_ptl_base_module_t* ptl,
|
||||
|
||||
int mca_ptl_ib_send( struct mca_ptl_base_module_t* ptl,
|
||||
struct mca_ptl_base_peer_t* ptl_peer,
|
||||
struct mca_pml_base_send_request_t* sendreq,
|
||||
struct mca_ptl_base_send_request_t* sendreq,
|
||||
size_t offset,
|
||||
size_t size,
|
||||
int flags)
|
||||
@ -196,15 +196,15 @@ int mca_ptl_ib_send( struct mca_ptl_base_module_t* ptl,
|
||||
* transfer could be in parallel.
|
||||
*/
|
||||
if( offset <= mca_ptl_ib_module.super.ptl_first_frag_size ) {
|
||||
convertor = &sendreq->req_convertor;
|
||||
convertor = &sendreq->req_send.req_convertor;
|
||||
} else {
|
||||
convertor = &sendfrag->frag_send.frag_base.frag_convertor;
|
||||
ompi_convertor_copy(&sendreq->req_convertor, convertor);
|
||||
ompi_convertor_copy(&sendreq->req_send.req_convertor, convertor);
|
||||
ompi_convertor_init_for_send( convertor,
|
||||
0,
|
||||
sendreq->req_base.req_datatype,
|
||||
sendreq->req_base.req_count,
|
||||
sendreq->req_base.req_addr,
|
||||
sendreq->req_send.req_base.req_datatype,
|
||||
sendreq->req_send.req_base.req_count,
|
||||
sendreq->req_send.req_base.req_addr,
|
||||
offset,
|
||||
NULL );
|
||||
}
|
||||
@ -245,12 +245,12 @@ int mca_ptl_ib_send( struct mca_ptl_base_module_t* ptl,
|
||||
/* Initialize header */
|
||||
hdr = (mca_ptl_base_header_t *) &sendfrag->ib_buf.buf[0];
|
||||
hdr->hdr_common.hdr_flags = flags;
|
||||
hdr->hdr_match.hdr_contextid = sendreq->req_base.req_comm->c_contextid;
|
||||
hdr->hdr_match.hdr_src = sendreq->req_base.req_comm->c_my_rank;
|
||||
hdr->hdr_match.hdr_dst = sendreq->req_base.req_peer;
|
||||
hdr->hdr_match.hdr_tag = sendreq->req_base.req_tag;
|
||||
hdr->hdr_match.hdr_msg_length = sendreq->req_bytes_packed;
|
||||
hdr->hdr_match.hdr_msg_seq = sendreq->req_base.req_sequence;
|
||||
hdr->hdr_match.hdr_contextid = sendreq->req_send.req_base.req_comm->c_contextid;
|
||||
hdr->hdr_match.hdr_src = sendreq->req_send.req_base.req_comm->c_my_rank;
|
||||
hdr->hdr_match.hdr_dst = sendreq->req_send.req_base.req_peer;
|
||||
hdr->hdr_match.hdr_tag = sendreq->req_send.req_base.req_tag;
|
||||
hdr->hdr_match.hdr_msg_length = sendreq->req_send.req_bytes_packed;
|
||||
hdr->hdr_match.hdr_msg_seq = sendreq->req_send.req_base.req_sequence;
|
||||
if((flags & MCA_PTL_FLAGS_ACK) == 0) {
|
||||
hdr->hdr_common.hdr_type = MCA_PTL_HDR_TYPE_MATCH;
|
||||
hdr_length = sizeof(mca_ptl_base_match_header_t);
|
||||
@ -272,8 +272,8 @@ int mca_ptl_ib_send( struct mca_ptl_base_module_t* ptl,
|
||||
}
|
||||
|
||||
/* if this is the entire message - signal request is complete */
|
||||
if(sendreq->req_bytes_packed == size) {
|
||||
ompi_request_complete( &(sendreq->req_base.req_ompi) );
|
||||
if(sendreq->req_send.req_bytes_packed == size) {
|
||||
ompi_request_complete( &(sendreq->req_send.req_base.req_ompi) );
|
||||
}
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
@ -284,7 +284,7 @@ int mca_ptl_ib_send( struct mca_ptl_base_module_t* ptl,
|
||||
|
||||
int mca_ptl_ib_put( struct mca_ptl_base_module_t* ptl,
|
||||
struct mca_ptl_base_peer_t* ptl_peer,
|
||||
struct mca_pml_base_send_request_t* req, size_t offset,
|
||||
struct mca_ptl_base_send_request_t* req, size_t offset,
|
||||
size_t size, int flags)
|
||||
{
|
||||
return OMPI_ERR_NOT_IMPLEMENTED;
|
||||
@ -301,7 +301,7 @@ static void mca_ptl_ib_ack(
|
||||
mca_ptl_ib_recv_frag_t *recv_frag)
|
||||
{
|
||||
mca_ptl_base_header_t *hdr;
|
||||
mca_pml_base_recv_request_t *request;
|
||||
mca_ptl_base_recv_request_t *request;
|
||||
mca_ptl_ib_peer_t *ib_peer;
|
||||
ib_buffer_t *ib_buf;
|
||||
int recv_len;
|
||||
@ -333,10 +333,10 @@ static void mca_ptl_ib_ack(
|
||||
|
||||
hdr->hdr_ack.hdr_dst_addr.lval = 0;
|
||||
|
||||
addr_to_reg = (void*)((char*)request->req_base.req_addr + recv_len);
|
||||
addr_to_reg = (void*)((char*)request->req_recv.req_base.req_addr + recv_len);
|
||||
hdr->hdr_ack.hdr_dst_addr.pval = addr_to_reg;
|
||||
|
||||
len_to_reg = request->req_bytes_packed - recv_len;
|
||||
len_to_reg = request->req_recv.req_bytes_packed - recv_len;
|
||||
hdr->hdr_ack.hdr_dst_size = len_to_reg;
|
||||
|
||||
A_PRINT("Dest addr : %p, RDMA Len : %d",
|
||||
@ -379,7 +379,7 @@ void mca_ptl_ib_matched(
|
||||
mca_ptl_base_recv_frag_t* frag)
|
||||
{
|
||||
mca_ptl_ib_module_t* ib_ptl = (mca_ptl_ib_module_t*)ptl;
|
||||
mca_pml_base_recv_request_t *request;
|
||||
mca_ptl_base_recv_request_t *request;
|
||||
mca_ptl_base_header_t *header;
|
||||
mca_ptl_ib_recv_frag_t *recv_frag;
|
||||
|
||||
@ -419,16 +419,16 @@ void mca_ptl_ib_matched(
|
||||
iov.iov_base = frag->frag_base.frag_addr;
|
||||
iov.iov_len = frag->frag_base.frag_size;
|
||||
|
||||
proc = ompi_comm_peer_lookup(request->req_base.req_comm,
|
||||
request->req_base.req_ompi.req_status.MPI_SOURCE);
|
||||
proc = ompi_comm_peer_lookup(request->req_recv.req_base.req_comm,
|
||||
request->req_recv.req_base.req_ompi.req_status.MPI_SOURCE);
|
||||
|
||||
ompi_convertor_copy(proc->proc_convertor, &frag->frag_base.frag_convertor);
|
||||
|
||||
ompi_convertor_init_for_recv( &frag->frag_base.frag_convertor,
|
||||
0,
|
||||
request->req_base.req_datatype,
|
||||
request->req_base.req_count,
|
||||
request->req_base.req_addr,
|
||||
request->req_recv.req_base.req_datatype,
|
||||
request->req_recv.req_base.req_count,
|
||||
request->req_recv.req_base.req_addr,
|
||||
0, /* fragment offset */
|
||||
NULL );
|
||||
ompi_convertor_unpack(&frag->frag_base.frag_convertor, &iov, &iov_count, &max_data, &freeAfter);
|
||||
|
@ -238,7 +238,7 @@ extern int mca_ptl_ib_del_procs(
|
||||
**/
|
||||
extern int mca_ptl_ib_request_init(
|
||||
struct mca_ptl_base_module_t* ptl,
|
||||
struct mca_pml_base_send_request_t*
|
||||
struct mca_ptl_base_send_request_t*
|
||||
);
|
||||
|
||||
/**
|
||||
@ -250,7 +250,7 @@ extern int mca_ptl_ib_request_init(
|
||||
**/
|
||||
extern void mca_ptl_ib_request_fini(
|
||||
struct mca_ptl_base_module_t* ptl,
|
||||
struct mca_pml_base_send_request_t*
|
||||
struct mca_ptl_base_send_request_t*
|
||||
);
|
||||
|
||||
/**
|
||||
@ -262,7 +262,7 @@ extern void mca_ptl_ib_request_fini(
|
||||
*/
|
||||
extern void mca_ptl_ib_request_return(
|
||||
struct mca_ptl_base_module_t* ptl,
|
||||
struct mca_pml_base_send_request_t*
|
||||
struct mca_ptl_base_send_request_t*
|
||||
);
|
||||
|
||||
/**
|
||||
@ -290,7 +290,7 @@ extern void mca_ptl_ib_matched(
|
||||
extern int mca_ptl_ib_send(
|
||||
struct mca_ptl_base_module_t* ptl,
|
||||
struct mca_ptl_base_peer_t* ptl_peer,
|
||||
struct mca_pml_base_send_request_t*,
|
||||
struct mca_ptl_base_send_request_t*,
|
||||
size_t offset,
|
||||
size_t size,
|
||||
int flags
|
||||
@ -309,7 +309,7 @@ extern int mca_ptl_ib_send(
|
||||
extern int mca_ptl_ib_put(
|
||||
struct mca_ptl_base_module_t* ptl,
|
||||
struct mca_ptl_base_peer_t* ptl_peer,
|
||||
struct mca_pml_base_send_request_t*,
|
||||
struct mca_ptl_base_send_request_t*,
|
||||
size_t offset,
|
||||
size_t size,
|
||||
int flags
|
||||
|
@ -53,7 +53,7 @@ void
|
||||
mca_ptl_ib_recv_frag_done (
|
||||
mca_ptl_base_header_t *header,
|
||||
mca_ptl_base_recv_frag_t* frag,
|
||||
mca_pml_base_recv_request_t *request)
|
||||
mca_ptl_base_recv_request_t *request)
|
||||
{
|
||||
D_PRINT("");
|
||||
frag->frag_base.frag_owner->ptl_recv_progress (
|
||||
@ -120,12 +120,12 @@ static void mca_ptl_ib_ctrl_frag(
|
||||
mca_ptl_base_header_t *header)
|
||||
{
|
||||
mca_ptl_ib_send_frag_t *send_frag;
|
||||
mca_pml_base_send_request_t *req;
|
||||
mca_ptl_base_send_request_t *req;
|
||||
void *data_ptr;
|
||||
|
||||
send_frag = (mca_ptl_ib_send_frag_t *)
|
||||
header->hdr_ack.hdr_src_ptr.pval;
|
||||
req = (mca_pml_base_send_request_t *)
|
||||
req = (mca_ptl_base_send_request_t *)
|
||||
send_frag->frag_send.frag_request;
|
||||
|
||||
req->req_peer_match = header->hdr_ack.hdr_dst_match;
|
||||
@ -148,12 +148,12 @@ static void mca_ptl_ib_last_frag(mca_ptl_ib_module_t *ib_ptl,
|
||||
mca_ptl_base_header_t *hdr)
|
||||
{
|
||||
mca_ptl_ib_fin_header_t *fin_hdr = (mca_ptl_ib_fin_header_t *)hdr;
|
||||
mca_pml_base_recv_request_t *request;
|
||||
request = (mca_pml_base_recv_request_t*) hdr->hdr_frag.hdr_dst_ptr.pval;
|
||||
mca_ptl_base_recv_request_t *request;
|
||||
request = (mca_ptl_base_recv_request_t*) hdr->hdr_frag.hdr_dst_ptr.pval;
|
||||
|
||||
/* deregister memory if this is the last fragment */
|
||||
if ((request->req_bytes_received + hdr->hdr_frag.hdr_frag_length) >=
|
||||
request->req_bytes_packed) {
|
||||
request->req_recv.req_bytes_packed) {
|
||||
mca_ptl_ib_deregister_mem_with_registry(ib_ptl,
|
||||
fin_hdr->mr_addr.pval, (size_t)fin_hdr->mr_size);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ struct mca_ptl_ib_module_t;
|
||||
|
||||
|
||||
void mca_ptl_ib_recv_frag_done (mca_ptl_base_header_t*,
|
||||
mca_ptl_base_recv_frag_t*, mca_pml_base_recv_request_t*);
|
||||
mca_ptl_base_recv_frag_t*, mca_ptl_base_recv_request_t*);
|
||||
|
||||
void mca_ptl_ib_process_recv(struct mca_ptl_ib_module_t* , void*);
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
|
@ -55,7 +55,7 @@ static void mca_ptl_ib_send_frag_destruct(mca_ptl_ib_send_frag_t* frag)
|
||||
*/
|
||||
mca_ptl_ib_send_frag_t* mca_ptl_ib_alloc_send_frag(
|
||||
mca_ptl_ib_module_t* ib_ptl,
|
||||
mca_pml_base_send_request_t* request)
|
||||
mca_ptl_base_send_request_t* request)
|
||||
{
|
||||
ompi_free_list_t *flist = &ib_ptl->send_free;
|
||||
ompi_list_item_t *item;
|
||||
@ -122,13 +122,13 @@ int mca_ptl_ib_send_frag_register(mca_ptl_ib_module_t *ib_ptl)
|
||||
void mca_ptl_ib_send_frag_send_complete(mca_ptl_ib_module_t *ib_ptl, mca_ptl_ib_send_frag_t* sendfrag)
|
||||
{
|
||||
mca_ptl_base_header_t *hdr;
|
||||
mca_pml_base_send_request_t* req = sendfrag->frag_send.frag_request;
|
||||
mca_ptl_base_send_request_t* req = sendfrag->frag_send.frag_request;
|
||||
hdr = (mca_ptl_base_header_t *) sendfrag->ib_buf.buf;
|
||||
|
||||
switch(hdr->hdr_common.hdr_type) {
|
||||
case MCA_PTL_HDR_TYPE_MATCH:
|
||||
if (0 == (hdr->hdr_common.hdr_flags & MCA_PTL_FLAGS_ACK)
|
||||
|| mca_pml_base_send_request_matched(req)) {
|
||||
|| mca_ptl_base_send_request_matched(req)) {
|
||||
|
||||
ib_ptl->super.ptl_send_progress(&ib_ptl->super,
|
||||
sendfrag->frag_send.frag_request,
|
||||
|
@ -20,7 +20,7 @@
|
||||
#define MCA_PTL_IB_SEND_FRAG_H
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "mca/pml/base/pml_base_sendreq.h"
|
||||
#include "mca/ptl/base/ptl_base_sendreq.h"
|
||||
#include "mca/ptl/base/ptl_base_sendfrag.h"
|
||||
|
||||
#include "ptl_ib_priv.h"
|
||||
@ -58,7 +58,7 @@ struct mca_ptl_ib_module_t;
|
||||
|
||||
mca_ptl_ib_send_frag_t* mca_ptl_ib_alloc_send_frag(
|
||||
struct mca_ptl_ib_module_t* ib_ptl,
|
||||
mca_pml_base_send_request_t* request);
|
||||
mca_ptl_base_send_request_t* request);
|
||||
|
||||
int mca_ptl_ib_send_frag_register(struct mca_ptl_ib_module_t *ptl);
|
||||
void mca_ptl_ib_send_frag_send_complete(struct mca_ptl_ib_module_t *ptl, mca_ptl_ib_send_frag_t*);
|
||||
|
@ -26,7 +26,7 @@ static void mca_ptl_ib_send_request_construct(mca_ptl_ib_send_request_t*);
|
||||
static void mca_ptl_ib_send_request_destruct(mca_ptl_ib_send_request_t*);
|
||||
|
||||
OBJ_CLASS_INSTANCE(mca_ptl_ib_send_request_t,
|
||||
mca_pml_base_send_request_t,
|
||||
mca_ptl_base_send_request_t,
|
||||
mca_ptl_ib_send_request_construct,
|
||||
mca_ptl_ib_send_request_destruct);
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "mca/pml/base/pml_base_sendreq.h"
|
||||
#include "mca/ptl/base/ptl_base_sendreq.h"
|
||||
#include "ptl_ib_sendfrag.h"
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
@ -37,7 +37,7 @@ OBJ_CLASS_DECLARATION(mca_ptl_ib_send_request_t);
|
||||
* fragment on every send request.
|
||||
*/
|
||||
struct mca_ptl_ib_send_request_t {
|
||||
mca_pml_base_send_request_t super;
|
||||
mca_ptl_base_send_request_t super;
|
||||
mca_ptl_ib_send_frag_t *req_frag;
|
||||
VAPI_rkey_t req_key;
|
||||
};
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user