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
3c70631f
Commit
3c70631f
authored
Aug 23, 2017
by
Shane Snyder
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'margo-registered-data' into dev-wrap-hg-iface
parents
6a345e9e
c34e5501
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
192 additions
and
121 deletions
+192
-121
examples/margo-example-client.c
examples/margo-example-client.c
+4
-2
examples/margo-example-server.c
examples/margo-example-server.c
+1
-0
examples/my-rpc.c
examples/my-rpc.c
+2
-0
include/margo.h
include/margo.h
+19
-0
src/margo.c
src/margo.c
+166
-119
No files found.
examples/margo-example-client.c
View file @
3c70631f
...
...
@@ -111,6 +111,8 @@ int main(int argc, char **argv)
/* actually start margo */
/***************************************/
mid
=
margo_init
(
0
,
0
,
hg_context
);
assert
(
mid
);
margo_diag_start
(
mid
);
/* register RPC */
MARGO_REGISTER
(
mid
,
"my_rpc"
,
my_rpc_in_t
,
my_rpc_out_t
,
NULL
,
&
my_rpc_id
);
...
...
@@ -168,11 +170,11 @@ int main(int argc, char **argv)
margo_forward
(
mid
,
handle
,
NULL
);
HG_Destroy
(
handle
);
HG_Destroy
(
handle
);
HG_Addr_free
(
hg_class
,
svr_addr
);
/* shut down everything */
margo_diag_dump
(
mid
,
"-"
,
0
);
margo_finalize
(
mid
);
ABT_finalize
();
...
...
examples/margo-example-server.c
View file @
3c70631f
...
...
@@ -93,6 +93,7 @@ int main(int argc, char **argv)
/* actually start margo */
mid
=
margo_init
(
0
,
0
,
hg_context
);
assert
(
mid
);
margo_diag_start
(
mid
);
/* register RPC */
MARGO_REGISTER
(
mid
,
"my_rpc"
,
my_rpc_in_t
,
my_rpc_out_t
,
my_rpc_ult
,
MARGO_RPC_ID_IGNORE
);
...
...
examples/my-rpc.c
View file @
3c70631f
...
...
@@ -102,6 +102,8 @@ static void my_rpc_shutdown_ult(hg_handle_t handle)
HG_Destroy
(
handle
);
margo_diag_dump
(
mid
,
"-"
,
0
);
/* NOTE: we assume that the server daemon is using
* margo_wait_for_finalize() to suspend until this RPC executes, so there
* is no need to send any extra signal to notify it.
...
...
include/margo.h
View file @
3c70631f
...
...
@@ -647,6 +647,25 @@ margo_instance_id margo_hg_handle_get_instance(hg_handle_t h);
*/
int
margo_lookup_mplex
(
margo_instance_id
mid
,
hg_id_t
id
,
uint32_t
mplex_id
,
ABT_pool
*
pool
);
/**
* Enables diagnostic collection on specified Margo instance
*
* @param [in] mid Margo instance
* @returns void
*/
void
margo_diag_start
(
margo_instance_id
mid
);
/**
* Appends diagnostic statistics (enabled via margo_diag_start()) to specified
* output file.
*
* @param [in] mid Margo instance
* @param [in] file output file ("-" for stdout)
* @param [in] uniquify flag indicating if file name should have additional
* information added to it to make output from different processes unique
* @returns void
*/
void
margo_diag_dump
(
margo_instance_id
mid
,
const
char
*
file
,
int
uniquify
);
/**
* macro that registers a function as an RPC.
...
...
src/margo.c
View file @
3c70631f
This diff is collapsed.
Click to expand it.
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