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) 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; return OMPI_SUCCESS;
} }

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

@ -120,7 +120,10 @@ int MPI_Comm_spawn(char *command, char **argv, int maxprocs, MPI_Info info,
error: error:
OPAL_CR_EXIT_LIBRARY(); 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 */ /* set error codes */
if (MPI_ERRCODES_IGNORE != array_of_errcodes) { if (MPI_ERRCODES_IGNORE != array_of_errcodes) {

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

@ -162,7 +162,11 @@ int MPI_Comm_spawn_multiple(int count, char **array_of_commands, char ***array_o
error: error:
OPAL_CR_EXIT_LIBRARY(); 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 */ /* set array of errorcodes */
if (MPI_ERRCODES_IGNORE != array_of_errcodes) { if (MPI_ERRCODES_IGNORE != array_of_errcodes) {