Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
margo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
17
Issues
17
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
sds
margo
Commits
d003cb5b
Commit
d003cb5b
authored
May 20, 2017
by
Philip Carns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stub composed client lib path
parent
ef9ae7a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
examples/composition/composed-benchmark.c
examples/composition/composed-benchmark.c
+2
-0
examples/composition/composed-client-lib.c
examples/composition/composed-client-lib.c
+40
-0
No files found.
examples/composition/composed-benchmark.c
View file @
d003cb5b
...
...
@@ -82,6 +82,7 @@ int main(int argc, char **argv)
NULL
);
/* register service APIs */
data_xfer_register_client
(
mid
);
composed_register_client
(
mid
);
/* find addr for server */
ret
=
margo_addr_lookup
(
mid
,
argv
[
1
],
&
svr_addr
);
...
...
@@ -91,6 +92,7 @@ int main(int argc, char **argv)
assert
(
buffer
);
data_xfer_read
(
mid
,
svr_addr
,
buffer
,
buffer_sz
);
composed_read
(
mid
,
svr_addr
,
buffer
,
buffer_sz
);
/* send one rpc to server to shut it down */
/* create handle */
...
...
examples/composition/composed-client-lib.c
View file @
d003cb5b
...
...
@@ -37,6 +37,46 @@ int data_xfer_register_client(margo_instance_id mid)
return
(
0
);
}
void
composed_read
(
margo_instance_id
mid
,
hg_addr_t
svr_addr
,
void
*
buffer
,
hg_size_t
buffer_sz
)
{
hg_handle_t
handle
;
delegator_read_in_t
in
;
delegator_read_out_t
out
;
int
ret
;
const
struct
hg_info
*
hgi
;
/* create handle */
ret
=
HG_Create
(
margo_get_context
(
mid
),
svr_addr
,
delegator_read_id
,
&
handle
);
assert
(
ret
==
0
);
/* register buffer for rdma/bulk access by server */
hgi
=
HG_Get_info
(
handle
);
assert
(
hgi
);
ret
=
HG_Bulk_create
(
hgi
->
hg_class
,
1
,
&
buffer
,
&
buffer_sz
,
HG_BULK_WRITE_ONLY
,
&
in
.
bulk_handle
);
assert
(
ret
==
0
);
#if 0
HG_Set_target_id(handle, mplex_id);
#endif
/* Send rpc. Note that we are also transmitting the bulk handle in the
* input struct. It was set above.
*/
margo_forward
(
mid
,
handle
,
&
in
);
/* decode response */
ret
=
HG_Get_output
(
handle
,
&
out
);
assert
(
ret
==
0
);
/* clean up resources consumed by this rpc */
HG_Bulk_free
(
in
.
bulk_handle
);
HG_Free_output
(
handle
,
&
out
);
HG_Destroy
(
handle
);
return
;
}
void
data_xfer_read
(
margo_instance_id
mid
,
hg_addr_t
svr_addr
,
void
*
buffer
,
hg_size_t
buffer_sz
)
{
hg_handle_t
handle
;
...
...
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