Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rob Latham
MPICH-BlueGene
Commits
ef22b67d
Commit
ef22b67d
authored
Dec 11, 2014
by
Charles J Archer
Browse files
Include uppercase SFI to OFI in netmod rename
parent
a4b5016f
Changes
9
Hide whitespace changes
Inline
Side-by-side
src/mpid/ch3/channels/nemesis/netmod/ofi/Makefile.mk
View file @
ef22b67d
...
...
@@ -4,7 +4,7 @@
## (C) 2011 by Argonne National Laboratory.
## See COPYRIGHT in top-level directory.
##
if
BUILD_NEMESIS_NETMOD_
S
FI
if
BUILD_NEMESIS_NETMOD_
O
FI
mpi_core_sources
+=
\
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
\
...
...
src/mpid/ch3/channels/nemesis/netmod/ofi/errnames.txt
View file @
ef22b67d
**ofi_avmap:
S
FI get address vector map failed
**ofi_avmap %s %d %s %s:
S
FI address vector map failed (%s:%d:%s:%s)
**ofi_tsend:
S
FI tagged sendto failed
**ofi_tsend %s %d %s %s:
S
FI tagged sendto failed (%s:%d:%s:%s)
**ofi_trecv:
S
FI tagged recvfrom failed
**ofi_trecv %s %d %s %s:
S
FI tagged recvfrom failed (%s:%d:%s:%s)
**ofi_getinfo:
S
FI getinfo() failed
**ofi_getinfo %s %d %s %s:
S
FI getinfo() failed (%s:%d:%s:%s)
**ofi_openep:
S
FI endpoint open failed
**ofi_openep %s %d %s %s:
S
FI endpoint open failed (%s:%d:%s:%s)
**ofi_openfabric:
S
FI fabric open failure
**ofi_openfabric %s %d %s %s:
S
FI fabric open failed (%s:%d:%s:%s)
**ofi_opendomain:
S
FI domain open failure
**ofi_opendomain %s %d %s %s:
S
FI domain open failed (%s:%d:%s:%s)
**ofi_opencq:
S
FI event queue create failure
**ofi_opencq %s %d %s %s:
S
FI event queue create failed (%s:%d:%s:%s)
**ofi_avopen:
S
FI address vector open failed
**ofi_avopen %s %d %s %s:
S
FI address vector open failed (%s:%d:%s:%s)
**ofi_bind:
S
FI resource bind failure
**ofi_bind %s %d %s %s:
S
FI resource bind failed (%s:%d:%s:%s)
**ofi_ep_enable:
S
FI endpoint enable failed
**ofi_ep_enable %s %d %s %s:
S
FI endpoint enable failed (%s:%d:%s:%s)
**ofi_getname:
S
FI get endpoint name failed
**ofi_getname %s %d %s %s:
S
FI get endpoint name failed (%s:%d:%s:%s)
**ofi_avclose:
S
FI av close failed
**ofi_avclose %s %d %s %s:
S
FI av close failed (%s:%d:%s:%s)
**ofi_epclose:
S
FI endpoint close failed
**ofi_epclose %s %d %s %s:
S
FI endpoint close failed (%s:%d:%s:%s)
**ofi_cqclose:
S
FI cq close failed
**ofi_cqclose %s %d %s %s:
S
FI cq close failed (%s:%d:%s:%s)
**ofi_mrclose:
S
FI mr close failed
**ofi_mrclose %s %d %s %s:
S
FI mr close failed (%s:%d:%s:%s)
**ofi_fabricclose:
S
FI fabric close failed
**ofi_fabricclose %s %d %s %s:
S
FI fabric close failed (%s:%d:%s:%s)
**ofi_domainclose:
S
FI domain close failed
**ofi_domainclose %s %d %s %s:
S
FI domain close failed (%s:%d:%s:%s)
**ofi_tsearch:
S
FI tsearch failed
**ofi_tsearch %s %d %s %s:
S
FI tsearch failed (%s:%d:%s:%s)
**ofi_poll:
S
FI poll failed
**ofi_poll %s %d %s %s:
S
FI poll failed (%s:%d:%s:%s)
**ofi_cancel:
S
FI cancel failed
**ofi_cancel %s %d %s %s:
S
FI cancel failed (%s:%d:%s:%s)
**ofi_avmap:
O
FI get address vector map failed
**ofi_avmap %s %d %s %s:
O
FI address vector map failed (%s:%d:%s:%s)
**ofi_tsend:
O
FI tagged sendto failed
**ofi_tsend %s %d %s %s:
O
FI tagged sendto failed (%s:%d:%s:%s)
**ofi_trecv:
O
FI tagged recvfrom failed
**ofi_trecv %s %d %s %s:
O
FI tagged recvfrom failed (%s:%d:%s:%s)
**ofi_getinfo:
O
FI getinfo() failed
**ofi_getinfo %s %d %s %s:
O
FI getinfo() failed (%s:%d:%s:%s)
**ofi_openep:
O
FI endpoint open failed
**ofi_openep %s %d %s %s:
O
FI endpoint open failed (%s:%d:%s:%s)
**ofi_openfabric:
O
FI fabric open failure
**ofi_openfabric %s %d %s %s:
O
FI fabric open failed (%s:%d:%s:%s)
**ofi_opendomain:
O
FI domain open failure
**ofi_opendomain %s %d %s %s:
O
FI domain open failed (%s:%d:%s:%s)
**ofi_opencq:
O
FI event queue create failure
**ofi_opencq %s %d %s %s:
O
FI event queue create failed (%s:%d:%s:%s)
**ofi_avopen:
O
FI address vector open failed
**ofi_avopen %s %d %s %s:
O
FI address vector open failed (%s:%d:%s:%s)
**ofi_bind:
O
FI resource bind failure
**ofi_bind %s %d %s %s:
O
FI resource bind failed (%s:%d:%s:%s)
**ofi_ep_enable:
O
FI endpoint enable failed
**ofi_ep_enable %s %d %s %s:
O
FI endpoint enable failed (%s:%d:%s:%s)
**ofi_getname:
O
FI get endpoint name failed
**ofi_getname %s %d %s %s:
O
FI get endpoint name failed (%s:%d:%s:%s)
**ofi_avclose:
O
FI av close failed
**ofi_avclose %s %d %s %s:
O
FI av close failed (%s:%d:%s:%s)
**ofi_epclose:
O
FI endpoint close failed
**ofi_epclose %s %d %s %s:
O
FI endpoint close failed (%s:%d:%s:%s)
**ofi_cqclose:
O
FI cq close failed
**ofi_cqclose %s %d %s %s:
O
FI cq close failed (%s:%d:%s:%s)
**ofi_mrclose:
O
FI mr close failed
**ofi_mrclose %s %d %s %s:
O
FI mr close failed (%s:%d:%s:%s)
**ofi_fabricclose:
O
FI fabric close failed
**ofi_fabricclose %s %d %s %s:
O
FI fabric close failed (%s:%d:%s:%s)
**ofi_domainclose:
O
FI domain close failed
**ofi_domainclose %s %d %s %s:
O
FI domain close failed (%s:%d:%s:%s)
**ofi_tsearch:
O
FI tsearch failed
**ofi_tsearch %s %d %s %s:
O
FI tsearch failed (%s:%d:%s:%s)
**ofi_poll:
O
FI poll failed
**ofi_poll %s %d %s %s:
O
FI poll failed (%s:%d:%s:%s)
**ofi_cancel:
O
FI cancel failed
**ofi_cancel %s %d %s %s:
O
FI cancel failed (%s:%d:%s:%s)
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_cm.c
View file @
ef22b67d
...
...
@@ -38,7 +38,7 @@ static inline MPIDI_VC_t *ofi_tag_to_vc(uint64_t match_bits)
port
=
get_port
(
match_bits
);
vc
=
gl_data
.
cm_vcs
;
while
(
vc
&&
vc
->
port_name_tag
!=
port
)
{
vc
=
VC_
S
FI
(
vc
)
->
next
;
vc
=
VC_
O
FI
(
vc
)
->
next
;
}
if
(
NULL
==
vc
)
{
MPIU_Assertp
(
0
);
...
...
@@ -90,7 +90,7 @@ static inline MPIDI_VC_t *ofi_tag_to_vc(uint64_t match_bits)
static
inline
int
MPID_nem_ofi_conn_req_callback
(
cq_tagged_entry_t
*
wc
,
MPID_Request
*
rreq
)
{
int
ret
,
len
,
mpi_errno
=
MPI_SUCCESS
;
char
bc
[
S
FI_KVSAPPSTRLEN
];
char
bc
[
O
FI_KVSAPPSTRLEN
];
MPIDI_VC_t
*
vc
;
char
*
addr
=
NULL
;
...
...
@@ -103,12 +103,12 @@ static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPID_Re
MPIU_Assert
(
gl_data
.
conn_req
==
rreq
);
FI_RC
(
fi_trecv
(
gl_data
.
endpoint
,
gl_data
.
conn_req
->
dev
.
user_buf
,
S
FI_KVSAPPSTRLEN
,
O
FI_KVSAPPSTRLEN
,
gl_data
.
mr
,
0
,
MPID_CONN_REQ
,
~
MPID_PROTOCOL_MASK
,
(
void
*
)
&
(
REQ_
S
FI
(
gl_data
.
conn_req
)
->
ofi_context
)),
trecv
);
(
void
*
)
&
(
REQ_
O
FI
(
gl_data
.
conn_req
)
->
ofi_context
)),
trecv
);
addr
=
MPIU_Malloc
(
gl_data
.
bound_addrlen
);
MPIU_Assertp
(
addr
);
...
...
@@ -118,16 +118,16 @@ static inline int MPID_nem_ofi_conn_req_callback(cq_tagged_entry_t * wc, MPID_Re
MPIDI_VC_Init
(
vc
,
NULL
,
0
);
MPI_RC
(
MPIDI_GetTagFromPort
(
bc
,
&
vc
->
port_name_tag
));
ret
=
MPIU_Str_get_binary_arg
(
bc
,
"
S
FI"
,
addr
,
gl_data
.
bound_addrlen
,
&
len
);
ret
=
MPIU_Str_get_binary_arg
(
bc
,
"
O
FI"
,
addr
,
gl_data
.
bound_addrlen
,
&
len
);
MPIU_ERR_CHKANDJUMP
((
ret
!=
MPIU_STR_SUCCESS
&&
ret
!=
MPIU_STR_NOMEM
)
||
(
size_t
)
len
!=
gl_data
.
bound_addrlen
,
mpi_errno
,
MPI_ERR_OTHER
,
"**badbusinesscard"
);
FI_RC
(
fi_av_insert
(
gl_data
.
av
,
addr
,
1
,
&
direct_addr
,
0ULL
,
NULL
),
avmap
);
VC_
S
FI
(
vc
)
->
direct_addr
=
direct_addr
;
VC_
S
FI
(
vc
)
->
ready
=
1
;
VC_
S
FI
(
vc
)
->
is_cmvc
=
1
;
VC_
S
FI
(
vc
)
->
next
=
gl_data
.
cm_vcs
;
VC_
O
FI
(
vc
)
->
direct_addr
=
direct_addr
;
VC_
O
FI
(
vc
)
->
ready
=
1
;
VC_
O
FI
(
vc
)
->
is_cmvc
=
1
;
VC_
O
FI
(
vc
)
->
next
=
gl_data
.
cm_vcs
;
gl_data
.
cm_vcs
=
vc
;
MPIDI_CH3I_Acceptq_enqueue
(
vc
,
vc
->
port_name_tag
);
...
...
@@ -159,10 +159,10 @@ static inline int MPID_nem_ofi_handle_packet(cq_tagged_entry_t * wc ATTRIBUTE((u
BEGIN_FUNC
(
FCNAME
);
if
(
rreq
->
cc
==
1
)
{
vc
=
REQ_
S
FI
(
rreq
)
->
vc
;
vc
=
REQ_
O
FI
(
rreq
)
->
vc
;
MPIU_Assert
(
vc
);
MPI_RC
(
MPID_nem_handle_pkt
(
vc
,
REQ_
S
FI
(
rreq
)
->
pack_buffer
,
REQ_
S
FI
(
rreq
)
->
pack_buffer_size
))
MPIU_Free
(
REQ_
S
FI
(
rreq
)
->
pack_buffer
);
MPI_RC
(
MPID_nem_handle_pkt
(
vc
,
REQ_
O
FI
(
rreq
)
->
pack_buffer
,
REQ_
O
FI
(
rreq
)
->
pack_buffer_size
))
MPIU_Free
(
REQ_
O
FI
(
rreq
)
->
pack_buffer
);
}
MPIDI_CH3U_Request_complete
(
rreq
);
END_FUNC_RC
(
FCNAME
);
...
...
@@ -179,7 +179,7 @@ static inline int MPID_nem_ofi_cts_send_callback(cq_tagged_entry_t * wc, MPID_Re
{
int
mpi_errno
=
MPI_SUCCESS
;
BEGIN_FUNC
(
FCNAME
);
MPI_RC
(
MPID_nem_ofi_handle_packet
(
wc
,
REQ_
S
FI
(
sreq
)
->
parent
));
MPI_RC
(
MPID_nem_ofi_handle_packet
(
wc
,
REQ_
O
FI
(
sreq
)
->
parent
));
MPIDI_CH3U_Request_complete
(
sreq
);
END_FUNC_RC
(
FCNAME
);
}
...
...
@@ -217,28 +217,28 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R
MPID_cc_incr
(
new_rreq
->
cc_ptr
,
&
c
);
new_rreq
->
dev
.
OnDataAvail
=
NULL
;
new_rreq
->
dev
.
next
=
NULL
;
REQ_
S
FI
(
new_rreq
)
->
event_callback
=
MPID_nem_ofi_handle_packet
;
REQ_
S
FI
(
new_rreq
)
->
vc
=
vc
;
REQ_
S
FI
(
new_rreq
)
->
pack_buffer
=
pack_buffer
;
REQ_
S
FI
(
new_rreq
)
->
pack_buffer_size
=
pkt_len
;
REQ_
O
FI
(
new_rreq
)
->
event_callback
=
MPID_nem_ofi_handle_packet
;
REQ_
O
FI
(
new_rreq
)
->
vc
=
vc
;
REQ_
O
FI
(
new_rreq
)
->
pack_buffer
=
pack_buffer
;
REQ_
O
FI
(
new_rreq
)
->
pack_buffer_size
=
pkt_len
;
FI_RC
(
fi_trecv
(
gl_data
.
endpoint
,
REQ_
S
FI
(
new_rreq
)
->
pack_buffer
,
REQ_
S
FI
(
new_rreq
)
->
pack_buffer_size
,
REQ_
O
FI
(
new_rreq
)
->
pack_buffer
,
REQ_
O
FI
(
new_rreq
)
->
pack_buffer_size
,
gl_data
.
mr
,
VC_
S
FI
(
vc
)
->
direct_addr
,
wc
->
tag
|
MPID_MSG_DATA
,
0
,
&
(
REQ_
S
FI
(
new_rreq
)
->
ofi_context
)),
trecv
);
VC_
O
FI
(
vc
)
->
direct_addr
,
wc
->
tag
|
MPID_MSG_DATA
,
0
,
&
(
REQ_
O
FI
(
new_rreq
)
->
ofi_context
)),
trecv
);
MPID_nem_ofi_create_req
(
&
sreq
,
1
);
sreq
->
dev
.
OnDataAvail
=
NULL
;
sreq
->
dev
.
next
=
NULL
;
REQ_
S
FI
(
sreq
)
->
event_callback
=
MPID_nem_ofi_cts_send_callback
;
REQ_
S
FI
(
sreq
)
->
parent
=
new_rreq
;
REQ_
O
FI
(
sreq
)
->
event_callback
=
MPID_nem_ofi_cts_send_callback
;
REQ_
O
FI
(
sreq
)
->
parent
=
new_rreq
;
FI_RC
(
fi_tsend
(
gl_data
.
endpoint
,
NULL
,
0
,
gl_data
.
mr
,
VC_
S
FI
(
vc
)
->
direct_addr
,
wc
->
tag
|
MPID_MSG_CTS
,
&
(
REQ_
S
FI
(
sreq
)
->
ofi_context
)),
tsend
);
VC_
O
FI
(
vc
)
->
direct_addr
,
wc
->
tag
|
MPID_MSG_CTS
,
&
(
REQ_
O
FI
(
sreq
)
->
ofi_context
)),
tsend
);
MPIU_Assert
(
gl_data
.
persistent_req
==
rreq
);
rreq
->
dev
.
user_count
=
0
;
...
...
@@ -248,7 +248,7 @@ static inline int MPID_nem_ofi_preposted_callback(cq_tagged_entry_t * wc, MPID_R
gl_data
.
mr
,
0
,
MPID_MSG_RTS
,
~
MPID_PROTOCOL_MASK
,
&
(
REQ_
S
FI
(
rreq
)
->
ofi_context
)),
trecv
);
~
MPID_PROTOCOL_MASK
,
&
(
REQ_
O
FI
(
rreq
)
->
ofi_context
)),
trecv
);
END_FUNC_RC
(
FCNAME
);
}
...
...
@@ -264,8 +264,8 @@ int MPID_nem_ofi_connect_to_root_callback(cq_tagged_entry_t * wc ATTRIBUTE((unus
int
mpi_errno
=
MPI_SUCCESS
;
BEGIN_FUNC
(
FCNAME
);
if
(
REQ_
S
FI
(
sreq
)
->
pack_buffer
)
MPIU_Free
(
REQ_
S
FI
(
sreq
)
->
pack_buffer
);
if
(
REQ_
O
FI
(
sreq
)
->
pack_buffer
)
MPIU_Free
(
REQ_
O
FI
(
sreq
)
->
pack_buffer
);
MPIDI_CH3U_Request_complete
(
sreq
);
END_FUNC
(
FCNAME
);
...
...
@@ -301,8 +301,8 @@ int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused)))
MPID_nem_ofi_create_req
(
&
persistent_req
,
1
);
persistent_req
->
dev
.
OnDataAvail
=
NULL
;
persistent_req
->
dev
.
next
=
NULL
;
REQ_
S
FI
(
persistent_req
)
->
vc
=
NULL
;
REQ_
S
FI
(
persistent_req
)
->
event_callback
=
MPID_nem_ofi_preposted_callback
;
REQ_
O
FI
(
persistent_req
)
->
vc
=
NULL
;
REQ_
O
FI
(
persistent_req
)
->
event_callback
=
MPID_nem_ofi_preposted_callback
;
FI_RC
(
fi_trecv
(
gl_data
.
endpoint
,
&
persistent_req
->
dev
.
user_count
,
sizeof
persistent_req
->
dev
.
user_count
,
...
...
@@ -310,25 +310,25 @@ int MPID_nem_ofi_cm_init(MPIDI_PG_t * pg_p, int pg_rank ATTRIBUTE((unused)))
0
,
MPID_MSG_RTS
,
~
MPID_PROTOCOL_MASK
,
(
void
*
)
&
(
REQ_
S
FI
(
persistent_req
)
->
ofi_context
)),
trecv
);
(
void
*
)
&
(
REQ_
O
FI
(
persistent_req
)
->
ofi_context
)),
trecv
);
gl_data
.
persistent_req
=
persistent_req
;
/* --------------------------------- */
/* Post recv for connection requests */
/* --------------------------------- */
MPID_nem_ofi_create_req
(
&
conn_req
,
1
);
conn_req
->
dev
.
user_buf
=
MPIU_Malloc
(
S
FI_KVSAPPSTRLEN
*
sizeof
(
char
));
conn_req
->
dev
.
user_buf
=
MPIU_Malloc
(
O
FI_KVSAPPSTRLEN
*
sizeof
(
char
));
conn_req
->
dev
.
OnDataAvail
=
NULL
;
conn_req
->
dev
.
next
=
NULL
;
REQ_
S
FI
(
conn_req
)
->
vc
=
NULL
;
/* We don't know the source yet */
REQ_
S
FI
(
conn_req
)
->
event_callback
=
MPID_nem_ofi_conn_req_callback
;
REQ_
O
FI
(
conn_req
)
->
vc
=
NULL
;
/* We don't know the source yet */
REQ_
O
FI
(
conn_req
)
->
event_callback
=
MPID_nem_ofi_conn_req_callback
;
FI_RC
(
fi_trecv
(
gl_data
.
endpoint
,
conn_req
->
dev
.
user_buf
,
S
FI_KVSAPPSTRLEN
,
O
FI_KVSAPPSTRLEN
,
gl_data
.
mr
,
0
,
MPID_CONN_REQ
,
~
MPID_PROTOCOL_MASK
,
(
void
*
)
&
(
REQ_
S
FI
(
conn_req
)
->
ofi_context
)),
trecv
);
~
MPID_PROTOCOL_MASK
,
(
void
*
)
&
(
REQ_
O
FI
(
conn_req
)
->
ofi_context
)),
trecv
);
gl_data
.
conn_req
=
conn_req
;
...
...
@@ -351,12 +351,12 @@ int MPID_nem_ofi_cm_finalize()
int
mpi_errno
=
MPI_SUCCESS
;
BEGIN_FUNC
(
FCNAME
);
FI_RC
(
fi_cancel
((
fid_t
)
gl_data
.
endpoint
,
&
(
REQ_
S
FI
(
gl_data
.
persistent_req
)
->
ofi_context
)),
cancel
);
&
(
REQ_
O
FI
(
gl_data
.
persistent_req
)
->
ofi_context
)),
cancel
);
MPIR_STATUS_SET_CANCEL_BIT
(
gl_data
.
persistent_req
->
status
,
TRUE
);
MPIR_STATUS_SET_COUNT
(
gl_data
.
persistent_req
->
status
,
0
);
MPIDI_CH3U_Request_complete
(
gl_data
.
persistent_req
);
FI_RC
(
fi_cancel
((
fid_t
)
gl_data
.
endpoint
,
&
(
REQ_
S
FI
(
gl_data
.
conn_req
)
->
ofi_context
)),
cancel
);
FI_RC
(
fi_cancel
((
fid_t
)
gl_data
.
endpoint
,
&
(
REQ_
O
FI
(
gl_data
.
conn_req
)
->
ofi_context
)),
cancel
);
MPIU_Free
(
gl_data
.
conn_req
->
dev
.
user_buf
);
MPIR_STATUS_SET_CANCEL_BIT
(
gl_data
.
conn_req
->
status
,
TRUE
);
MPIR_STATUS_SET_COUNT
(
gl_data
.
conn_req
->
status
,
0
);
...
...
@@ -373,31 +373,31 @@ int MPID_nem_ofi_cm_finalize()
/* Handle CH3/Nemesis VC connections */
/* * Query the VC address information. In particular we are looking for */
/* the fabric address name. */
/* * Use fi_av_insert to register the address name with
S
FI */
/* * Use fi_av_insert to register the address name with
O
FI */
/* ------------------------------------------------------------------------ */
#undef FCNAME
#define FCNAME DECL_FUNC(MPID_nem_ofi_vc_connect)
int
MPID_nem_ofi_vc_connect
(
MPIDI_VC_t
*
vc
)
{
int
len
,
ret
,
mpi_errno
=
MPI_SUCCESS
;
char
bc
[
S
FI_KVSAPPSTRLEN
],
*
addr
=
NULL
;
char
bc
[
O
FI_KVSAPPSTRLEN
],
*
addr
=
NULL
;
BEGIN_FUNC
(
FCNAME
);
addr
=
MPIU_Malloc
(
gl_data
.
bound_addrlen
);
MPIU_Assert
(
addr
);
MPIU_Assert
(
1
!=
VC_
S
FI
(
vc
)
->
ready
);
MPIU_Assert
(
1
!=
VC_
O
FI
(
vc
)
->
ready
);
if
(
!
vc
->
pg
||
!
vc
->
pg
->
getConnInfo
)
{
goto
fn_exit
;
}
MPI_RC
(
vc
->
pg
->
getConnInfo
(
vc
->
pg_rank
,
bc
,
S
FI_KVSAPPSTRLEN
,
vc
->
pg
));
ret
=
MPIU_Str_get_binary_arg
(
bc
,
"
S
FI"
,
addr
,
gl_data
.
bound_addrlen
,
&
len
);
MPI_RC
(
vc
->
pg
->
getConnInfo
(
vc
->
pg_rank
,
bc
,
O
FI_KVSAPPSTRLEN
,
vc
->
pg
));
ret
=
MPIU_Str_get_binary_arg
(
bc
,
"
O
FI"
,
addr
,
gl_data
.
bound_addrlen
,
&
len
);
MPIU_ERR_CHKANDJUMP
((
ret
!=
MPIU_STR_SUCCESS
&&
ret
!=
MPIU_STR_NOMEM
)
||
(
size_t
)
len
!=
gl_data
.
bound_addrlen
,
mpi_errno
,
MPI_ERR_OTHER
,
"**badbusinesscard"
);
FI_RC
(
fi_av_insert
(
gl_data
.
av
,
addr
,
1
,
&
(
VC_
S
FI
(
vc
)
->
direct_addr
),
0ULL
,
NULL
),
avmap
);
VC_
S
FI
(
vc
)
->
ready
=
1
;
FI_RC
(
fi_av_insert
(
gl_data
.
av
,
addr
,
1
,
&
(
VC_
O
FI
(
vc
)
->
direct_addr
),
0ULL
,
NULL
),
avmap
);
VC_
O
FI
(
vc
)
->
ready
=
1
;
fn_exit:
if
(
addr
)
...
...
@@ -415,7 +415,7 @@ int MPID_nem_ofi_vc_init(MPIDI_VC_t * vc)
{
int
mpi_errno
=
MPI_SUCCESS
;
MPIDI_CH3I_VC
*
const
vc_ch
=
&
vc
->
ch
;
MPID_nem_ofi_vc_t
*
const
vc_ofi
=
VC_
S
FI
(
vc
);
MPID_nem_ofi_vc_t
*
const
vc_ofi
=
VC_
O
FI
(
vc
);
BEGIN_FUNC
(
FCNAME
);
vc
->
sendNoncontig_fn
=
MPID_nem_ofi_SendNoncontig
;
...
...
@@ -447,25 +447,25 @@ int MPID_nem_ofi_vc_init(MPIDI_VC_t * vc)
int
MPID_nem_ofi_vc_destroy
(
MPIDI_VC_t
*
vc
)
{
BEGIN_FUNC
(
FCNAME
);
if
(
vc
&&
(
VC_
S
FI
(
vc
)
->
is_cmvc
==
1
)
&&
(
VC_
S
FI
(
vc
)
->
ready
==
1
))
{
if
(
vc
&&
(
VC_
O
FI
(
vc
)
->
is_cmvc
==
1
)
&&
(
VC_
O
FI
(
vc
)
->
ready
==
1
))
{
if
(
vc
->
pg
!=
NULL
)
{
printf
(
"ERROR: VC Destroy (%p) pg = %s
\n
"
,
vc
,
(
char
*
)
vc
->
pg
->
id
);
}
MPIDI_VC_t
*
prev
=
gl_data
.
cm_vcs
;
while
(
prev
&&
prev
!=
vc
&&
VC_
S
FI
(
prev
)
->
next
!=
vc
)
{
prev
=
VC_
S
FI
(
vc
)
->
next
;
while
(
prev
&&
prev
!=
vc
&&
VC_
O
FI
(
prev
)
->
next
!=
vc
)
{
prev
=
VC_
O
FI
(
vc
)
->
next
;
}
if
(
VC_
S
FI
(
prev
)
->
next
==
vc
)
{
VC_
S
FI
(
prev
)
->
next
=
VC_
S
FI
(
vc
)
->
next
;
if
(
VC_
O
FI
(
prev
)
->
next
==
vc
)
{
VC_
O
FI
(
prev
)
->
next
=
VC_
O
FI
(
vc
)
->
next
;
}
else
if
(
vc
==
gl_data
.
cm_vcs
)
{
gl_data
.
cm_vcs
=
VC_
S
FI
(
vc
)
->
next
;
gl_data
.
cm_vcs
=
VC_
O
FI
(
vc
)
->
next
;
}
else
{
MPIU_Assert
(
0
);
}
}
VC_
S
FI
(
vc
)
->
ready
=
0
;
VC_
O
FI
(
vc
)
->
ready
=
0
;
END_FUNC
(
FCNAME
);
return
MPI_SUCCESS
;
}
...
...
@@ -477,7 +477,7 @@ int MPID_nem_ofi_vc_terminate(MPIDI_VC_t * vc)
int
mpi_errno
=
MPI_SUCCESS
;
BEGIN_FUNC
(
FCNAME
);
MPI_RC
(
MPIDI_CH3U_Handle_connection
(
vc
,
MPIDI_VC_EVENT_TERMINATED
));
VC_
S
FI
(
vc
)
->
ready
=
0
;
VC_
O
FI
(
vc
)
->
ready
=
0
;
END_FUNC_RC
(
FCNAME
);
}
...
...
@@ -502,14 +502,14 @@ int MPID_nem_ofi_vc_terminate(MPIDI_VC_t * vc)
int
MPID_nem_ofi_connect_to_root
(
const
char
*
business_card
,
MPIDI_VC_t
*
new_vc
)
{
int
len
,
ret
,
mpi_errno
=
MPI_SUCCESS
,
str_errno
=
MPI_SUCCESS
;
int
my_bc_len
=
S
FI_KVSAPPSTRLEN
;
int
my_bc_len
=
O
FI_KVSAPPSTRLEN
;
char
*
addr
=
NULL
,
*
bc
=
NULL
,
*
my_bc
=
NULL
;
MPID_Request
*
sreq
;
uint64_t
conn_req_send_bits
;
BEGIN_FUNC
(
FCNAME
);
addr
=
MPIU_Malloc
(
gl_data
.
bound_addrlen
);
bc
=
MPIU_Malloc
(
S
FI_KVSAPPSTRLEN
);
bc
=
MPIU_Malloc
(
O
FI_KVSAPPSTRLEN
);
MPIU_Assertp
(
addr
);
MPIU_Assertp
(
bc
);
my_bc
=
bc
;
...
...
@@ -518,34 +518,34 @@ int MPID_nem_ofi_connect_to_root(const char *business_card, MPIDI_VC_t * new_vc)
goto
fn_fail
;
}
MPI_RC
(
MPIDI_GetTagFromPort
(
business_card
,
&
new_vc
->
port_name_tag
));
ret
=
MPIU_Str_get_binary_arg
(
business_card
,
"
S
FI"
,
addr
,
gl_data
.
bound_addrlen
,
&
len
);
ret
=
MPIU_Str_get_binary_arg
(
business_card
,
"
O
FI"
,
addr
,
gl_data
.
bound_addrlen
,
&
len
);
MPIU_ERR_CHKANDJUMP
((
ret
!=
MPIU_STR_SUCCESS
&&
ret
!=
MPIU_STR_NOMEM
)
||
(
size_t
)
len
!=
gl_data
.
bound_addrlen
,
mpi_errno
,
MPI_ERR_OTHER
,
"**badbusinesscard"
);
FI_RC
(
fi_av_insert
(
gl_data
.
av
,
addr
,
1
,
&
(
VC_
S
FI
(
new_vc
)
->
direct_addr
),
0ULL
,
NULL
),
avmap
);
FI_RC
(
fi_av_insert
(
gl_data
.
av
,
addr
,
1
,
&
(
VC_
O
FI
(
new_vc
)
->
direct_addr
),
0ULL
,
NULL
),
avmap
);
VC_
S
FI
(
new_vc
)
->
ready
=
1
;
VC_
O
FI
(
new_vc
)
->
ready
=
1
;
str_errno
=
MPIU_Str_add_int_arg
(
&
bc
,
&
my_bc_len
,
"tag"
,
new_vc
->
port_name_tag
);
MPIU_ERR_CHKANDJUMP
(
str_errno
,
mpi_errno
,
MPI_ERR_OTHER
,
"**argstr_port_name_tag"
);
MPI_RC
(
MPID_nem_ofi_get_business_card
(
MPIR_Process
.
comm_world
->
rank
,
&
bc
,
&
my_bc_len
));
my_bc_len
=
S
FI_KVSAPPSTRLEN
-
my_bc_len
;
my_bc_len
=
O
FI_KVSAPPSTRLEN
-
my_bc_len
;
MPID_nem_ofi_create_req
(
&
sreq
,
1
);
sreq
->
kind
=
MPID_REQUEST_SEND
;
sreq
->
dev
.
OnDataAvail
=
NULL
;
sreq
->
dev
.
next
=
NULL
;
REQ_
S
FI
(
sreq
)
->
event_callback
=
MPID_nem_ofi_connect_to_root_callback
;
REQ_
S
FI
(
sreq
)
->
pack_buffer
=
my_bc
;
REQ_
O
FI
(
sreq
)
->
event_callback
=
MPID_nem_ofi_connect_to_root_callback
;
REQ_
O
FI
(
sreq
)
->
pack_buffer
=
my_bc
;
conn_req_send_bits
=
init_sendtag
(
0
,
MPIR_Process
.
comm_world
->
rank
,
0
,
MPID_CONN_REQ
);
FI_RC
(
fi_tsend
(
gl_data
.
endpoint
,
REQ_
S
FI
(
sreq
)
->
pack_buffer
,
REQ_
O
FI
(
sreq
)
->
pack_buffer
,
my_bc_len
,
gl_data
.
mr
,
VC_
S
FI
(
new_vc
)
->
direct_addr
,
conn_req_send_bits
,
&
(
REQ_
S
FI
(
sreq
)
->
ofi_context
)),
tsend
);
VC_
O
FI
(
new_vc
)
->
direct_addr
,
conn_req_send_bits
,
&
(
REQ_
O
FI
(
sreq
)
->
ofi_context
)),
tsend
);
MPID_nem_ofi_poll
(
MPID_NONBLOCKING_POLL
);
VC_
S
FI
(
new_vc
)
->
is_cmvc
=
1
;
VC_
S
FI
(
new_vc
)
->
next
=
gl_data
.
cm_vcs
;
VC_
O
FI
(
new_vc
)
->
is_cmvc
=
1
;
VC_
O
FI
(
new_vc
)
->
next
=
gl_data
.
cm_vcs
;
gl_data
.
cm_vcs
=
new_vc
;
fn_exit:
if
(
addr
)
...
...
@@ -567,7 +567,7 @@ int MPID_nem_ofi_get_business_card(int my_rank ATTRIBUTE((unused)),
BEGIN_FUNC
(
FCNAME
);
str_errno
=
MPIU_Str_add_binary_arg
(
bc_val_p
,
val_max_sz_p
,
"
S
FI"
,
"
O
FI"
,
(
char
*
)
&
gl_data
.
bound_addr
,
sizeof
(
gl_data
.
bound_addr
));
if
(
str_errno
)
{
MPIU_ERR_CHKANDJUMP
(
str_errno
==
MPIU_STR_NOMEM
,
mpi_errno
,
MPI_ERR_OTHER
,
"**buscard_len"
);
...
...
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_impl.h
View file @
ef22b67d
...
...
@@ -7,8 +7,8 @@
* to Argonne National Laboratory subject to Software Grant and Corporate
* Contributor License Agreement dated February 8, 2012.
*/
#ifndef
S
FI_IMPL_H
#define
S
FI_IMPL_H
#ifndef
O
FI_IMPL_H
#define
O
FI_IMPL_H
#include "mpid_nem_impl.h"
#include "mpihandlemem.h"
...
...
@@ -61,20 +61,20 @@ typedef struct {
/* This is per destination */
/* ******************************** */
typedef
struct
{
fi_addr_t
direct_addr
;
/* Remote
S
FI address */
fi_addr_t
direct_addr
;
/* Remote
O
FI address */
int
ready
;
/* VC ready state */
int
is_cmvc
;
/* Cleanup VC */
MPIDI_VC_t
*
next
;
/* VC queue */
}
MPID_nem_ofi_vc_t
;
#define VC_
S
FI(vc) ((MPID_nem_ofi_vc_t *)vc->ch.netmod_area.padding)
#define VC_
O
FI(vc) ((MPID_nem_ofi_vc_t *)vc->ch.netmod_area.padding)
/* ******************************** */
/* Per request object data */
/*
S
FI/Netmod specific */
/*
O
FI/Netmod specific */
/* ******************************** */
typedef
struct
{
context_t
ofi_context
;
/* Context Object */
void
*
addr
;
/*
S
FI Address */
void
*
addr
;
/*
O
FI Address */
event_callback_fn
event_callback
;
/* Callback Event */
char
*
pack_buffer
;
/* MPI Pack Buffer */
int
pack_buffer_size
;
/* Pack buffer size */
...
...
@@ -84,7 +84,7 @@ typedef struct {
uint64_t
tag
;
/* 64 bit tag request */
MPID_Request
*
parent
;
/* Parent request */
}
MPID_nem_ofi_req_t
;
#define REQ_
S
FI(req) ((MPID_nem_ofi_req_t *)((req)->ch.netmod_area.padding))
#define REQ_
O
FI(req) ((MPID_nem_ofi_req_t *)((req)->ch.netmod_area.padding))
/* ******************************** */
/* Logging and function macros */
...
...
@@ -109,7 +109,7 @@ fn_fail: \
: __FILE__ \
)
#define DECL_FUNC(FUNCNAME) MPIU_QUOTE(FUNCNAME)
#define
S
FI_COMPILE_TIME_ASSERT(expr_) \
#define
O
FI_COMPILE_TIME_ASSERT(expr_) \
do { switch(0) { case 0: case (expr_): default: break; } } while (0)
#define FI_RC(FUNC,STR) \
...
...
@@ -151,17 +151,17 @@ fn_fail: \
#define VC_READY_CHECK(vc) \
({ \
if (1 != VC_
S
FI(vc)->ready) { \
if (1 != VC_
O
FI(vc)->ready) { \
MPI_RC(MPID_nem_ofi_vc_connect(vc)); \
} \
})
#define
S
FI_ADDR_INIT(src, vc, remote_proc) \
#define
O
FI_ADDR_INIT(src, vc, remote_proc) \
({ \
if (MPI_ANY_SOURCE != src) { \
MPIU_Assert(vc != NULL); \
VC_READY_CHECK(vc); \
remote_proc = VC_
S
FI(vc)->direct_addr; \
remote_proc = VC_
O
FI(vc)->direct_addr; \
} else { \
MPIU_Assert(vc == NULL); \
remote_proc = gl_data.any_addr; \
...
...
@@ -197,14 +197,14 @@ fn_fail: \
#define MPID_TAG_SHIFT (28)
#define MPID_PSOURCE_SHIFT (16)
#define MPID_PORT_SHIFT (32)
#define
S
FI_KVSAPPSTRLEN 1024
#define
O
FI_KVSAPPSTRLEN 1024
/* ******************************** */
/* Request manipulation inlines */
/* ******************************** */
static
inline
void
MPID_nem_ofi_init_req
(
MPID_Request
*
req
)
{
memset
(
REQ_
S
FI
(
req
),
0
,
sizeof
(
MPID_nem_ofi_req_t
));
memset
(
REQ_
O
FI
(
req
),
0
,
sizeof
(
MPID_nem_ofi_req_t
));
}
static
inline
int
MPID_nem_ofi_create_req
(
MPID_Request
**
request
,
int
refcnt
)
...
...
@@ -320,7 +320,7 @@ 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
);
/* ************************************************************************** */
/*
S
FI utility functions : not exposed as a netmod public API */
/*
O
FI utility functions : not exposed as a netmod public API */
/* ************************************************************************** */
#define MPID_NONBLOCKING_POLL 0
#define MPID_BLOCKING_POLL 1
...
...
src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c
View file @
ef22b67d
...
...
@@ -21,7 +21,7 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
info_t
hints
,
*
prov_tagged
,
*
prov_use
;
cq_attr_t
cq_attr
;
av_attr_t
av_attr
;
char
kvsname
[
S
FI_KVSAPPSTRLEN
],
key
[
S
FI_KVSAPPSTRLEN
],
bc
[
S
FI_KVSAPPSTRLEN
];
char
kvsname
[
O
FI_KVSAPPSTRLEN
],
key
[
O
FI_KVSAPPSTRLEN
],
bc
[
O
FI_KVSAPPSTRLEN
];
char
*
my_bc
,
*
addrs
,
*
null_addr
;
fi_addr_t
*
fi_addrs
=
NULL
;
MPIDI_VC_t
*
vc
;
...
...
@@ -39,11 +39,11 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
/* communication calls. */
/* Note that we do not fill in FI_LOCAL_MR, which means this netmod */
/* does not support exchange of memory regions on communication calls */
/*
S
FI requires that all communication calls use a registered mr */
/*
O
FI requires that all communication calls use a registered mr */
/* but in our case this netmod is written to only support transfers */
/* on a dynamic memory region that spans all of memory. So, we do */
/* not set the FI_LOCAL_MR mode bit, and we set the FI_DYNAMIC_MR */
/* bit to tell
S
FI our requirement and filter providers appropriately */
/* bit to tell
O
FI our requirement and filter providers appropriately */
/* ep_type: reliable datagram operation */
/* caps: Capabilities required from the provider. The bits specified */
/* with buffered receive, cancel, and remote complete implements */
...
...
@@ -62,7 +62,7 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
/* ------------------------------------------------------------------------ */
/* FI_VERSION provides binary backward and forward compatibility support */
/* Specify the version of
S
FI is coded to, the provider will select struct */
/* Specify the version of
O
FI is coded to, the provider will select struct */
/* layouts that are compatible with this version. */
/* ------------------------------------------------------------------------ */
fi_version
=
FI_VERSION
(
1
,
0
);
...
...
@@ -203,8 +203,8 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
/* Publish the business card */
/* to the KVS */
/* -------------------------------- */
PMI_RC
(
PMI_KVS_Get_my_name
(
kvsname
,
S
FI_KVSAPPSTRLEN
),
pmi
);
sprintf
(
key
,
"
S
FI-%d"
,
pg_rank
);
PMI_RC
(
PMI_KVS_Get_my_name
(
kvsname
,
O
FI_KVSAPPSTRLEN
),
pmi
);
sprintf
(
key
,
"
O
FI-%d"
,
pg_rank
);
PMI_RC
(
PMI_KVS_Put
(
kvsname
,
key
,
my_bc
),
pmi
);
PMI_RC
(
PMI_KVS_Commit
(
kvsname
),
pmi
);
...
...
@@ -228,10 +228,10 @@ int MPID_nem_ofi_init(MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_
MPIU_CHKLMEM_MALLOC
(
addrs
,
char
*
,
pg_p
->
size
*
gl_data
.
bound_addrlen
,
mpi_errno
,
"addrs"
);
for
(
i
=
0
;
i
<
pg_p
->
size
;
++
i
)
{