1
1

Ensure we call close_port after comm_spawn[_multiple]. Cleanout the port name in close_port

This commit was SVN r19068.
Этот коммит содержится в:
Ralph Castain 2008-07-28 16:40:11 +00:00
родитель 1a77b15523
Коммит a0ae63f19e
3 изменённых файлов: 13 добавлений и 4 удалений

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

@ -918,6 +918,8 @@ cleanup:
static int close_port(char *port_name)
{
/* the port name is a pointer to an array - DO NOT FREE IT! */
memset(port_name, 0, MPI_MAX_PORT_NAME);
return OMPI_SUCCESS;
}

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

@ -120,8 +120,11 @@ int MPI_Comm_spawn(char *command, char **argv, int maxprocs, MPI_Info info,
error:
OPAL_CR_EXIT_LIBRARY();
/* close the port again. Nothing has to be done for that at the moment.*/
/* close the port */
if (rank == root && !non_mpi) {
ompi_dpm.close_port(port_name);
}
/* set error codes */
if (MPI_ERRCODES_IGNORE != array_of_errcodes) {
for ( i=0; i < maxprocs; i++ ) {

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

@ -162,8 +162,12 @@ int MPI_Comm_spawn_multiple(int count, char **array_of_commands, char ***array_o
error:
OPAL_CR_EXIT_LIBRARY();
/* close the port again. Nothing has to be done for that at the moment.*/
/* close the port */
if (rank == root && !non_mpi) {
ompi_dpm.close_port(port_name);
}
/* set array of errorcodes */
if (MPI_ERRCODES_IGNORE != array_of_errcodes) {
for ( i=0; i < newcomp->c_remote_group->grp_proc_count; i++ ) {