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

update to new swim init/finalize defintions

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