Commit 0dfa5b30 authored by Shane Snyder's avatar Shane Snyder

update to new swim init/finalize defintions

parent 4f2aa8ac
......@@ -12,6 +12,9 @@
#include <abt.h>
#include <margo.h>
#endif
#ifdef HAVE_SWIM_FD
#include <swim.h>
#endif
struct ssg
{
......@@ -31,4 +34,7 @@ struct ssg
ABT_cond barrier_cond;
ABT_eventual barrier_eventual;
#endif
#if HAVE_SWIM_FD
swim_context_t *swim_ctx;
#endif
};
......@@ -27,10 +27,6 @@
#include <ssg-margo.h>
#endif
#ifdef HAVE_SWIM_FD
#include <swim.h>
#endif
#define DO_DEBUG 0
#define DEBUG(...) \
do { \
......@@ -571,7 +567,7 @@ hg_return_t ssg_lookup_margo(ssg_t s)
// if(s->rank == 0)
// swim_init(s->mid, s, 1);
// else
swim_init(s->mid, s, 0);
s->swim_ctx = swim_init(s->mid, s, 0);
#endif
fin:
......@@ -710,6 +706,11 @@ void ssg_finalize(ssg_t s)
{
if (s == SSG_NULL) return;
#ifdef HAVE_SWIM_FD
if(s->swim_ctx)
swim_finalize(s->swim_ctx);
#endif
#ifdef HAVE_MARGO
if (s->barrier_mutex != ABT_MUTEX_NULL)
ABT_mutex_free(&s->barrier_mutex);
......
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