1
1
Этот коммит содержится в:
Yohann Burette 2015-04-24 15:55:21 -07:00
родитель 2716b8b1da
Коммит 1be185ed87
3 изменённых файлов: 7 добавлений и 43 удалений

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

@ -128,11 +128,6 @@ ompi_mtl_ofi_finalize(struct mca_mtl_base_module_t *mtl)
"fi_close failed: %s", strerror(errno));
abort();
}
if (fi_close((fid_t)ompi_mtl_ofi.mr)) {
opal_output(ompi_mtl_base_framework.framework_output,
"fi_close failed: %s", strerror(errno));
abort();
}
if (fi_close((fid_t)ompi_mtl_ofi.cq)) {
opal_output(ompi_mtl_base_framework.framework_output,
"fi_close failed: %s", strerror(errno));
@ -287,7 +282,7 @@ ompi_mtl_ofi_send_start(struct mca_mtl_base_module_t *mtl,
ret_length = fi_trecv(ompi_mtl_ofi.ep,
NULL,
0,
ompi_mtl_ofi.mr,
NULL,
endpoint->peer_fiaddr,
match_bits | MTL_OFI_SYNC_SEND_ACK,
0, /* Exact match, no ignore bits */
@ -323,7 +318,7 @@ ompi_mtl_ofi_send_start(struct mca_mtl_base_module_t *mtl,
ret_length = fi_tsend(ompi_mtl_ofi.ep,
start,
length,
ompi_mtl_ofi.mr,
NULL,
endpoint->peer_fiaddr,
match_bits,
(void *) &ofi_req->ctx);
@ -498,7 +493,7 @@ ompi_mtl_ofi_recv_callback(struct fi_cq_tagged_entry *wc,
ret_length = fi_tsend(ompi_mtl_ofi.ep,
NULL,
0,
ompi_mtl_ofi.mr,
NULL,
ofi_req->remote_addr,
wc->tag | MTL_OFI_SYNC_SEND_ACK,
(void *) &ofi_req->ctx);
@ -591,7 +586,7 @@ ompi_mtl_ofi_irecv(struct mca_mtl_base_module_t *mtl,
ret_length = fi_trecv(ompi_mtl_ofi.ep,
start,
length,
ompi_mtl_ofi.mr,
NULL,
remote_addr,
match_bits,
mask_bits,

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

@ -91,7 +91,6 @@ ompi_mtl_ofi_component_open(void)
ompi_mtl_ofi.domain = NULL;
ompi_mtl_ofi.av = NULL;
ompi_mtl_ofi.cq = NULL;
ompi_mtl_ofi.mr = NULL;
ompi_mtl_ofi.ep = NULL;
return OMPI_SUCCESS;
@ -130,11 +129,8 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
* mode: Select capabilities MTL is prepared to support.
* In this case, MTL will pass in context into communication calls
* ep_type: reliable datagram operation
* caps: Capabilities required from the provider. The bits specified
* implement MPI semantics.
* Tagged is used to support tag matching.
* We expect to register all memory up front for use with this
* endpoint, so the MTL requires dynamic memory regions
* caps: Capabilities required from the provider.
* Tag matching is specified to implement MPI semantics.
*/
hints = fi_allocinfo();
if (!hints) {
@ -146,7 +142,6 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
hints->mode = FI_CONTEXT;
hints->ep_attr->type = FI_EP_RDM; /* Reliable datagram */
hints->caps = FI_TAGGED; /* Tag matching interface */
hints->caps |= FI_DYNAMIC_MR; /* Global dynamic mem region */
/**
* Refine filter for additional capabilities
@ -275,27 +270,7 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
__FILE__, __LINE__, fi_strerror(-ret));
goto error;
}
/**
* All OFI communication routines require at least one MR.
* This MTL only needs a single MR.
*/
ret = fi_mr_reg(ompi_mtl_ofi.domain, /* In: Domain object */
0, /* In: Lower memory address */
UINTPTR_MAX, /* In: Upper memory address */
FI_SEND | FI_RECV, /* In: Expose MR for read/write */
0ULL, /* In: base MR offset */
0ULL, /* In: requested key */
0ULL, /* In: No flags */
&ompi_mtl_ofi.mr, /* Out: memregion object */
NULL); /* Context: memregion events */
if (0 != ret) {
opal_output_verbose(1, ompi_mtl_base_framework.framework_output,
"%s:%d: fi_mr_reg failed: %s\n",
__FILE__, __LINE__, fi_strerror(-ret));
goto error;
}
/**
* Bind the CQ and AV to the endpoint object.
*/
@ -394,9 +369,6 @@ error:
if (ompi_mtl_ofi.cq) {
(void) fi_close((fid_t)ompi_mtl_ofi.cq);
}
if (ompi_mtl_ofi.mr) {
(void) fi_close((fid_t)ompi_mtl_ofi.mr);
}
if (ompi_mtl_ofi.ep) {
(void) fi_close((fid_t)ompi_mtl_ofi.ep);
}

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

@ -43,9 +43,6 @@ typedef struct mca_mtl_ofi_module_t {
/** Completion queue handle */
struct fid_cq *cq;
/** Memory region handle */
struct fid_mr *mr;
/** Endpoint to communicate on */
struct fid_ep *ep;