Skip to content

Commit

Permalink
[Bug Fix] Changed shmem_team_destroy to return void (#1168)
Browse files Browse the repository at this point in the history
* [Bug Fix] Changed shmem_team_destroy to return void

* Removed unnecessary return
  • Loading branch information
avincigu authored Feb 13, 2025
1 parent 4dc8384 commit 290f955
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mpp/shmem_c_func.h4
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ SHMEM_FUNCTION_ATTRIBUTES int SHPRE()shmem_team_split_strided(shmem_team_t paren

SHMEM_FUNCTION_ATTRIBUTES int SHPRE()shmem_team_split_2d(shmem_team_t parent_team, int xrange, const shmem_team_config_t *xaxis_config, long xaxis_mask, shmem_team_t *xaxis_team, const shmem_team_config_t *yaxis_config, long yaxis_mask, shmem_team_t *yaxis_team);

SHMEM_FUNCTION_ATTRIBUTES int SHPRE()shmem_team_destroy(shmem_team_t team);
SHMEM_FUNCTION_ATTRIBUTES void SHPRE()shmem_team_destroy(shmem_team_t team);

SHMEM_FUNCTION_ATTRIBUTES int SHPRE()shmem_team_create_ctx(shmem_team_t team, long options, shmem_ctx_t *ctx);

Expand Down
6 changes: 3 additions & 3 deletions src/shmem_team.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,11 @@ int shmem_internal_team_split_2d(shmem_internal_team_t *parent_team, int xrange,
return 0;
}

int shmem_internal_team_destroy(shmem_internal_team_t *team)
void shmem_internal_team_destroy(shmem_internal_team_t *team)
{

if (team == SHMEM_TEAM_INVALID) {
return -1;
return;
} else if (shmem_internal_bit_fetch(psync_pool_avail, N_PSYNC_BYTES, team->psync_idx)) {
RAISE_ERROR_STR("Destroying a team without an active pSync");
} else {
Expand All @@ -532,7 +532,7 @@ int shmem_internal_team_destroy(shmem_internal_team_t *team)
free(team);
}

return 0;
return;
}

/* Returns a psync from the given team that can be safely used for the
Expand Down
2 changes: 1 addition & 1 deletion src/shmem_team.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int shmem_internal_team_split_2d(shmem_internal_team_t *parent_team, int xrange,
const shmem_team_config_t *xaxis_config, long xaxis_mask, shmem_internal_team_t **xaxis_team,
const shmem_team_config_t *yaxis_config, long yaxis_mask, shmem_internal_team_t **yaxis_team);

int shmem_internal_team_destroy(shmem_internal_team_t *team);
void shmem_internal_team_destroy(shmem_internal_team_t *team);

int shmem_internal_team_create_ctx(shmem_internal_team_t *team, long options, shmem_ctx_t *ctx);

Expand Down
4 changes: 2 additions & 2 deletions src/teams_c.c4
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ shmem_team_split_2d(shmem_team_t parent_team, int xrange,
(shmem_internal_team_t **)yaxis_team);
}

int SHMEM_FUNCTION_ATTRIBUTES
void SHMEM_FUNCTION_ATTRIBUTES
shmem_team_destroy(shmem_team_t team)
{
SHMEM_ERR_CHECK_INITIALIZED();
Expand All @@ -144,7 +144,7 @@ shmem_team_destroy(shmem_team_t team)
(shmem_internal_team_t *)team == &shmem_internal_team_shared)
RAISE_ERROR_STR("Cannot destroy a pre-defined team");

return shmem_internal_team_destroy((shmem_internal_team_t *)team);
shmem_internal_team_destroy((shmem_internal_team_t *)team);
}

int SHMEM_FUNCTION_ATTRIBUTES
Expand Down

0 comments on commit 290f955

Please sign in to comment.