Commit 31241a01 authored by Shane Snyder's avatar Shane Snyder
Browse files

rework ssg-test-margo shutdown ordering

parent d7bb5784
......@@ -61,6 +61,7 @@ static void shutdown_rpc_ult(void *arg)
fflush(stdout);
HG_Destroy(h);
ssg_finalize(c->s);
margo_finalize(mid);
}
DEFINE_MARGO_RPC_HANDLER(shutdown_rpc_ult)
......
......@@ -77,8 +77,8 @@ static void ping_dispatch_ult(void *arg)
int main(int argc, char *argv[])
{
// mercury
hg_class_t *hgcl;
hg_context_t *hgctx;
hg_class_t *hgcl = NULL;
hg_context_t *hgctx = NULL;
hg_id_t ping_id, shutdown_id;
// margo
......@@ -239,6 +239,7 @@ int main(int argc, char *argv[])
DIE_IF(hret != HG_SUCCESS, "margo_forward (shutdown)");
HG_Destroy(shutdown_handle);
}
ssg_finalize(c.s);
margo_finalize(mid);
}
else {
......@@ -249,9 +250,8 @@ int main(int argc, char *argv[])
cleanup:
DEBUG("%d: cleaning up\n", rank);
// cleanup
ssg_finalize(c.s);
HG_Context_destroy(hgctx);
HG_Finalize(hgcl);
if(hgctx) HG_Context_destroy(hgctx);
if(hgcl) HG_Finalize(hgcl);
free(ults);
free(args);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment