1
1

* remove unused variable in ompi_comm_get_rprocs

* don't load data into a buffer until we have the data, as
    the data contains some header information needed to
    properly load the data

This commit was SVN r12792.
Этот коммит содержится в:
Brian Barrett 2006-12-07 16:19:44 +00:00
родитель 78173a697a
Коммит b07dfa7841

Просмотреть файл

@ -838,7 +838,6 @@ ompi_proc_t **ompi_comm_get_rprocs ( ompi_communicator_t *local_comm,
int rc;
int local_rank, local_size;
ompi_proc_t **rprocs=NULL;
char *rnamebuf=NULL;
orte_std_cntr_t size_len;
int int_len, rlen;
orte_buffer_t *sbuf=NULL, *rbuf=NULL;
@ -897,16 +896,6 @@ ompi_proc_t **ompi_comm_get_rprocs ( ompi_communicator_t *local_comm,
goto err_exit;
}
rbuf = OBJ_NEW(orte_buffer_t);
if (NULL == rbuf) {
rc = ORTE_ERROR;
goto err_exit;
}
if (ORTE_SUCCESS != (rc = orte_dss.load(rbuf, recvbuf, rlen))) {
goto err_exit;
}
if ( local_rank == local_leader ) {
/* local leader exchange name lists */
rc = MCA_PML_CALL(irecv (recvbuf, rlen, MPI_BYTE, remote_leader, tag,
@ -934,14 +923,21 @@ ompi_proc_t **ompi_comm_get_rprocs ( ompi_communicator_t *local_comm,
goto err_exit;
}
rbuf = OBJ_NEW(orte_buffer_t);
if (NULL == rbuf) {
rc = ORTE_ERROR;
goto err_exit;
}
if (ORTE_SUCCESS != (rc = orte_dss.load(rbuf, recvbuf, rlen))) {
goto err_exit;
}
/* decode the names into a proc-list */
rc = ompi_proc_get_proclist (rbuf, rsize, &rprocs );
OBJ_RELEASE(rbuf);
err_exit:
if ( NULL != rnamebuf) {
free ( rnamebuf );
}
/* rprocs isn't freed unless we have an error,
since it is used in the communicator */
if ( OMPI_SUCCESS !=rc ) {