Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
margo
Commits
0a5eba11
Commit
0a5eba11
authored
May 20, 2017
by
Philip Carns
Browse files
bug fix
parent
95760879
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/composition/composed-benchmark.c
View file @
0a5eba11
...
...
@@ -91,8 +91,13 @@ int main(int argc, char **argv)
buffer
=
calloc
(
1
,
buffer_sz
);
assert
(
buffer
);
printf
(
"DBG: calling data_xfer_read.
\n
"
);
data_xfer_read
(
mid
,
svr_addr
,
buffer
,
buffer_sz
);
printf
(
"DBG: ... DONE.
\n
"
);
printf
(
"DBG: calling composed_read.
\n
"
);
composed_read
(
mid
,
svr_addr
,
buffer
,
buffer_sz
);
printf
(
"DBG: ... DONE.
\n
"
);
/* send one rpc to server to shut it down */
/* create handle */
...
...
examples/composition/delegator-service.c
View file @
0a5eba11
...
...
@@ -72,12 +72,28 @@ DEFINE_MARGO_RPC_HANDLER(delegator_read_ult)
int
delegator_service_register
(
margo_instance_id
mid
,
ABT_pool
pool
,
uint32_t
mplex_id
,
hg_addr_t
data_xfer_svc_addr
)
{
int
hret
;
hg_id_t
id
;
hg_bool_t
flag
;
/* save addr to relay to */
g_data_xfer_svc_addr
=
data_xfer_svc_addr
;
/* register client-side of function to relay */
g_data_xfer_read_id
=
MERCURY_REGISTER
(
margo_get_class
(
mid
),
"data_xfer_read"
,
data_xfer_read_in_t
,
data_xfer_read_out_t
,
NULL
);
/* TODO: make this safe; right now if we register again as a client we lose the RPC
* handler ptr
*/
hret
=
HG_Registered_name
(
margo_get_class
(
mid
),
"data_xfer_read"
,
&
id
,
&
flag
);
assert
(
hret
==
HG_SUCCESS
);
if
(
!
flag
)
{
g_data_xfer_read_id
=
MERCURY_REGISTER
(
margo_get_class
(
mid
),
"data_xfer_read"
,
data_xfer_read_in_t
,
data_xfer_read_out_t
,
NULL
);
}
else
{
g_data_xfer_read_id
=
id
;
}
/* register RPC handler */
MARGO_REGISTER
(
mid
,
"delegator_read"
,
delegator_read_in_t
,
delegator_read_out_t
,
delegator_read_ult_handler
,
mplex_id
,
pool
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment