Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 6 additions & 20 deletions ompi/communicator/comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ int ompi_comm_set_nb ( ompi_communicator_t **ncomm,

/* ompi_comm_allocate */
newcomm = OBJ_NEW(ompi_communicator_t);
if (NULL == newcomm) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
newcomm->super.s_info = NULL;
/* fill in the inscribing hyper-cube dimensions */
newcomm->c_cube_dim = opal_cube_dim(local_size);
Expand Down Expand Up @@ -354,11 +357,6 @@ int ompi_comm_create ( ompi_communicator_t *comm, ompi_group_t *group,
goto exit;
}

if ( NULL == newcomm ) {
rc = MPI_ERR_INTERN;
goto exit;
}

/* Determine context id. It is identical to f_2_c_handle */
rc = ompi_comm_nextcid (newcomp, comm, NULL, NULL, NULL, false, mode);
if ( OMPI_SUCCESS != rc ) {
Expand Down Expand Up @@ -580,10 +578,6 @@ int ompi_comm_split( ompi_communicator_t* comm, int color, int key,
local_group, /* local group */
remote_group); /* remote group */

if ( NULL == newcomp ) {
rc = MPI_ERR_INTERN;
goto exit;
}
if ( OMPI_SUCCESS != rc ) {
goto exit;
}
Expand Down Expand Up @@ -1004,11 +998,7 @@ int ompi_comm_dup_with_info ( ompi_communicator_t * comm, opal_info_t *info, omp
true, /* copy the topo */
comm->c_local_group, /* local group */
remote_group ); /* remote group */
if ( NULL == newcomp ) {
rc = MPI_ERR_INTERN;
return rc;
}
if ( MPI_SUCCESS != rc) {
if ( OMPI_SUCCESS != rc) {
return rc;
}

Expand Down Expand Up @@ -1103,7 +1093,7 @@ static int ompi_comm_idup_internal (ompi_communicator_t *comm, ompi_group_t *gro
group, /* local group */
remote_group, /* remote group */
subreq); /* new subrequest */
if (NULL == context->newcomp) {
if (OMPI_SUCCESS != rc) {
ompi_comm_request_return (request);
return rc;
}
Expand Down Expand Up @@ -1210,11 +1200,7 @@ int ompi_comm_create_group (ompi_communicator_t *comm, ompi_group_t *group, int
true, /* copy the topo */
group, /* local group */
NULL); /* remote group */
if ( NULL == newcomp ) {
rc = MPI_ERR_INTERN;
return rc;
}
if ( MPI_SUCCESS != rc) {
if ( OMPI_SUCCESS != rc) {
return rc;
}

Expand Down
3 changes: 1 addition & 2 deletions ompi/dpm/dpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,7 @@ int ompi_dpm_connect_accept(ompi_communicator_t *comm, int root,
group, /* local group */
new_group_pointer /* remote group */
);
if ( NULL == newcomp ) {
rc = OMPI_ERR_OUT_OF_RESOURCE;
if (OMPI_SUCCESS != rc) {
goto exit;
}

Expand Down
4 changes: 0 additions & 4 deletions ompi/mpi/c/intercomm_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader,
new_group_pointer /* remote group */
);

if ( NULL == newcomp ) {
rc = MPI_ERR_INTERN;
goto err_exit;
}
if ( MPI_SUCCESS != rc ) {
goto err_exit;
}
Expand Down
4 changes: 0 additions & 4 deletions ompi/mpi/c/intercomm_merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,6 @@ int MPI_Intercomm_merge(MPI_Comm intercomm, int high,
new_group_pointer, /* local group */
NULL /* remote group */
);
if ( NULL == newcomp ) {
rc = MPI_ERR_INTERN;
goto exit;
}
if ( MPI_SUCCESS != rc ) {
goto exit;
}
Expand Down