Commit 7d305ef7 authored by Shane Snyder's avatar Shane Snyder

add ssg group access routines to simple test case

parent d989fbb5
......@@ -461,7 +461,6 @@ fini:
int ssg_group_detach(
ssg_group_id_t group_id)
{
return SSG_SUCCESS;
}
......@@ -512,7 +511,7 @@ hg_addr_t ssg_get_addr(
if (!g)
return HG_ADDR_NULL;
return g->group_view.member_states[g->self_id].addr;
return g->group_view.member_states[member_id].addr;
}
/************************************
......
......@@ -107,6 +107,8 @@ int main(int argc, char *argv[])
const char *conf_file;
const char *group_name = "simple_group";
ssg_group_id_t g_id;
ssg_member_id_t my_id;
int group_size;
int sret;
parse_args(argc, argv, &sleep_time, &addr_str, &mode, &conf_file);
......@@ -140,8 +142,17 @@ int main(int argc, char *argv[])
#endif
DIE_IF(sret != SSG_SUCCESS, "ssg_group_create");
/* sleep to give all group members a chance to create the group */
if (sleep_time > 0) margo_thread_sleep(mid, sleep_time * 1000.0);
/* get my group id and the size of the group */
my_id = ssg_get_group_self_id(g_id);
DIE_IF(my_id == SSG_MEMBER_ID_INVALID, "ssg_get_group_self_id");
group_size = ssg_get_group_size(g_id);
DIE_IF(group_size == 0, "ssg_get_group_size");
printf("group member %d of %d successfully created group\n",
(int)my_id, group_size);
/** cleanup **/
ssg_group_destroy(g_id);
......@@ -149,19 +160,15 @@ int main(int argc, char *argv[])
margo_finalize(mid);
#ifndef SWIM_FORCE_FAIL
if(hgctx) HG_Context_destroy(hgctx);
if(hgcl) HG_Finalize(hgcl);
#endif
#if HAVE_MPI
if (strcmp(mode, "mpi") == 0)
MPI_Finalize();
#endif
#ifndef SWIM_FORCE_FAIL
ABT_finalize();
#endif
return 0;
}
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