abstracting the group_free operation into an internal routine (required
by some other components on ompi). This commit was SVN r7763.
Этот коммит содержится в:
родитель
84c070fc0f
Коммит
2c909383bb
@ -19,6 +19,18 @@
|
||||
#include "ompi/include/constants.h"
|
||||
#include "mpi.h"
|
||||
|
||||
int ompi_group_free ( ompi_group_t **group )
|
||||
{
|
||||
ompi_group_t *l_group;
|
||||
|
||||
l_group = (ompi_group_t *) *group;
|
||||
ompi_group_decrement_proc_count (l_group);
|
||||
OBJ_RELEASE(l_group);
|
||||
|
||||
*group = MPI_GROUP_NULL;
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
int ompi_group_translate_ranks ( ompi_group_t *group1,
|
||||
int n_ranks, int *ranks1,
|
||||
ompi_group_t *group2,
|
||||
|
@ -152,6 +152,12 @@ int ompi_group_translate_ranks ( ompi_group_t *group1,
|
||||
ompi_group_t *group2,
|
||||
int *ranks2);
|
||||
|
||||
|
||||
/**
|
||||
* Abstracting MPI_Group_free, since it is required by some internal functions...
|
||||
*/
|
||||
int ompi_group_free (ompi_group_t **group);
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
@ -32,7 +32,7 @@ static const char FUNC_NAME[] = "MPI_Group_free";
|
||||
|
||||
int MPI_Group_free(MPI_Group *group)
|
||||
{
|
||||
ompi_group_t *l_group;
|
||||
int ret;
|
||||
|
||||
/* check to make sure we don't free GROUP_EMPTY or GROUP_NULL */
|
||||
if (MPI_PARAM_CHECK) {
|
||||
@ -45,10 +45,8 @@ int MPI_Group_free(MPI_Group *group)
|
||||
|
||||
}
|
||||
|
||||
l_group = (ompi_group_t *) *group;
|
||||
ompi_group_decrement_proc_count (l_group);
|
||||
OBJ_RELEASE(l_group);
|
||||
ret = ompi_group_free ( group);
|
||||
OMPI_ERRHANDLER_CHECK(ret, MPI_COMM_WORLD, ret, FUNC_NAME);
|
||||
|
||||
*group = MPI_GROUP_NULL;
|
||||
return MPI_SUCCESS;
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user