Skip to content

Commit

Permalink
fix issue #40
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaypanyala committed Jul 17, 2024
1 parent 5ddca2e commit bd25563
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion comex/src-dmapp/comex.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,8 @@ int comex_barrier(comex_group_t group)
MPI_Comm comm;

comex_fence_all(group);
assert(COMEX_SUCCESS == comex_group_comm(group, &comm));
const int ierr = comex_group_comm(group, &comm);
assert(COMEX_SUCCESS == ierr);
MPI_Barrier(comm);

return COMEX_SUCCESS;
Expand Down
3 changes: 2 additions & 1 deletion comex/src-mpi-mt/groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ extern comex_igroup_t* comex_get_igroup_from_group(comex_group_t group);
/* verify that proc is part of group */
#define CHECK_GROUP(GROUP,PROC) do { \
int size; \
int ierr = comex_group_size(GROUP,&size); \
COMEX_ASSERT(GROUP >= 0); \
COMEX_ASSERT(COMEX_SUCCESS == comex_group_size(GROUP,&size)); \
COMEX_ASSERT(COMEX_SUCCESS == ierr); \
COMEX_ASSERT(PROC >= 0); \
COMEX_ASSERT(PROC < size); \
} while(0)
Expand Down
3 changes: 2 additions & 1 deletion comex/src-mpi-pr/groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ extern comex_igroup_t* comex_get_igroup_from_group(comex_group_t group);
/* verify that proc is part of group */
#define CHECK_GROUP(GROUP,PROC) do { \
int size; \
int ierr = comex_group_size(GROUP,&size); \
COMEX_ASSERT(GROUP >= 0); \
COMEX_ASSERT(COMEX_SUCCESS == comex_group_size(GROUP,&size)); \
COMEX_ASSERT(COMEX_SUCCESS == ierr); \
COMEX_ASSERT(PROC >= 0); \
COMEX_ASSERT(PROC < size); \
} while(0)
Expand Down
3 changes: 2 additions & 1 deletion comex/src-mpi-pt/groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ extern comex_igroup_t* comex_get_igroup_from_group(comex_group_t group);
/* verify that proc is part of group */
#define CHECK_GROUP(GROUP,PROC) do { \
int size; \
int ierr = comex_group_size(GROUP,&size); \
COMEX_ASSERT(GROUP >= 0); \
COMEX_ASSERT(COMEX_SUCCESS == comex_group_size(GROUP,&size)); \
COMEX_ASSERT(COMEX_SUCCESS == ierr); \
COMEX_ASSERT(PROC >= 0); \
COMEX_ASSERT(PROC < size); \
} while(0)
Expand Down
3 changes: 2 additions & 1 deletion comex/src-mpi/groups.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ extern comex_igroup_t* comex_get_igroup_from_group(comex_group_t group);
* change group to world group */
#define CHECK_GROUP(GROUP,PROC) do { \
int size; \
assert(COMEX_SUCCESS == comex_group_size(GROUP,&size)); \
int ierr = comex_group_size(GROUP,&size); \
assert(COMEX_SUCCESS == ierr); \
assert(PROC >= 0); \
assert(PROC < size); \
if (COMEX_GROUP_WORLD != GROUP) { \
Expand Down

0 comments on commit bd25563

Please sign in to comment.