Commit 1d429aaa authored by Pavan Balaji's avatar Pavan Balaji
Browse files

Renamed tofu to llc.

parent 47a198a1
......@@ -12,3 +12,4 @@ 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/ofi/Makefile.mk
include $(top_srcdir)/src/mpid/ch3/channels/nemesis/netmod/llc/Makefile.mk
......@@ -5,23 +5,23 @@
## See COPYRIGHT in top-level directory.
##
if BUILD_NEMESIS_NETMOD_TOFU
if BUILD_NEMESIS_NETMOD_LLC
# AM_CPPFLAGS += -I...
lib_lib@MPILIBNAME@_la_SOURCES += \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_init.c \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_fini.c \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_vc.c \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_poll.c \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_send.c \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_probe.c \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_cancel.c \
src/mpid/ch3/channels/nemesis/netmod/llc/llc_init.c \
src/mpid/ch3/channels/nemesis/netmod/llc/llc_fini.c \
src/mpid/ch3/channels/nemesis/netmod/llc/llc_vc.c \
src/mpid/ch3/channels/nemesis/netmod/llc/llc_poll.c \
src/mpid/ch3/channels/nemesis/netmod/llc/llc_send.c \
src/mpid/ch3/channels/nemesis/netmod/llc/llc_probe.c \
src/mpid/ch3/channels/nemesis/netmod/llc/llc_cancel.c \
$(EOA)
noinst_HEADERS += \
src/mpid/ch3/channels/nemesis/netmod/tofu/tofu_impl.h \
src/mpid/ch3/channels/nemesis/netmod/llc/llc_impl.h \
$(EOA)
endif BUILD_NEMESIS_NETMOD_TOFU
endif BUILD_NEMESIS_NETMOD_LLC
......@@ -13,5 +13,5 @@
**PMI_KVS_Put:PMI_KVS_Put failed
**PMS_KVS_Get:PMS_KVS_Get failed
**fail:fail failed
**llctofu_poll:llctofu_poll failed
**llc_poll:llc_poll failed
**outofmemory:outofmemory failed
......@@ -7,32 +7,32 @@
#include "mpid_nem_impl.h"
#include "tofu_impl.h"
#include "llc_impl.h"
//#define MPID_NEM_TOFU_DEBUG_PROBE
#ifdef MPID_NEM_TOFU_DEBUG_PROBE
//#define MPID_NEM_LLC_DEBUG_PROBE
#ifdef MPID_NEM_LLC_DEBUG_PROBE
#define dprintf printf
#else
#define dprintf(...)
#endif
#undef FUNCNAME
#define FUNCNAME MPID_nem_tofu_cancel_recv
#define FUNCNAME MPID_nem_llc_cancel_recv
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
/* returns zero in case request is canceled */
int MPID_nem_tofu_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *req)
int MPID_nem_llc_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *req)
{
int canceled;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TOFU_CANCEL_RECV);
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_CANCEL_RECV);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TOFU_CANCEL_RECV);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LLC_CANCEL_RECV);
/* returns zero in case request is canceled */
canceled = LLC_req_approve_recv((LLC_cmd_t *)REQ_FIELD(req, cmds));
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_TOFU_CANCEL_RECV);
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_LLC_CANCEL_RECV);
return canceled;
fn_fail:
goto fn_exit;
......
......@@ -7,27 +7,27 @@
#include "mpid_nem_impl.h"
#include "tofu_impl.h"
#include "llc_impl.h"
#undef FUNCNAME
#define FUNCNAME MPID_nem_tofu_finalize
#define FUNCNAME MPID_nem_llc_finalize
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int
MPID_nem_tofu_finalize(void)
MPID_nem_llc_finalize(void)
{
int mpi_errno = MPI_SUCCESS;
int rc;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TOFU_FINALIZE);
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_FINALIZE);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TOFU_FINALIZE);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LLC_FINALIZE);
rc = LLC_finalize();
MPIU_ERR_CHKANDJUMP(rc != 0, mpi_errno, MPI_ERR_OTHER, "**fail");
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_TOFU_FINALIZE);
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_LLC_FINALIZE);
return mpi_errno;
fn_fail:
goto fn_exit;
......
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/* vim: set ts=8 sts=4 sw=4 noexpandtab : */
#ifndef TOFU_MODULE_IMPL_H
#define TOFU_MODULE_IMPL_H
#ifndef LLC_MODULE_IMPL_H
#define LLC_MODULE_IMPL_H
#ifdef USE_PMI2_API
#include "pmi2.h"
......@@ -12,7 +12,7 @@
#include "mpid_nem_impl.h"
#include "llc.h"
extern int MPID_nem_tofu_my_llc_rank;
extern int MPID_nem_llc_my_llc_rank;
/* The vc provides a generic buffer in which network modules can store
* private fields This removes all dependencies from the VC struction
......@@ -24,7 +24,7 @@ extern int MPID_nem_tofu_my_llc_rank;
*/
typedef GENERIC_Q_DECL(struct MPID_Request) rque_t;
/*
typedef GENERIC_Q_DECL(struct MPID_Request) MPIDI_nem_tofu_request_queue_t;
typedef GENERIC_Q_DECL(struct MPID_Request) MPIDI_nem_llc_request_queue_t;
*/
typedef struct
......@@ -33,11 +33,11 @@ typedef struct
void *endpoint;
rque_t send_queue; /* MPID_Request Queue */
unsigned int unsolicited_count;
} MPID_nem_tofu_vc_area;
} MPID_nem_llc_vc_area;
/* macro for tofu private in VC */
#define VC_TOFU(vc) ((MPID_nem_tofu_vc_area *)(vc)->ch.netmod_area.padding)
#define VC_FIELD(vcp, field) (((MPID_nem_tofu_vc_area *)(vc)->ch.netmod_area.padding)->field)
/* macro for llc private in VC */
#define VC_LLC(vc) ((MPID_nem_llc_vc_area *)(vc)->ch.netmod_area.padding)
#define VC_FIELD(vcp, field) (((MPID_nem_llc_vc_area *)(vc)->ch.netmod_area.padding)->field)
#define UNSOLICITED_NUM_INC(req) \
{ \
......@@ -58,81 +58,81 @@ typedef struct
void *pack_buf; /* to pack non-contiguous data */
void *rma_buf;
} MPID_nem_tofu_req_area;
} MPID_nem_llc_req_area;
#define REQ_TOFU(req) \
((MPID_nem_tofu_req_area *)(&(req)->ch.netmod_area.padding))
#define REQ_FIELD(reqp, field) (((MPID_nem_tofu_req_area *)((reqp)->ch.netmod_area.padding))->field)
#define REQ_LLC(req) \
((MPID_nem_llc_req_area *)(&(req)->ch.netmod_area.padding))
#define REQ_FIELD(reqp, field) (((MPID_nem_llc_req_area *)((reqp)->ch.netmod_area.padding))->field)
struct llctofu_cmd_area {
struct llc_cmd_area {
void *cbarg;
uint32_t raddr;
};
/* functions */
int MPID_nem_tofu_init (MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p);
int MPID_nem_tofu_finalize (void);
int MPID_nem_tofu_poll(int in_blocking_progress);
int MPID_nem_tofu_get_business_card (int my_rank, char **bc_val_p, int *val_max_sz_p);
int MPID_nem_tofu_connect_to_root (const char *business_card, MPIDI_VC_t *new_vc);
int MPID_nem_tofu_vc_init (MPIDI_VC_t *vc);
int MPID_nem_tofu_vc_destroy(MPIDI_VC_t *vc);
int MPID_nem_tofu_vc_terminate (MPIDI_VC_t *vc);
int MPID_nem_tofu_anysource_iprobe(int tag, MPID_Comm *comm, int context_offset, int *flag, MPI_Status *status);
int MPID_nem_tofu_anysource_improbe(int tag, MPID_Comm *comm, int context_offset, int *flag,
int MPID_nem_llc_init (MPIDI_PG_t *pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p);
int MPID_nem_llc_finalize (void);
int MPID_nem_llc_poll(int in_blocking_progress);
int MPID_nem_llc_get_business_card (int my_rank, char **bc_val_p, int *val_max_sz_p);
int MPID_nem_llc_connect_to_root (const char *business_card, MPIDI_VC_t *new_vc);
int MPID_nem_llc_vc_init (MPIDI_VC_t *vc);
int MPID_nem_llc_vc_destroy(MPIDI_VC_t *vc);
int MPID_nem_llc_vc_terminate (MPIDI_VC_t *vc);
int MPID_nem_llc_anysource_iprobe(int tag, MPID_Comm *comm, int context_offset, int *flag, MPI_Status *status);
int MPID_nem_llc_anysource_improbe(int tag, MPID_Comm *comm, int context_offset, int *flag,
MPID_Request **message,MPI_Status *status);
int MPID_nem_tofu_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz);
int MPID_nem_tofu_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_tofu_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz);
int MPID_nem_llc_iSendContig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz, void *data, MPIDI_msg_sz_t data_sz);
int MPID_nem_llc_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_llc_SendNoncontig(MPIDI_VC_t *vc, MPID_Request *sreq, void *hdr, MPIDI_msg_sz_t hdr_sz);
int MPIDI_nem_tofu_Rqst_iov_update(MPID_Request *mreq, MPIDI_msg_sz_t consume);
int MPID_nem_tofu_send_queued(MPIDI_VC_t * vc, rque_t *send_queue);
int MPIDI_nem_llc_Rqst_iov_update(MPID_Request *mreq, MPIDI_msg_sz_t consume);
int MPID_nem_llc_send_queued(MPIDI_VC_t * vc, rque_t *send_queue);
int MPID_nem_tofu_isend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype,
int MPID_nem_llc_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_tofu_issend(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype,
int MPID_nem_llc_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_tofu_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req);
int MPID_nem_tofu_kvs_put_binary(int from, const char *postfix, const uint8_t * buf,
int MPID_nem_llc_recv_posted(struct MPIDI_VC *vc, struct MPID_Request *req);
int MPID_nem_llc_kvs_put_binary(int from, const char *postfix, const uint8_t * buf,
int length);
int MPID_nem_tofu_kvs_get_binary(int from, const char *postfix, char *buf, int length);
void MPID_nem_tofu_anysource_posted(MPID_Request *req);
int MPID_nem_tofu_anysource_matched(MPID_Request *req);
int MPID_nem_tofu_probe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm, int context_offset,
int MPID_nem_llc_kvs_get_binary(int from, const char *postfix, char *buf, int length);
void MPID_nem_llc_anysource_posted(MPID_Request *req);
int MPID_nem_llc_anysource_matched(MPID_Request *req);
int MPID_nem_llc_probe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm, int context_offset,
MPI_Status *status);
int MPID_nem_tofu_iprobe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm, int context_offset,
int MPID_nem_llc_iprobe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm, int context_offset,
int *flag, MPI_Status *status);
int MPID_nem_tofu_improbe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm, int context_offset,
int MPID_nem_llc_improbe(MPIDI_VC_t *vc, int source, int tag, MPID_Comm *comm, int context_offset,
int *flag, MPID_Request **message, MPI_Status *status);
int MPID_nem_tofu_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *req);
int MPID_nem_llc_cancel_recv(struct MPIDI_VC *vc, struct MPID_Request *req);
/*
* temporary llctofu api
* temporary llc api
*/
typedef void (*llctofu_send_f)(void *cba, uint64_t *reqid);
typedef void (*llctofu_recv_f)
typedef void (*llc_send_f)(void *cba, uint64_t *reqid);
typedef void (*llc_recv_f)
(void *cba, uint64_t addr, void *buf, size_t bsz);
extern ssize_t llctofu_writev(void *endpt, uint64_t raddr,
extern ssize_t llc_writev(void *endpt, uint64_t raddr,
const struct iovec *iovs, int niov, void *cbarg, void **vpp_reqid);
extern int llctofu_bind(void **vpp_endpt, uint64_t raddr, void *cbarg);
extern int llctofu_unbind(void *endpt);
extern int llc_bind(void **vpp_endpt, uint64_t raddr, void *cbarg);
extern int llc_unbind(void *endpt);
extern int llctofu_poll(int in_blocking_poll,
llctofu_send_f sfnc, llctofu_recv_f rfnc);
extern int llc_poll(int in_blocking_poll,
llc_send_f sfnc, llc_recv_f rfnc);
extern int convert_rank_llc2mpi(MPID_Comm *comm, int llc_rank, int *mpi_rank);
typedef struct MPID_nem_tofu_netmod_hdr {
typedef struct MPID_nem_llc_netmod_hdr {
int initiator_pg_rank;
#ifndef notdef_hsiz_hack
int reserved_for_alignment;
#endif /* notdef_hsiz_hack */
} MPID_nem_tofu_netmod_hdr_t;
} MPID_nem_llc_netmod_hdr_t;
#define MPID_nem_tofu_segv printf("%d\n", *(int32_t*)0);
#define MPID_nem_llc_segv printf("%d\n", *(int32_t*)0);
#endif /* TOFU_MODULE_IMPL_H */
#endif /* LLC_MODULE_IMPL_H */
......@@ -7,10 +7,10 @@
#include "mpid_nem_impl.h"
#include "tofu_impl.h"
#include "llc_impl.h"
//#define MPID_NEM_TOFU_DEBUG_INIT
#ifdef MPID_NEM_TOFU_DEBUG_INIT
//#define MPID_NEM_LLC_DEBUG_INIT
#ifdef MPID_NEM_LLC_DEBUG_INIT
#define dprintf printf
#else
#define dprintf(...)
......@@ -20,31 +20,31 @@
/* src/mpid/ch3/channels/nemesis/include/mpid_nem_nets.h */
MPID_nem_netmod_funcs_t MPIDI_nem_tofu_funcs = {
.init = MPID_nem_tofu_init,
.finalize = MPID_nem_tofu_finalize,
MPID_nem_netmod_funcs_t MPIDI_nem_llc_funcs = {
.init = MPID_nem_llc_init,
.finalize = MPID_nem_llc_finalize,
#ifdef ENABLE_CHECKPOINTING
.ckpt_precheck = NULL,
.ckpt_restart = NULL,
.ckpt_continue = NULL,
#endif
.poll = MPID_nem_tofu_poll,
.get_business_card = MPID_nem_tofu_get_business_card,
.connect_to_root = MPID_nem_tofu_connect_to_root,
.vc_init = MPID_nem_tofu_vc_init,
.vc_destroy = MPID_nem_tofu_vc_destroy,
.vc_terminate = MPID_nem_tofu_vc_terminate,
.anysource_iprobe = MPID_nem_tofu_anysource_iprobe,
.anysource_improbe = MPID_nem_tofu_anysource_improbe,
.poll = MPID_nem_llc_poll,
.get_business_card = MPID_nem_llc_get_business_card,
.connect_to_root = MPID_nem_llc_connect_to_root,
.vc_init = MPID_nem_llc_vc_init,
.vc_destroy = MPID_nem_llc_vc_destroy,
.vc_terminate = MPID_nem_llc_vc_terminate,
.anysource_iprobe = MPID_nem_llc_anysource_iprobe,
.anysource_improbe = MPID_nem_llc_anysource_improbe,
};
int MPID_nem_tofu_my_llc_rank;
int MPID_nem_llc_my_llc_rank;
#undef FUNCNAME
#define FUNCNAME MPID_nem_tofu_kvs_put_binary
#define FUNCNAME MPID_nem_llc_kvs_put_binary
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPID_nem_tofu_kvs_put_binary(int from, const char *postfix, const uint8_t * buf,
int MPID_nem_llc_kvs_put_binary(int from, const char *postfix, const uint8_t * buf,
int length)
{
int mpi_errno = MPI_SUCCESS;
......@@ -53,8 +53,8 @@ int MPID_nem_tofu_kvs_put_binary(int from, const char *postfix, const uint8_t *
char key[256], val[256], str[256];
int j;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TOFU_KVS_PUT_BINARY);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TOFU_KVS_PUT_BINARY);
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_KVS_PUT_BINARY);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LLC_KVS_PUT_BINARY);
mpi_errno = MPIDI_PG_GetConnKVSname(&kvs_name);
MPIU_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER, "**MPIDI_PG_GetConnKVSname");
......@@ -71,17 +71,17 @@ int MPID_nem_tofu_kvs_put_binary(int from, const char *postfix, const uint8_t *
pmi_errno = PMI_KVS_Put(kvs_name, key, val);
MPIU_ERR_CHKANDJUMP(pmi_errno, mpi_errno, MPI_ERR_OTHER, "**PMI_KVS_Put");
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_TOFU_KVS_PUT_BINARY);
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_LLC_KVS_PUT_BINARY);
return mpi_errno;
fn_fail:
goto fn_exit;
}
#undef FUNCNAME
#define FUNCNAME MPID_nem_tofu_kvs_get_binary
#define FUNCNAME MPID_nem_llc_kvs_get_binary
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPID_nem_tofu_kvs_get_binary(int from, const char *postfix, char *buf, int length)
int MPID_nem_llc_kvs_get_binary(int from, const char *postfix, char *buf, int length)
{
int mpi_errno = MPI_SUCCESS;
int pmi_errno;
......@@ -89,8 +89,8 @@ int MPID_nem_tofu_kvs_get_binary(int from, const char *postfix, char *buf, int l
char key[256], val[256], str[256];
int j;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TOFU_KVS_GET_BINARY);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TOFU_KVS_GET_BINARY);
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_KVS_GET_BINARY);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LLC_KVS_GET_BINARY);
mpi_errno = MPIDI_PG_GetConnKVSname(&kvs_name);
dprintf("kvs_get_binary,kvs_name=%s\n", kvs_name);
......@@ -112,116 +112,116 @@ int MPID_nem_tofu_kvs_get_binary(int from, const char *postfix, char *buf, int l
}
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_TOFU_KVS_GET_BINARY);
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_LLC_KVS_GET_BINARY);
return mpi_errno;
fn_fail:
goto fn_exit;
}
#undef FUNCNAME
#define FUNCNAME MPID_nem_tofu_init
#define FUNCNAME MPID_nem_llc_init
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int
MPID_nem_tofu_init (MPIDI_PG_t *pg_p, int pg_rank,
MPID_nem_llc_init (MPIDI_PG_t *pg_p, int pg_rank,
char **bc_val_p, int *val_max_sz_p)
{
int mpi_errno = MPI_SUCCESS, pmi_errno, llc_errno;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TOFU_INIT);
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_INIT);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TOFU_INIT);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LLC_INIT);
llc_errno = LLC_init(TYPE_MPI);
MPIU_ERR_CHKANDJUMP(llc_errno, mpi_errno, MPI_ERR_OTHER, "**LLC_init");
llc_errno = LLC_comm_rank(LLC_COMM_MPICH, &MPID_nem_tofu_my_llc_rank);
llc_errno = LLC_comm_rank(LLC_COMM_MPICH, &MPID_nem_llc_my_llc_rank);
MPIU_ERR_CHKANDJUMP(llc_errno, mpi_errno, MPI_ERR_OTHER, "**LLC_comm_rank");
/* Announce my LLC rank */
mpi_errno =
MPID_nem_tofu_kvs_put_binary(pg_rank, "llc_rank",
(uint8_t *) & MPID_nem_tofu_my_llc_rank,
MPID_nem_llc_kvs_put_binary(pg_rank, "llc_rank",
(uint8_t *) & MPID_nem_llc_my_llc_rank,
sizeof(int));
MPIU_ERR_CHKANDJUMP(mpi_errno, mpi_errno, MPI_ERR_OTHER,
"**MPID_nem_ib_kvs_put_binary");
dprintf("tofu_init,my_pg_rank=%d,my_llc_rank=%d\n",
MPIDI_Process.my_pg_rank, MPID_nem_tofu_my_llc_rank);
dprintf("llc_init,my_pg_rank=%d,my_llc_rank=%d\n",
MPIDI_Process.my_pg_rank, MPID_nem_llc_my_llc_rank);
/* Wait until the key-value propagates among all ranks */
pmi_errno = PMI_Barrier();
MPIU_ERR_CHKANDJUMP(pmi_errno != PMI_SUCCESS, mpi_errno, MPI_ERR_OTHER, "**PMI_Barrier");
mpi_errno =
MPIDI_CH3I_Register_anysource_notification(MPID_nem_tofu_anysource_posted,
MPID_nem_tofu_anysource_matched);
MPIDI_CH3I_Register_anysource_notification(MPID_nem_llc_anysource_posted,
MPID_nem_llc_anysource_matched);
MPIDI_Anysource_improbe_fn = MPID_nem_tofu_anysource_improbe;
MPIDI_Anysource_improbe_fn = MPID_nem_llc_anysource_improbe;
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_TOFU_INIT);
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_LLC_INIT);
return mpi_errno;
fn_fail:
goto fn_exit;
}
#undef FUNCNAME
#define FUNCNAME MPID_nem_tofu_get_business_card
#define FUNCNAME MPID_nem_llc_get_business_card
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int
MPID_nem_tofu_get_business_card (int my_rank, char **bc_val_p, int *val_max_sz_p)
MPID_nem_llc_get_business_card (int my_rank, char **bc_val_p, int *val_max_sz_p)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TOFU_GET_BUSINESS_CARD);
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_GET_BUSINESS_CARD);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TOFU_GET_BUSINESS_CARD);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LLC_GET_BUSINESS_CARD);
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_TOFU_GET_BUSINESS_CARD);
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_LLC_GET_BUSINESS_CARD);
return mpi_errno;
//fn_fail:
goto fn_exit;
}
#undef FUNCNAME
#define FUNCNAME MPID_nem_tofu_connect_to_root
#define FUNCNAME MPID_nem_llc_connect_to_root
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int
MPID_nem_tofu_connect_to_root (const char *business_card, MPIDI_VC_t *new_vc)
MPID_nem_llc_connect_to_root (const char *business_card, MPIDI_VC_t *new_vc)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TOFU_CONNECT_TO_ROOT);
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_CONNECT_TO_ROOT);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TOFU_CONNECT_TO_ROOT);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LLC_CONNECT_TO_ROOT);
fn_exit:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_TOFU_CONNECT_TO_ROOT);
MPIDI_FUNC_EXIT(MPID_STATE_MPID_NEM_LLC_CONNECT_TO_ROOT);
return mpi_errno;
//fn_fail:
goto fn_exit;
}
/* ============================================== */
/* ================ tofu_probe.c ================ */
/* ================ llc_probe.c ================ */
/* ============================================== */
#undef FUNCNAME
#define FUNCNAME MPID_nem_tofu_anysource_iprobe
#define FUNCNAME MPID_nem_llc_anysource_iprobe
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPID_nem_tofu_anysource_iprobe(int tag, MPID_Comm *comm, int context_offset, int *flag, MPI_Status *status)
int MPID_nem_llc_anysource_iprobe(int tag, MPID_Comm *comm, int context_offset, int *flag, MPI_Status *status)
{
return MPID_nem_tofu_iprobe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, status);
return MPID_nem_llc_iprobe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, status);
}
#undef FUNCNAME
#define FUNCNAME MPID_nem_tofu_anysource_improbe
#define FUNCNAME MPID_nem_llc_anysource_improbe
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
int MPID_nem_tofu_anysource_improbe(int tag, MPID_Comm *comm, int context_offset, int *flag, MPID_Request **message, MPI_Status *status)
int MPID_nem_llc_anysource_improbe(int tag, MPID_Comm *comm, int context_offset, int *flag, MPID_Request **message, MPI_Status *status)
{
return MPID_nem_tofu_improbe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, message, status);
return MPID_nem_llc_improbe(NULL, MPI_ANY_SOURCE, tag, comm, context_offset, flag, message, status);
}
......@@ -7,10 +7,10 @@
#include "mpid_nem_impl.h"
#include "tofu_impl.h"
#include "llc_impl.h"
//#define MPID_NEM_TOFU_DEBUG_POLL
#ifdef MPID_NEM_TOFU_DEBUG_POLL
//#define MPID_NEM_LLC_DEBUG_POLL
#ifdef MPID_NEM_LLC_DEBUG_POLL
#define dprintf printf
#else
#define dprintf(...)
......@@ -18,28 +18,28 @@
/* function prototypes */
static void MPID_nem_tofu_send_handler(void *cba,
static void MPID_nem_llc_send_handler(void *cba,
uint64_t *p_reqid);
static void MPID_nem_tofu_recv_handler(void *vp_vc,
static void MPID_nem_llc_recv_handler(void *vp_vc,
uint64_t raddr, void *buf, size_t bsz);
#undef FUNCNAME
#define FUNCNAME MPID_nem_tofu_poll
#define FUNCNAME MPID_nem_llc_poll
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int
MPID_nem_tofu_poll(int in_blocking_progress)
MPID_nem_llc_poll(int in_blocking_progress)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_TOFU_POLL);
MPIDI_STATE_DECL(MPID_STATE_MPID_NEM_LLC_POLL);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_TOFU_POLL);
MPIDI_FUNC_ENTER(MPID_STATE_MPID_NEM_LLC_POLL);
{
int rc;
rc = llctofu_poll(in_blocking_progress,
MPID_nem_tofu_send_handler,
MPID_nem_tofu_recv_handler);
rc = llc_poll(in_blocking_progress,
MPID_nem_llc_send_handler,
MPID_nem_llc_recv_handler);