diff --git a/ompi/mpi/c/comm_accept.c b/ompi/mpi/c/comm_accept.c index 4bfdc0c354..f371ceae6c 100644 --- a/ompi/mpi/c/comm_accept.c +++ b/ompi/mpi/c/comm_accept.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008 University of Houston, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. @@ -105,6 +105,8 @@ int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, &newcomp); } + OPAL_CR_EXIT_LIBRARY(); + *newcomm = newcomp; OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME ); } diff --git a/ompi/mpi/c/comm_connect.c b/ompi/mpi/c/comm_connect.c index 46e5b785c0..ec9d859e08 100644 --- a/ompi/mpi/c/comm_connect.c +++ b/ompi/mpi/c/comm_connect.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008 University of Houston. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. @@ -107,6 +107,8 @@ int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, &newcomp); } + OPAL_CR_EXIT_LIBRARY(); + *newcomm = newcomp; OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_join.c b/ompi/mpi/c/comm_join.c index 71be62c232..32f8de09de 100644 --- a/ompi/mpi/c/comm_join.c +++ b/ompi/mpi/c/comm_join.c @@ -13,6 +13,7 @@ * All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -129,6 +130,8 @@ int MPI_Comm_join(int fd, MPI_Comm *intercomm) /* use the port to connect/accept */ rc = ompi_dpm_connect_accept (MPI_COMM_SELF, 0, port_name, send_first, &newcomp); + OPAL_CR_EXIT_LIBRARY(); + *intercomm = newcomp; OMPI_ERRHANDLER_RETURN (rc, MPI_COMM_SELF, rc, FUNC_NAME); } diff --git a/ompi/mpi/c/comm_spawn.c b/ompi/mpi/c/comm_spawn.c index 69b6b401c4..083dc30143 100644 --- a/ompi/mpi/c/comm_spawn.c +++ b/ompi/mpi/c/comm_spawn.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2013 Los Alamos National Security, LLC. All rights * reserved. @@ -132,13 +132,13 @@ int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info inf } error: - OPAL_CR_EXIT_LIBRARY(); - /* close the port */ if (rank == root && !non_mpi) { ompi_dpm_close_port(port_name); } + OPAL_CR_EXIT_LIBRARY(); + /* set error codes */ if (MPI_ERRCODES_IGNORE != array_of_errcodes) { for ( i=0; i < maxprocs; i++ ) { diff --git a/ompi/mpi/c/comm_spawn_multiple.c b/ompi/mpi/c/comm_spawn_multiple.c index 4611a6ecf1..33d172402e 100644 --- a/ompi/mpi/c/comm_spawn_multiple.c +++ b/ompi/mpi/c/comm_spawn_multiple.c @@ -10,7 +10,7 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights * reserved. @@ -173,13 +173,13 @@ int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_o } error: - OPAL_CR_EXIT_LIBRARY(); - /* close the port */ if (rank == root && !non_mpi) { ompi_dpm_close_port(port_name); } + OPAL_CR_EXIT_LIBRARY(); + /* set array of errorcodes */ if (MPI_ERRCODES_IGNORE != array_of_errcodes) { if (NULL != newcomp) { diff --git a/ompi/mpi/c/lookup_name.c b/ompi/mpi/c/lookup_name.c index 54face33b0..dff9c4d3dc 100644 --- a/ompi/mpi/c/lookup_name.c +++ b/ompi/mpi/c/lookup_name.c @@ -15,6 +15,7 @@ * Copyright (c) 2015 Intel, Inc. All rights reserved. * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -92,6 +93,7 @@ int MPI_Lookup_name(const char *service_name, MPI_Info info, char *port_name) } else { /* unrecognized scope */ OPAL_LIST_DESTRUCT(&pinfo); + OPAL_CR_EXIT_LIBRARY(); return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } @@ -109,6 +111,7 @@ int MPI_Lookup_name(const char *service_name, MPI_Info info, char *port_name) if (OPAL_SUCCESS != ret || OPAL_STRING != pdat->value.type || NULL == pdat->value.data.string) { + OPAL_CR_EXIT_LIBRARY(); return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NAME, FUNC_NAME); } diff --git a/ompi/mpi/c/publish_name.c b/ompi/mpi/c/publish_name.c index 9bd951c35d..7ec9e6ff06 100644 --- a/ompi/mpi/c/publish_name.c +++ b/ompi/mpi/c/publish_name.c @@ -16,6 +16,7 @@ * * Copyright (c) 2015 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2015 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -93,6 +94,7 @@ int MPI_Publish_name(const char *service_name, MPI_Info info, } else { /* unrecognized scope */ OPAL_LIST_DESTRUCT(&values); + OPAL_CR_EXIT_LIBRARY(); return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); } @@ -126,6 +128,7 @@ int MPI_Publish_name(const char *service_name, MPI_Info info, } else { /* unrecognized persistence */ OPAL_LIST_DESTRUCT(&values); + OPAL_CR_EXIT_LIBRARY(); return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG, FUNC_NAME); }