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
6a345e9e
Commit
6a345e9e
authored
Aug 23, 2017
by
Shane Snyder
Browse files
update margo tests according to new iface changes
parent
972cfbb4
Changes
5
Hide whitespace changes
Inline
Side-by-side
tests/margo-test-client-timeout.c
View file @
6a345e9e
...
...
@@ -7,8 +7,8 @@
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <mercury.h>
#include <abt.h>
#include <abt-snoozer.h>
#include <margo.h>
#include "my-rpc.h"
...
...
@@ -24,8 +24,6 @@ struct run_my_rpc_args
{
int
val
;
margo_instance_id
mid
;
hg_context_t
*
hg_context
;
hg_class_t
*
hg_class
;
hg_addr_t
svr_addr
;
};
...
...
@@ -40,11 +38,10 @@ int main(int argc, char **argv)
ABT_thread
threads
[
4
];
int
i
;
int
ret
;
hg_return_t
hret
;
ABT_xstream
xstream
;
ABT_pool
pool
;
margo_instance_id
mid
;
hg_context_t
*
hg_context
;
hg_class_t
*
hg_class
;
hg_addr_t
svr_addr
=
HG_ADDR_NULL
;
hg_handle_t
handle
;
char
proto
[
12
]
=
{
0
};
...
...
@@ -55,42 +52,24 @@ int main(int argc, char **argv)
return
(
-
1
);
}
/* boilerplate HG initialization steps */
/***************************************/
/* initialize Mercury using the transport portion of the destination
* address (i.e., the part before the first : character if present)
*/
for
(
i
=
0
;
i
<
11
&&
argv
[
1
][
i
]
!=
'\0'
&&
argv
[
1
][
i
]
!=
':'
;
i
++
)
proto
[
i
]
=
argv
[
1
][
i
];
hg_class
=
HG_Init
(
proto
,
HG_FALSE
);
if
(
!
hg_class
)
{
fprintf
(
stderr
,
"Error: HG_Init()
\n
"
);
return
(
-
1
);
}
hg_context
=
HG_Context_create
(
hg_class
);
if
(
!
hg_context
)
{
fprintf
(
stderr
,
"Error: HG_Context_create()
\n
"
);
HG_Finalize
(
hg_class
);
return
(
-
1
);
}
/* set up argobots */
/* actually start margo -- margo_init() encapsulates the Mercury &
* Argobots initialization, so this step must precede their use. */
/* Use main process to drive progress (it will relinquish control to
* Mercury during blocking communication calls). The rpc handler pool
* is null in this example program because this is a pure client that
* will not be servicing rpc requests.
*/
/***************************************/
ret
=
ABT_init
(
argc
,
argv
);
if
(
ret
!=
0
)
mid
=
margo_init
(
proto
,
MARGO_CLIENT_MODE
,
0
,
0
);
if
(
mid
==
MARGO_INSTANCE_NULL
)
{
fprintf
(
stderr
,
"Error: ABT_init()
\n
"
);
return
(
-
1
);
}
/* set primary ES to idle without polling */
ret
=
ABT_snoozer_xstream_self_set
();
if
(
ret
!=
0
)
{
fprintf
(
stderr
,
"Error: ABT_snoozer_xstream_self_set()
\n
"
);
fprintf
(
stderr
,
"Error: margo_init()
\n
"
);
return
(
-
1
);
}
...
...
@@ -108,31 +87,20 @@ int main(int argc, char **argv)
return
(
-
1
);
}
/* actually start margo */
/* Use main process to drive progress (it will relinquish control to
* Mercury during blocking communication calls). The rpc handler pool
* is null in this example program because this is a pure client that
* will not be servicing rpc requests.
*/
/***************************************/
mid
=
margo_init_pool
(
pool
,
ABT_POOL_NULL
,
hg_context
);
/* register RPC */
my_rpc_hang_id
=
MERCURY_REGISTER
(
hg_class
,
"my_rpc_hang"
,
my_rpc_hang_in_t
,
my_rpc_hang_out_t
,
/* register RPCs */
my_rpc_hang_id
=
MARGO_REGISTER
(
mid
,
"my_rpc_hang"
,
my_rpc_hang_in_t
,
my_rpc_hang_out_t
,
NULL
);
my_rpc_shutdown_id
=
M
ERCURY
_REGISTER
(
hg_class
,
"my_shutdown_rpc"
,
void
,
void
,
my_rpc_shutdown_id
=
M
ARGO
_REGISTER
(
mid
,
"my_shutdown_rpc"
,
void
,
void
,
NULL
);
/* find addr for server */
ret
=
margo_addr_lookup
(
mid
,
argv
[
1
],
&
svr_addr
);
assert
(
ret
==
0
);
h
ret
=
margo_addr_lookup
(
mid
,
argv
[
1
],
&
svr_addr
);
assert
(
h
ret
==
HG_SUCCESS
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
args
[
i
].
val
=
i
;
args
[
i
].
mid
=
mid
;
args
[
i
].
hg_class
=
hg_class
;
args
[
i
].
hg_context
=
hg_context
;
args
[
i
].
svr_addr
=
svr_addr
;
/* Each ult gets a pointer to an element of the array to use
...
...
@@ -167,22 +135,21 @@ int main(int argc, char **argv)
}
}
/* send one rpc to server to shut it down */
/* create handle */
ret
=
HG_Create
(
hg_context
,
svr_addr
,
my_rpc_shutdown_id
,
&
handle
);
assert
(
ret
==
0
);
h
ret
=
margo_create
(
mid
,
svr_addr
,
my_rpc_shutdown_id
,
&
handle
);
assert
(
h
ret
==
HG_SUCCESS
);
margo_forward_timed
(
mid
,
handle
,
NULL
,
2000
.
0
);
HG_Addr_free
(
hg_class
,
svr_addr
);
hret
=
margo_forward_timed
(
mid
,
handle
,
NULL
,
2000
.
0
);
assert
(
hret
==
HG_SUCCESS
);
margo_destroy
(
handle
);
margo_addr_free
(
mid
,
svr_addr
);
/* shut down everything */
margo_finalize
(
mid
);
ABT_finalize
();
HG_Context_destroy
(
hg_context
);
HG_Finalize
(
hg_class
);
return
(
0
);
}
...
...
@@ -192,10 +159,9 @@ static void run_my_rpc(void *_arg)
hg_handle_t
handle
;
my_rpc_hang_in_t
in
;
my_rpc_hang_out_t
out
;
in
t
ret
;
hg_return_
t
h
ret
;
hg_size_t
size
;
void
*
buffer
;
const
struct
hg_info
*
hgi
;
printf
(
"ULT [%d] running.
\n
"
,
arg
->
val
);
...
...
@@ -206,42 +172,39 @@ static void run_my_rpc(void *_arg)
sprintf
((
char
*
)
buffer
,
"Hello world!
\n
"
);
/* create handle */
ret
=
HG_C
reate
(
arg
->
hg_context
,
arg
->
svr_addr
,
my_rpc_hang_id
,
&
handle
);
assert
(
ret
==
0
);
h
ret
=
margo_c
reate
(
arg
->
mid
,
arg
->
svr_addr
,
my_rpc_hang_id
,
&
handle
);
assert
(
h
ret
==
HG_SUCCESS
);
/* register buffer for rdma/bulk access by server */
hgi
=
HG_Get_info
(
handle
);
assert
(
hgi
);
ret
=
HG_Bulk_create
(
hgi
->
hg_class
,
1
,
&
buffer
,
&
size
,
hret
=
margo_bulk_create
(
arg
->
mid
,
1
,
&
buffer
,
&
size
,
HG_BULK_READ_ONLY
,
&
in
.
bulk_handle
);
assert
(
ret
==
0
);
assert
(
h
ret
==
HG_SUCCESS
);
/* Send rpc. Note that we are also transmitting the bulk handle in the
* input struct. It was set above.
*/
in
.
input_val
=
arg
->
val
;
/* call with 2 second timeout */
ret
=
margo_forward_timed
(
arg
->
mid
,
handle
,
&
in
,
2000
.
0
);
h
ret
=
margo_forward_timed
(
arg
->
mid
,
handle
,
&
in
,
2000
.
0
);
if
(
ret
==
0
)
if
(
h
ret
==
HG_SUCCESS
)
{
/* decode response */
ret
=
HG_G
et_output
(
handle
,
&
out
);
assert
(
ret
==
0
);
h
ret
=
margo_g
et_output
(
handle
,
&
out
);
assert
(
h
ret
==
HG_SUCCESS
);
printf
(
"Got response ret: %d
\n
"
,
out
.
ret
);
HG_F
ree_output
(
handle
,
&
out
);
margo_f
ree_output
(
handle
,
&
out
);
}
else
{
printf
(
"margo_forward returned %d
\n
"
,
ret
);
printf
(
"margo_forward returned %d
\n
"
,
h
ret
);
}
/* clean up resources consumed by this rpc */
HG_B
ulk_free
(
in
.
bulk_handle
);
HG_D
estroy
(
handle
);
margo_b
ulk_free
(
in
.
bulk_handle
);
margo_d
estroy
(
handle
);
free
(
buffer
);
printf
(
"ULT [%d] done.
\n
"
,
arg
->
val
);
return
;
}
tests/margo-test-client.c
View file @
6a345e9e
...
...
@@ -7,8 +7,8 @@
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <mercury.h>
#include <abt.h>
#include <abt-snoozer.h>
#include <margo.h>
#include "my-rpc.h"
...
...
@@ -24,8 +24,6 @@ struct run_my_rpc_args
{
int
val
;
margo_instance_id
mid
;
hg_context_t
*
hg_context
;
hg_class_t
*
hg_class
;
hg_addr_t
svr_addr
;
};
...
...
@@ -40,11 +38,10 @@ int main(int argc, char **argv)
ABT_thread
threads
[
4
];
int
i
;
int
ret
;
hg_return_t
hret
;
ABT_xstream
xstream
;
ABT_pool
pool
;
margo_instance_id
mid
;
hg_context_t
*
hg_context
;
hg_class_t
*
hg_class
;
hg_addr_t
svr_addr
=
HG_ADDR_NULL
;
hg_handle_t
handle
;
char
proto
[
12
]
=
{
0
};
...
...
@@ -55,42 +52,24 @@ int main(int argc, char **argv)
return
(
-
1
);
}
/* boilerplate HG initialization steps */
/***************************************/
/* initialize Mercury using the transport portion of the destination
* address (i.e., the part before the first : character if present)
*/
for
(
i
=
0
;
i
<
11
&&
argv
[
1
][
i
]
!=
'\0'
&&
argv
[
1
][
i
]
!=
':'
;
i
++
)
proto
[
i
]
=
argv
[
1
][
i
];
hg_class
=
HG_Init
(
proto
,
HG_FALSE
);
if
(
!
hg_class
)
{
fprintf
(
stderr
,
"Error: HG_Init()
\n
"
);
return
(
-
1
);
}
hg_context
=
HG_Context_create
(
hg_class
);
if
(
!
hg_context
)
{
fprintf
(
stderr
,
"Error: HG_Context_create()
\n
"
);
HG_Finalize
(
hg_class
);
return
(
-
1
);
}
/* set up argobots */
/* actually start margo -- margo_init() encapsulates the Mercury &
* Argobots initialization, so this step must precede their use. */
/* Use main process to drive progress (it will relinquish control to
* Mercury during blocking communication calls). The rpc handler pool
* is null in this example program because this is a pure client that
* will not be servicing rpc requests.
*/
/***************************************/
ret
=
ABT_init
(
argc
,
argv
);
if
(
ret
!=
0
)
mid
=
margo_init
(
proto
,
MARGO_CLIENT_MODE
,
0
,
0
);
if
(
mid
==
MARGO_INSTANCE_NULL
)
{
fprintf
(
stderr
,
"Error: ABT_init()
\n
"
);
return
(
-
1
);
}
/* set primary ES to idle without polling */
ret
=
ABT_snoozer_xstream_self_set
();
if
(
ret
!=
0
)
{
fprintf
(
stderr
,
"Error: ABT_snoozer_xstream_self_set()
\n
"
);
fprintf
(
stderr
,
"Error: margo_init()
\n
"
);
return
(
-
1
);
}
...
...
@@ -100,38 +79,26 @@ int main(int argc, char **argv)
{
fprintf
(
stderr
,
"Error: ABT_xstream_self()
\n
"
);
return
(
-
1
);
}
ret
=
ABT_xstream_get_main_pools
(
xstream
,
1
,
&
pool
);
}
ret
=
ABT_xstream_get_main_pools
(
xstream
,
1
,
&
pool
);
if
(
ret
!=
0
)
{
fprintf
(
stderr
,
"Error: ABT_xstream_get_main_pools()
\n
"
);
return
(
-
1
);
}
/* actually start margo */
/* Use main process to drive progress (it will relinquish control to
* Mercury during blocking communication calls). The rpc handler pool
* is null in this example program because this is a pure client that
* will not be servicing rpc requests.
*/
/***************************************/
mid
=
margo_init_pool
(
pool
,
ABT_POOL_NULL
,
hg_context
);
/* register RPC */
my_rpc_id
=
MERCURY_REGISTER
(
hg_class
,
"my_rpc"
,
my_rpc_in_t
,
my_rpc_out_t
,
NULL
);
my_rpc_shutdown_id
=
MERCURY_REGISTER
(
hg_class
,
"my_shutdown_rpc"
,
void
,
void
,
NULL
);
/* register RPCs */
my_rpc_id
=
MARGO_REGISTER
(
mid
,
"my_rpc"
,
my_rpc_in_t
,
my_rpc_out_t
,
NULL
);
my_rpc_shutdown_id
=
MARGO_REGISTER
(
mid
,
"my_shutdown_rpc"
,
void
,
void
,
NULL
);
/* find addr for server */
ret
=
margo_addr_lookup
(
mid
,
argv
[
1
],
&
svr_addr
);
assert
(
ret
==
0
);
h
ret
=
margo_addr_lookup
(
mid
,
argv
[
1
],
&
svr_addr
);
assert
(
h
ret
==
HG_SUCCESS
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
args
[
i
].
val
=
i
;
args
[
i
].
mid
=
mid
;
args
[
i
].
hg_class
=
hg_class
;
args
[
i
].
hg_context
=
hg_context
;
args
[
i
].
svr_addr
=
svr_addr
;
/* Each ult gets a pointer to an element of the array to use
...
...
@@ -169,21 +136,18 @@ int main(int argc, char **argv)
/* send one rpc to server to shut it down */
/* create handle */
ret
=
HG_Create
(
hg_context
,
svr_addr
,
my_rpc_shutdown_id
,
&
handle
);
assert
(
ret
==
0
);
h
ret
=
margo_create
(
mid
,
svr_addr
,
my_rpc_shutdown_id
,
&
handle
);
assert
(
h
ret
==
HG_SUCCESS
);
margo_forward
(
mid
,
handle
,
NULL
);
hret
=
margo_forward
(
mid
,
handle
,
NULL
);
assert
(
hret
==
HG_SUCCESS
);
HG_Addr_free
(
hg_class
,
svr_addr
);
margo_destroy
(
handle
);
margo_addr_free
(
mid
,
svr_addr
);
/* shut down everything */
margo_finalize
(
mid
);
ABT_finalize
();
HG_Context_destroy
(
hg_context
);
HG_Finalize
(
hg_class
);
return
(
0
);
}
...
...
@@ -193,10 +157,9 @@ static void run_my_rpc(void *_arg)
hg_handle_t
handle
;
my_rpc_in_t
in
;
my_rpc_out_t
out
;
in
t
ret
;
hg_return_
t
h
ret
;
hg_size_t
size
;
void
*
buffer
;
const
struct
hg_info
*
hgi
;
printf
(
"ULT [%d] running.
\n
"
,
arg
->
val
);
...
...
@@ -207,35 +170,33 @@ static void run_my_rpc(void *_arg)
sprintf
((
char
*
)
buffer
,
"Hello world!
\n
"
);
/* create handle */
ret
=
HG_C
reate
(
arg
->
hg_context
,
arg
->
svr_addr
,
my_rpc_id
,
&
handle
);
assert
(
ret
==
0
);
h
ret
=
margo_c
reate
(
arg
->
mid
,
arg
->
svr_addr
,
my_rpc_id
,
&
handle
);
assert
(
h
ret
==
HG_SUCCESS
);
/* register buffer for rdma/bulk access by server */
hgi
=
HG_Get_info
(
handle
);
assert
(
hgi
);
ret
=
HG_Bulk_create
(
hgi
->
hg_class
,
1
,
&
buffer
,
&
size
,
hret
=
margo_bulk_create
(
arg
->
mid
,
1
,
&
buffer
,
&
size
,
HG_BULK_READ_ONLY
,
&
in
.
bulk_handle
);
assert
(
ret
==
0
);
assert
(
h
ret
==
HG_SUCCESS
);
/* Send rpc. Note that we are also transmitting the bulk handle in the
* input struct. It was set above.
*/
in
.
input_val
=
arg
->
val
;
margo_forward
(
arg
->
mid
,
handle
,
&
in
);
hret
=
margo_forward
(
arg
->
mid
,
handle
,
&
in
);
assert
(
hret
==
HG_SUCCESS
);
/* decode response */
ret
=
HG_G
et_output
(
handle
,
&
out
);
assert
(
ret
==
0
);
h
ret
=
margo_g
et_output
(
handle
,
&
out
);
assert
(
h
ret
==
HG_SUCCESS
);
printf
(
"Got response ret: %d
\n
"
,
out
.
ret
);
/* clean up resources consumed by this rpc */
HG_B
ulk_free
(
in
.
bulk_handle
);
HG_F
ree_output
(
handle
,
&
out
);
HG_D
estroy
(
handle
);
margo_b
ulk_free
(
in
.
bulk_handle
);
margo_f
ree_output
(
handle
,
&
out
);
margo_d
estroy
(
handle
);
free
(
buffer
);
printf
(
"ULT [%d] done.
\n
"
,
arg
->
val
);
return
;
}
tests/margo-test-server.c
View file @
6a345e9e
...
...
@@ -7,13 +7,13 @@
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <mercury.h>
#include <abt.h>
#include <abt-snoozer.h>
#include <margo.h>
#include "my-rpc.h"
/* example server program. Starts
HG engine
, registers the example RPC type,
/* example server program. Starts
margo
, registers the example RPC type,
* and then executes indefinitely.
*/
...
...
@@ -28,31 +28,26 @@ static void parse_args(int argc, char **argv, struct options *opts);
int
main
(
int
argc
,
char
**
argv
)
{
in
t
ret
;
hg_return_
t
h
ret
;
margo_instance_id
mid
;
ABT_xstream
handler_xstream
;
ABT_pool
handler_pool
;
ABT_xstream
progress_xstream
;
ABT_pool
progress_pool
;
hg_context_t
*
hg_context
;
hg_class_t
*
hg_class
;
struct
options
opts
;
parse_args
(
argc
,
argv
,
&
opts
);
/* boilerplate HG initialization steps */
/* actually start margo -- this step encapsulates the Mercury and
* Argobots initialization and must precede their use */
/* If single pool mode, use the calling xstream to drive progress and
* execute handlers. If not, use a dedicated progress xstream and
* run handlers directly on the calling xstream
*/
/***************************************/
hg_class
=
HG_Init
(
opts
.
listen_addr
,
HG_TRUE
);
if
(
!
hg_class
)
{
fprintf
(
stderr
,
"Error: HG_Init()
\n
"
);
return
(
-
1
);
}
hg_context
=
HG_Context_create
(
hg_class
);
if
(
!
hg_context
)
if
(
opts
.
single_pool_mode
)
mid
=
margo_init
(
opts
.
listen_addr
,
MARGO_SERVER_MODE
,
0
,
-
1
);
else
mid
=
margo_init
(
opts
.
listen_addr
,
MARGO_SERVER_MODE
,
1
,
0
);
if
(
mid
==
MARGO_INSTANCE_NULL
)
{
fprintf
(
stderr
,
"Error: HG_Context_create()
\n
"
);
HG_Finalize
(
hg_class
);
fprintf
(
stderr
,
"Error: margo_init()
\n
"
);
return
(
-
1
);
}
...
...
@@ -64,32 +59,28 @@ int main(int argc, char **argv)
hg_size_t
addr_self_string_sz
=
128
;
/* figure out what address this server is listening on */
ret
=
HG_A
ddr_self
(
hg_class
,
&
addr_self
);
if
(
ret
!=
HG_SUCCESS
)
h
ret
=
margo_a
ddr_self
(
mid
,
&
addr_self
);
if
(
h
ret
!=
HG_SUCCESS
)
{
fprintf
(
stderr
,
"Error: HG_Addr_self()
\n
"
);
HG_Context_destroy
(
hg_context
);
HG_Finalize
(
hg_class
);
fprintf
(
stderr
,
"Error: margo_addr_self()
\n
"
);
margo_finalize
(
mid
);
return
(
-
1
);
}
ret
=
HG_A
ddr_to_string
(
hg_class
,
addr_self_string
,
&
addr_self_string_sz
,
addr_self
);
if
(
ret
!=
HG_SUCCESS
)
h
ret
=
margo_a
ddr_to_string
(
mid
,
addr_self_string
,
&
addr_self_string_sz
,
addr_self
);
if
(
h
ret
!=
HG_SUCCESS
)
{
fprintf
(
stderr
,
"Error: HG_Addr_self()
\n
"
);
HG_Context_destroy
(
hg_context
);
HG_Finalize
(
hg_class
);
HG_Addr_free
(
hg_class
,
addr_self
);
fprintf
(
stderr
,
"Error: margo_addr_self()
\n
"
);
margo_addr_free
(
mid
,
addr_self
);
margo_finalize
(
mid
);
return
(
-
1
);
}
HG_A
ddr_free
(
hg_class
,
addr_self
);
margo_a
ddr_free
(
mid
,
addr_self
);
fp
=
fopen
(
opts
.
hostfile
,
"w"
);
if
(
!
fp
)
{
perror
(
"fopen"
);
HG_Context_destroy
(
hg_context
);
HG_Finalize
(
hg_class
);
HG_Addr_free
(
hg_class
,
addr_self
);
margo_finalize
(
mid
);
return
(
-
1
);
}
...
...
@@ -97,67 +88,13 @@ int main(int argc, char **argv)
fclose
(
fp
);
}
/* set up argobots */
/***************************************/
ret
=
ABT_init
(
argc
,
argv
);
if
(
ret
!=
0
)
{
fprintf
(
stderr
,
"Error: ABT_init()
\n
"
);
return
(
-
1
);
}
/* set primary ES to idle without polling */
ret
=
ABT_snoozer_xstream_self_set
();
if
(
ret
!=
0
)
{
fprintf
(
stderr
,
"Error: ABT_snoozer_xstream_self_set()
\n
"
);
return
(
-
1
);
}
/* Find primary pool to use for running rpc handlers */
ret
=
ABT_xstream_self
(
&
handler_xstream
);
if
(
ret
!=
0
)
{
fprintf
(
stderr
,
"Error: ABT_xstream_self()
\n
"
);
return
(
-
1
);
}
ret
=
ABT_xstream_get_main_pools
(
handler_xstream
,
1
,
&
handler_pool
);
if
(
ret
!=
0
)
{
fprintf
(
stderr
,
"Error: ABT_xstream_get_main_pools()
\n
"
);
return
(
-
1
);
}
if
(
!
opts
.
single_pool_mode
)
{
/* create a dedicated ES drive Mercury progress */
ret
=
ABT_snoozer_xstream_create
(
1
,
&
progress_pool
,
&
progress_xstream
);
if
(
ret
!=
0
)
{
fprintf
(
stderr
,
"Error: ABT_snoozer_xstream_create()
\n
"
);
return
(
-
1
);
}
}
/* actually start margo */
/* provide argobots pools for driving communication progress and
* executing rpc handlers as well as class and context for Mercury
* communication.
*/
/***************************************/
if
(
opts
.
single_pool_mode
)
mid
=
margo_init_pool
(
handler_pool
,
handler_pool
,
hg_context
);
else
mid
=
margo_init_pool
(
progress_pool
,
handler_pool
,
hg_context
);
assert
(
mid
);
/* register RPC */
M
ERCURY
_REGISTER
(
hg_class
,
"my_rpc"
,
my_rpc_in_t
,
my_rpc_out_t
,
my_rpc_ult
_handler
);
M
ERCURY
_REGISTER
(
hg_class
,
"my_rpc_hang"
,
my_rpc_hang_in_t
,
my_rpc_hang_out_t
,
my_rpc_hang_ult
_handler
);
M
ERCURY
_REGISTER
(
hg_class
,
"my_shutdown_rpc"
,
void
,
void
,
my_rpc_shutdown_ult
_handler
);
M
ARGO
_REGISTER
(
mid
,
"my_rpc"
,
my_rpc_in_t
,
my_rpc_out_t
,
my_rpc_ult
);
M
ARGO
_REGISTER
(
mid
,
"my_rpc_hang"
,
my_rpc_hang_in_t
,
my_rpc_hang_out_t
,
my_rpc_hang_ult
);
M
ARGO
_REGISTER
(
mid
,
"my_shutdown_rpc"
,
void
,
void
,
my_rpc_shutdown_ult
);
/* NOTE: at this point this server ULT has two options. It can wait on
* whatever mechanism it wants to (however long the daemon should run and
...
...
@@ -175,17 +112,6 @@ int main(int argc, char **argv)
*/
margo_wait_for_finalize
(
mid
);
if
(
!
opts
.
single_pool_mode
)
{
ABT_xstream_join
(
progress_xstream
);
ABT_xstream_free
(
&
progress_xstream
);
}
ABT_finalize
();
HG_Context_destroy
(
hg_context
);
HG_Finalize
(
hg_class
);