Commit a4b5016f authored by Charles J Archer's avatar Charles J Archer
Browse files

Open Fabrics offical name is OFI rename from SFI

parent cae6aae2
......@@ -13,4 +13,4 @@ include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/scif/Makefile.mk
include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/portals4/Makefile.mk
include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/ib/Makefile.mk
include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/mxm/Makefile.mk
include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/sfi/Makefile.mk
include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/ofi/Makefile.mk
......@@ -7,13 +7,13 @@
if BUILD_NEMESIS_NETMOD_SFI
mpi_core_sources += \
src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_init.c \
src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_cm.c \
src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_tagged.c \
src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_msg.c \
src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_data.c \
src/mpid/ch3/channels/nemesis/netmod/sfi/sfi_progress.c
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c \
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c \
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_tagged.c \
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_msg.c \
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_data.c \
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_progress.c
errnames_txt_files += src/mpid/ch3/channels/nemesis/netmod/sfi/errnames.txt
errnames_txt_files += src/mpid/ch3/channels/nemesis/netmod/ofi/errnames.txt
endif
**ofi_avmap:SFI get address vector map failed
**ofi_avmap %s %d %s %s:SFI address vector map failed (%s:%d:%s:%s)
**ofi_tsend:SFI tagged sendto failed
**ofi_tsend %s %d %s %s:SFI tagged sendto failed (%s:%d:%s:%s)
**ofi_trecv:SFI tagged recvfrom failed
**ofi_trecv %s %d %s %s:SFI tagged recvfrom failed (%s:%d:%s:%s)
**ofi_getinfo:SFI getinfo() failed
**ofi_getinfo %s %d %s %s:SFI getinfo() failed (%s:%d:%s:%s)
**ofi_openep:SFI endpoint open failed
**ofi_openep %s %d %s %s:SFI endpoint open failed (%s:%d:%s:%s)
**ofi_openfabric:SFI fabric open failure
**ofi_openfabric %s %d %s %s:SFI fabric open failed (%s:%d:%s:%s)
**ofi_opendomain:SFI domain open failure
**ofi_opendomain %s %d %s %s:SFI domain open failed (%s:%d:%s:%s)
**ofi_opencq:SFI event queue create failure
**ofi_opencq %s %d %s %s:SFI event queue create failed (%s:%d:%s:%s)
**ofi_avopen:SFI address vector open failed
**ofi_avopen %s %d %s %s:SFI address vector open failed (%s:%d:%s:%s)
**ofi_bind:SFI resource bind failure
**ofi_bind %s %d %s %s:SFI resource bind failed (%s:%d:%s:%s)
**ofi_ep_enable:SFI endpoint enable failed
**ofi_ep_enable %s %d %s %s:SFI endpoint enable failed (%s:%d:%s:%s)
**ofi_getname:SFI get endpoint name failed
**ofi_getname %s %d %s %s:SFI get endpoint name failed (%s:%d:%s:%s)
**ofi_avclose:SFI av close failed
**ofi_avclose %s %d %s %s:SFI av close failed (%s:%d:%s:%s)
**ofi_epclose:SFI endpoint close failed
**ofi_epclose %s %d %s %s:SFI endpoint close failed (%s:%d:%s:%s)
**ofi_cqclose:SFI cq close failed
**ofi_cqclose %s %d %s %s:SFI cq close failed (%s:%d:%s:%s)
**ofi_mrclose:SFI mr close failed
**ofi_mrclose %s %d %s %s:SFI mr close failed (%s:%d:%s:%s)
**ofi_fabricclose:SFI fabric close failed
**ofi_fabricclose %s %d %s %s:SFI fabric close failed (%s:%d:%s:%s)
**ofi_domainclose:SFI domain close failed
**ofi_domainclose %s %d %s %s:SFI domain close failed (%s:%d:%s:%s)
**ofi_tsearch:SFI tsearch failed
**ofi_tsearch %s %d %s %s:SFI tsearch failed (%s:%d:%s:%s)
**ofi_poll:SFI poll failed
**ofi_poll %s %d %s %s:SFI poll failed (%s:%d:%s:%s)
**ofi_cancel:SFI cancel failed
**ofi_cancel %s %d %s %s:SFI cancel failed (%s:%d:%s:%s)
......@@ -7,23 +7,23 @@
* to Argonne National Laboratory subject to Software Grant and Corporate
* Contributor License Agreement dated February 8, 2012.
*/
#include "sfi_impl.h"
#include "ofi_impl.h"
MPID_nem_sfi_global_t gl_data;
MPID_nem_ofi_global_t gl_data;
/* ************************************************************************** */
/* Netmod Function Table */
/* ************************************************************************** */
MPIDI_Comm_ops_t _g_comm_ops = {
MPID_nem_sfi_recv_posted, /* recv_posted */
MPID_nem_ofi_recv_posted, /* recv_posted */
MPID_nem_sfi_send, /* send */
MPID_nem_sfi_send, /* rsend */
MPID_nem_sfi_ssend, /* ssend */
MPID_nem_sfi_isend, /* isend */
MPID_nem_sfi_isend, /* irsend */
MPID_nem_sfi_issend, /* issend */
MPID_nem_ofi_send, /* send */
MPID_nem_ofi_send, /* rsend */
MPID_nem_ofi_ssend, /* ssend */
MPID_nem_ofi_isend, /* isend */
MPID_nem_ofi_isend, /* irsend */
MPID_nem_ofi_issend, /* issend */
NULL, /* send_init */
NULL, /* bsend_init */
......@@ -31,28 +31,28 @@ MPIDI_Comm_ops_t _g_comm_ops = {
NULL, /* ssend_init */
NULL, /* startall */
MPID_nem_sfi_cancel_send, /* cancel_send */
MPID_nem_sfi_cancel_recv, /* cancel_recv */
MPID_nem_ofi_cancel_send, /* cancel_send */
MPID_nem_ofi_cancel_recv, /* cancel_recv */
NULL, /* probe */
MPID_nem_sfi_iprobe, /* iprobe */
MPID_nem_sfi_improbe /* improbe */
MPID_nem_ofi_iprobe, /* iprobe */
MPID_nem_ofi_improbe /* improbe */
};
MPID_nem_netmod_funcs_t MPIDI_nem_sfi_funcs = {
MPID_nem_sfi_init,
MPID_nem_sfi_finalize,
MPID_nem_netmod_funcs_t MPIDI_nem_ofi_funcs = {
MPID_nem_ofi_init,
MPID_nem_ofi_finalize,
#ifdef ENABLE_CHECKPOINTING
NULL,
NULL,
NULL,
#endif
MPID_nem_sfi_poll,
MPID_nem_sfi_get_business_card,
MPID_nem_sfi_connect_to_root,
MPID_nem_sfi_vc_init,
MPID_nem_sfi_vc_destroy,
MPID_nem_sfi_vc_terminate,
MPID_nem_sfi_anysource_iprobe,
MPID_nem_sfi_anysource_improbe,
MPID_nem_ofi_poll,
MPID_nem_ofi_get_business_card,
MPID_nem_ofi_connect_to_root,
MPID_nem_ofi_vc_init,
MPID_nem_ofi_vc_destroy,
MPID_nem_ofi_vc_terminate,
MPID_nem_ofi_anysource_iprobe,
MPID_nem_ofi_anysource_improbe,
};
......@@ -54,7 +54,7 @@ typedef struct {
MPID_Request *persistent_req; /* Unexpected request queue */
MPID_Request *conn_req; /* Connection request */
MPIDI_Comm_ops_t comm_ops;
} MPID_nem_sfi_global_t;
} MPID_nem_ofi_global_t;
/* ******************************** */
/* Device channel specific data */
......@@ -65,15 +65,15 @@ typedef struct {
int ready; /* VC ready state */
int is_cmvc; /* Cleanup VC */
MPIDI_VC_t *next; /* VC queue */
} MPID_nem_sfi_vc_t;
#define VC_SFI(vc) ((MPID_nem_sfi_vc_t *)vc->ch.netmod_area.padding)
} MPID_nem_ofi_vc_t;
#define VC_SFI(vc) ((MPID_nem_ofi_vc_t *)vc->ch.netmod_area.padding)
/* ******************************** */
/* Per request object data */
/* SFI/Netmod specific */
/* ******************************** */
typedef struct {
context_t sfi_context; /* Context Object */
context_t ofi_context; /* Context Object */
void *addr; /* SFI Address */
event_callback_fn event_callback; /* Callback Event */
char *pack_buffer; /* MPI Pack Buffer */
......@@ -83,8 +83,8 @@ typedef struct {
MPIDI_VC_t *vc; /* VC paired with this request */
uint64_t tag; /* 64 bit tag request */
MPID_Request *parent; /* Parent request */
} MPID_nem_sfi_req_t;
#define REQ_SFI(req) ((MPID_nem_sfi_req_t *)((req)->ch.netmod_area.padding))
} MPID_nem_ofi_req_t;
#define REQ_SFI(req) ((MPID_nem_ofi_req_t *)((req)->ch.netmod_area.padding))
/* ******************************** */
/* Logging and function macros */
......@@ -119,8 +119,8 @@ fn_fail: \
MPIU_ERR_##CHKANDJUMP4(_ret<0, \
mpi_errno, \
MPI_ERR_OTHER, \
"**sfi_"#STR, \
"**sfi_"#STR" %s %d %s %s", \
"**ofi_"#STR, \
"**ofi_"#STR" %s %d %s %s", \
__SHORT_FILE__, \
__LINE__, \
FCNAME, \
......@@ -134,8 +134,8 @@ fn_fail: \
MPIU_ERR_##CHKANDJUMP4(pmi_errno!=PMI_SUCCESS, \
mpi_errno, \
MPI_ERR_OTHER, \
"**sfi_"#STR, \
"**sfi_"#STR" %s %d %s %s", \
"**ofi_"#STR, \
"**ofi_"#STR" %s %d %s %s", \
__SHORT_FILE__, \
__LINE__, \
FCNAME, \
......@@ -152,7 +152,7 @@ fn_fail: \
#define VC_READY_CHECK(vc) \
({ \
if (1 != VC_SFI(vc)->ready) { \
MPI_RC(MPID_nem_sfi_vc_connect(vc)); \
MPI_RC(MPID_nem_ofi_vc_connect(vc)); \
} \
})
......@@ -202,19 +202,19 @@ fn_fail: \
/* ******************************** */
/* Request manipulation inlines */
/* ******************************** */
static inline void MPID_nem_sfi_init_req(MPID_Request * req)
static inline void MPID_nem_ofi_init_req(MPID_Request * req)
{
memset(REQ_SFI(req), 0, sizeof(MPID_nem_sfi_req_t));
memset(REQ_SFI(req), 0, sizeof(MPID_nem_ofi_req_t));
}
static inline int MPID_nem_sfi_create_req(MPID_Request ** request, int refcnt)
static inline int MPID_nem_ofi_create_req(MPID_Request ** request, int refcnt)
{
int mpi_errno = MPI_SUCCESS;
MPID_Request *req;
req = MPID_Request_create();
MPIU_Assert(req);
MPIU_Object_set_ref(req, refcnt);
MPID_nem_sfi_init_req(req);
MPID_nem_ofi_init_req(req);
*request = req;
return mpi_errno;
}
......@@ -285,38 +285,38 @@ static inline int get_port(uint64_t match_bits)
/* ************************************************************************** */
/* MPICH Comm Override and Netmod functions */
/* ************************************************************************** */
int MPID_nem_sfi_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req);
int MPID_nem_sfi_send(struct MPIDI_VC *vc, const void *buf, int count,
int MPID_nem_ofi_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req);
int MPID_nem_ofi_send(struct MPIDI_VC *vc, const void *buf, int count,
MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
int context_offset, struct MPID_Request **request);
int MPID_nem_sfi_isend(struct MPIDI_VC *vc, const void *buf, int count,
int MPID_nem_ofi_isend(struct MPIDI_VC *vc, const void *buf, int count,
MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
int context_offset, struct MPID_Request **request);
int MPID_nem_sfi_ssend(struct MPIDI_VC *vc, const void *buf, int count,
int MPID_nem_ofi_ssend(struct MPIDI_VC *vc, const void *buf, int count,
MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
int context_offset, struct MPID_Request **request);
int MPID_nem_sfi_issend(struct MPIDI_VC *vc, const void *buf, int count,
int MPID_nem_ofi_issend(struct MPIDI_VC *vc, const void *buf, int count,
MPI_Datatype datatype, int dest, int tag, MPID_Comm * comm,
int context_offset, struct MPID_Request **request);
int MPID_nem_sfi_cancel_send(struct MPIDI_VC *vc, struct MPID_Request *sreq);
int MPID_nem_sfi_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *rreq);
int MPID_nem_sfi_iprobe(struct MPIDI_VC *vc, int source, int tag, MPID_Comm * comm,
int MPID_nem_ofi_cancel_send(struct MPIDI_VC *vc, struct MPID_Request *sreq);
int MPID_nem_ofi_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *rreq);
int MPID_nem_ofi_iprobe(struct MPIDI_VC *vc, int source, int tag, MPID_Comm * comm,
int context_offset, int *flag, MPI_Status * status);
int MPID_nem_sfi_improbe(struct MPIDI_VC *vc, int source, int tag, MPID_Comm * comm,
int MPID_nem_ofi_improbe(struct MPIDI_VC *vc, int source, int tag, MPID_Comm * comm,
int context_offset, int *flag, MPID_Request ** message,
MPI_Status * status);
int MPID_nem_sfi_anysource_iprobe(int tag, MPID_Comm * comm, int context_offset,
int MPID_nem_ofi_anysource_iprobe(int tag, MPID_Comm * comm, int context_offset,
int *flag, MPI_Status * status);
int MPID_nem_sfi_anysource_improbe(int tag, MPID_Comm * comm, int context_offset,
int MPID_nem_ofi_anysource_improbe(int tag, MPID_Comm * comm, int context_offset,
int *flag, MPID_Request ** message, MPI_Status * status);
void MPID_nem_sfi_anysource_posted(MPID_Request * rreq);
int MPID_nem_sfi_anysource_matched(MPID_Request * rreq);
int MPID_nem_sfi_send_data(cq_tagged_entry_t * wc, MPID_Request * sreq);
int MPID_nem_sfi_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq,
void MPID_nem_ofi_anysource_posted(MPID_Request * rreq);
int MPID_nem_ofi_anysource_matched(MPID_Request * rreq);
int MPID_nem_ofi_send_data(cq_tagged_entry_t * wc, MPID_Request * sreq);
int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc, MPID_Request * sreq,
void *hdr, MPIDI_msg_sz_t hdr_sz);
int MPID_nem_sfi_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz,
int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc, void *hdr, MPIDI_msg_sz_t hdr_sz,
void *data, MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr);
int MPID_nem_sfi_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz);
/* ************************************************************************** */
......@@ -324,19 +324,19 @@ int MPID_nem_sfi_iSendContig(MPIDI_VC_t * vc, MPID_Request * sreq, void *hdr,
/* ************************************************************************** */
#define MPID_NONBLOCKING_POLL 0
#define MPID_BLOCKING_POLL 1
int MPID_nem_sfi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p);
int MPID_nem_sfi_finalize(void);
int MPID_nem_sfi_vc_init(MPIDI_VC_t * vc);
int MPID_nem_sfi_get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p);
int MPID_nem_sfi_poll(int in_blocking_poll);
int MPID_nem_sfi_vc_terminate(MPIDI_VC_t * vc);
int MPID_nem_sfi_vc_connect(MPIDI_VC_t * vc);
int MPID_nem_sfi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc);
int MPID_nem_sfi_vc_destroy(MPIDI_VC_t * vc);
int MPID_nem_sfi_cm_init(MPIDI_PG_t * pg_p, int pg_rank);
int MPID_nem_sfi_cm_finalize();
int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p);
int MPID_nem_ofi_finalize(void);
int MPID_nem_ofi_vc_init(MPIDI_VC_t * vc);
int MPID_nem_ofi_get_business_card(int my_rank, char **bc_val_p, int *val_max_sz_p);
int MPID_nem_ofi_poll(int in_blocking_poll);
int MPID_nem_ofi_vc_terminate(MPIDI_VC_t * vc);
int MPID_nem_ofi_vc_connect(MPIDI_VC_t * vc);
int MPID_nem_ofi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc);
int MPID_nem_ofi_vc_destroy(MPIDI_VC_t * vc);
int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank);
int MPID_nem_ofi_cm_finalize();
extern MPID_nem_sfi_global_t gl_data;
extern MPID_nem_ofi_global_t gl_data;
extern MPIDI_Comm_ops_t _g_comm_ops;
#endif
......@@ -7,14 +7,14 @@
* to Argonne National Laboratory subject to Software Grant and Corporate
* Contributor License Agreement dated February 8, 2012.
*/
#include "sfi_impl.h"
#include "ofi_impl.h"
static inline int dump_and_choose_providers(info_t * prov, info_t ** prov_use);
static inline int compile_time_checking();
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_sfi_init)
int MPID_nem_sfi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p)
#define FCNAME DECL_FUNC(MPID_nem_ofi_init)
int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p)
{
int ret, fi_version, i, len, pmi_errno;
int mpi_errno = MPI_SUCCESS;
......@@ -92,7 +92,7 @@ int MPID_nem_sfi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
&prov_tagged), /* Out: List of providers that match hints */
getinfo);
MPIU_ERR_CHKANDJUMP4(prov_tagged == NULL, mpi_errno, MPI_ERR_OTHER,
"**sfi_getinfo", "**sfi_getinfo %s %d %s %s",
"**ofi_getinfo", "**ofi_getinfo %s %d %s %s",
__SHORT_FILE__, __LINE__, FCNAME, "No tag matching provider found");
/* ------------------------------------------------------------------------ */
/* Open fabric */
......@@ -197,7 +197,7 @@ int MPID_nem_sfi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
/* Get our business card */
/* -------------------------------- */
my_bc = *bc_val_p;
MPI_RC(MPID_nem_sfi_get_business_card(pg_rank, bc_val_p, val_max_sz_p));
MPI_RC(MPID_nem_ofi_get_business_card(pg_rank, bc_val_p, val_max_sz_p));
/* -------------------------------- */
/* Publish the business card */
......@@ -273,7 +273,7 @@ int MPID_nem_sfi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
/* required, like connection management and */
/* startcontig messages */
/* --------------------------------------------- */
MPI_RC(MPID_nem_sfi_cm_init(pg_p, pg_rank));
MPI_RC(MPID_nem_ofi_cm_init(pg_p, pg_rank));
fn_exit:
if (fi_addrs)
MPIU_Free(fi_addrs);
......@@ -285,8 +285,8 @@ int MPID_nem_sfi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
}
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_sfi_finalize)
int MPID_nem_sfi_finalize(void)
#define FCNAME DECL_FUNC(MPID_nem_ofi_finalize)
int MPID_nem_ofi_finalize(void)
{
int mpi_errno = MPI_SUCCESS;
int ret = 0;
......@@ -303,7 +303,7 @@ int MPID_nem_sfi_finalize(void)
/* Cancels any persistent/global requests and */
/* frees any resources from cm_init() */
/* --------------------------------------------- */
MPI_RC(MPID_nem_sfi_cm_finalize());
MPI_RC(MPID_nem_ofi_cm_finalize());
FI_RC(fi_close((fid_t) gl_data.mr), mrclose);
FI_RC(fi_close((fid_t) gl_data.av), avclose);
......@@ -316,8 +316,8 @@ int MPID_nem_sfi_finalize(void)
static inline int compile_time_checking()
{
SFI_COMPILE_TIME_ASSERT(sizeof(MPID_nem_sfi_vc_t) <= MPID_NEM_VC_NETMOD_AREA_LEN);
SFI_COMPILE_TIME_ASSERT(sizeof(MPID_nem_sfi_req_t) <= MPID_NEM_REQ_NETMOD_AREA_LEN);
SFI_COMPILE_TIME_ASSERT(sizeof(MPID_nem_ofi_vc_t) <= MPID_NEM_VC_NETMOD_AREA_LEN);
SFI_COMPILE_TIME_ASSERT(sizeof(MPID_nem_ofi_req_t) <= MPID_NEM_REQ_NETMOD_AREA_LEN);
SFI_COMPILE_TIME_ASSERT(sizeof(iovec_t) == sizeof(MPID_IOV));
MPIU_Assert(((void *) &(((iovec_t *) 0)->iov_base)) ==
((void *) &(((MPID_IOV *) 0)->MPID_IOV_BUF)));
......@@ -333,28 +333,28 @@ static inline int compile_time_checking()
/* likely needs a MPIU_ERR_REGISTER macro */
/* ------------------------------------------------------------------------ */
#if 0
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_avmap", "**sfi_avmap %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_tsend", "**sfi_tsend %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_trecv", "**sfi_trecv %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_getinfo", "**sfi_getinfo %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_openep", "**sfi_openep %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_openfabric", "**sfi_openfabric %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_opendomain", "**sfi_opendomain %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_opencq", "**sfi_opencq %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_avopen", "**sfi_avopen %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_bind", "**sfi_bind %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_ep_enable", "**sfi_ep_enable %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_getname", "**sfi_getname %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_avclose", "**sfi_avclose %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_epclose", "**sfi_epclose %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_cqclose", "**sfi_cqclose %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_fabricclose", "**sfi_fabricclose %s %d %s %s", a, b, a,
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_avmap", "**ofi_avmap %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_tsend", "**ofi_tsend %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_trecv", "**ofi_trecv %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_getinfo", "**ofi_getinfo %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_openep", "**ofi_openep %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_openfabric", "**ofi_openfabric %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_opendomain", "**ofi_opendomain %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_opencq", "**ofi_opencq %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_avopen", "**ofi_avopen %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_bind", "**ofi_bind %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_ep_enable", "**ofi_ep_enable %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_getname", "**ofi_getname %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_avclose", "**ofi_avclose %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_epclose", "**ofi_epclose %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_cqclose", "**ofi_cqclose %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_fabricclose", "**ofi_fabricclose %s %d %s %s", a, b, a,
a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_domainclose", "**sfi_domainclose %s %d %s %s", a, b, a,
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_domainclose", "**ofi_domainclose %s %d %s %s", a, b, a,
a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_tsearch", "**sfi_tsearch %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_poll", "**sfi_poll %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**sfi_cancel", "**sfi_cancel %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_tsearch", "**ofi_tsearch %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_poll", "**ofi_poll %s %d %s %s", a, b, a, a);
MPIU_ERR_SET2(e, MPI_ERR_OTHER, "**ofi_cancel", "**ofi_cancel %s %d %s %s", a, b, a, a);
#endif
return 0;
}
......
......@@ -7,7 +7,7 @@
* to Argonne National Laboratory subject to Software Grant and Corporate
* Contributor License Agreement dated February 8, 2012.
*/
#include "sfi_impl.h"
#include "ofi_impl.h"
/* ------------------------------------------------------------------------ */
/* GET_PGID_AND_SET_MATCH macro looks up the process group to find the */
......@@ -44,7 +44,7 @@
/* is based on a tagged rendezvous message. */
/* The rendezvous is implemented with an RTS-CTS-Data send protocol: */
/* CTS_POST() | | */
/* RTS_SEND() | -------------------------------> | ue_callback()(sfi_cm.c)*/
/* RTS_SEND() | -------------------------------> | ue_callback()(ofi_cm.c)*/
/* | | pack_buffer() */
/* | | DATA_POST() */
/* | | RTS_POST() */
......@@ -61,16 +61,16 @@
c = 1; \
MPID_cc_incr(sreq->cc_ptr, &c); \
MPID_cc_incr(sreq->cc_ptr, &c); \
REQ_SFI(sreq)->event_callback = MPID_nem_sfi_data_callback; \
REQ_SFI(sreq)->event_callback = MPID_nem_ofi_data_callback; \
REQ_SFI(sreq)->pack_buffer = pack_buffer; \
REQ_SFI(sreq)->pack_buffer_size = pkt_len; \
REQ_SFI(sreq)->vc = vc; \
REQ_SFI(sreq)->tag = match_bits; \
\
MPID_nem_sfi_create_req(&cts_req, 1); \
MPID_nem_ofi_create_req(&cts_req, 1); \
cts_req->dev.OnDataAvail = NULL; \
cts_req->dev.next = NULL; \
REQ_SFI(cts_req)->event_callback = MPID_nem_sfi_cts_recv_callback; \
REQ_SFI(cts_req)->event_callback = MPID_nem_ofi_cts_recv_callback; \
REQ_SFI(cts_req)->parent = sreq; \
\
FI_RC(fi_trecv(gl_data.endpoint, \
......@@ -80,14 +80,14 @@
VC_SFI(vc)->direct_addr, \
match_bits | MPID_MSG_CTS, \
0, /* Exact tag match, no ignore bits */ \
&(REQ_SFI(cts_req)->sfi_context)),trecv); \
&(REQ_SFI(cts_req)->ofi_context)),trecv); \
FI_RC(fi_tsend(gl_data.endpoint, \
&REQ_SFI(sreq)->pack_buffer_size, \
sizeof(REQ_SFI(sreq)->pack_buffer_size), \
gl_data.mr, \
VC_SFI(vc)->direct_addr, \
match_bits, \
&(REQ_SFI(sreq)->sfi_context)),tsend); \
&(REQ_SFI(sreq)->ofi_context)),tsend); \
})
......@@ -97,8 +97,8 @@
/* bulk data transfer. On data send completion, the request can be freed */
/* ------------------------------------------------------------------------ */
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_sfi_data_callback)
static int MPID_nem_sfi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sreq)
#define FCNAME DECL_FUNC(MPID_nem_ofi_data_callback)
static int MPID_nem_ofi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sreq)
{
int complete = 0, mpi_errno = MPI_SUCCESS;
MPIDI_VC_t *vc;
......@@ -113,7 +113,7 @@ static int MPID_nem_sfi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sre
REQ_SFI(sreq)->pack_buffer_size,
gl_data.mr,
VC_SFI(vc)->direct_addr,
wc->tag | MPID_MSG_DATA, (void *) &(REQ_SFI(sreq)->sfi_context)), tsend);
wc->tag | MPID_MSG_DATA, (void *) &(REQ_SFI(sreq)->ofi_context)), tsend);
}
if (sreq->cc == 1) {
if (REQ_SFI(sreq)->pack_buffer)
......@@ -135,16 +135,16 @@ static int MPID_nem_sfi_data_callback(cq_tagged_entry_t * wc, MPID_Request * sre
}
/* ------------------------------------------------------------------------ */
/* Signals the CTS has been received. Call MPID_nem_sfi_data_callback on */
/* Signals the CTS has been received. Call MPID_nem_ofi_data_callback on */
/* the parent send request to kick off the bulk data transfer */
/* ------------------------------------------------------------------------ */
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_sfi_cts_recv_callback)
static int MPID_nem_sfi_cts_recv_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
#define FCNAME DECL_FUNC(MPID_nem_ofi_cts_recv_callback)
static int MPID_nem_ofi_cts_recv_callback(cq_tagged_entry_t * wc, MPID_Request * rreq)
{
int mpi_errno = MPI_SUCCESS;
BEGIN_FUNC(FCNAME);
MPI_RC(MPID_nem_sfi_data_callback(wc, REQ_SFI(rreq)->parent));
MPI_RC(MPID_nem_ofi_data_callback(wc, REQ_SFI(rreq)->parent));
MPIDI_CH3U_Request_complete(rreq);
END_FUNC_RC(FCNAME);
}
......@@ -158,8 +158,8 @@ static int MPID_nem_sfi_cts_recv_callback(cq_tagged_entry_t * wc, MPID_Request *
/* functions over a tagged msg interface */
/* ------------------------------------------------------------------------ */
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_sfi_iSendContig)
int MPID_nem_sfi_iSendContig(MPIDI_VC_t * vc,
#define FCNAME DECL_FUNC(MPID_nem_ofi_iSendContig)
int MPID_nem_ofi_iSendContig(MPIDI_VC_t * vc,
MPID_Request * sreq,
void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz)
{
......@@ -170,7 +170,7 @@ int MPID_nem_sfi_iSendContig(MPIDI_VC_t * vc,
BEGIN_FUNC(FCNAME);
MPIU_Assert(hdr_sz <= (MPIDI_msg_sz_t) sizeof(MPIDI_CH3_Pkt_t));
MPID_nem_sfi_init_req(sreq);
MPID_nem_ofi_init_req(sreq);
pkt_len = sizeof(MPIDI_CH3_Pkt_t) + data_sz;
pack_buffer = MPIU_Malloc(pkt_len);
MPIU_Assert(pack_buffer);
......@@ -181,8 +181,8 @@ int MPID_nem_sfi_iSendContig(MPIDI_VC_t * vc,
}
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_sfi_SendNoncontig)
int MPID_nem_sfi_SendNoncontig(MPIDI_VC_t * vc,
#define FCNAME DECL_FUNC(MPID_nem_ofi_SendNoncontig)
int MPID_nem_ofi_SendNoncontig(MPIDI_VC_t * vc,
MPID_Request * sreq, void *hdr, MPIDI_msg_sz_t hdr_sz)
{
int c, pgid, pkt_len, mpi_errno = MPI_SUCCESS;
......@@ -202,13 +202,13 @@ int MPID_nem_sfi_SendNoncontig(MPIDI_VC_t * vc,
MPIU_Memcpy(pack_buffer, hdr, hdr_sz);
MPID_Segment_pack(sreq->dev.segment_ptr, 0, &data_sz, pack_buffer + sizeof(MPIDI_CH3_Pkt_t));
START_COMM();
MPID_nem_sfi_poll(MPID_NONBLOCKING_POLL);
MPID_nem_ofi_poll(MPID_NONBLOCKING_POLL);
END_FUNC_RC(FCNAME);
}
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_sfi_iStartContigMsg)
int MPID_nem_sfi_iStartContigMsg(MPIDI_VC_t * vc,
#define FCNAME DECL_FUNC(MPID_nem_ofi_iStartContigMsg)
int MPID_nem_ofi_iStartContigMsg(MPIDI_VC_t * vc,
void *hdr,
MPIDI_msg_sz_t hdr_sz,
void *data, MPIDI_msg_sz_t data_sz, MPID_Request ** sreq_ptr)
......@@ -221,7 +221,7 @@ int MPID_nem_sfi_iStartContigMsg(MPIDI_VC_t * vc,
BEGIN_FUNC(FCNAME);
MPIU_Assert(hdr_sz <= (MPIDI_msg_sz_t) sizeof(MPIDI_CH3_Pkt_t));
MPID_nem_sfi_create_req(&sreq, 2);
MPID_nem_ofi_create_req(&sreq, 2);