1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
2 /*
3 * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
4 * University Research and Technology
5 * Corporation. All rights reserved.
6 * Copyright (c) 2004-2005 The University of Tennessee and The University
7 * of Tennessee Research Foundation. All rights
8 * reserved.
9 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10 * University of Stuttgart. All rights reserved.
11 * Copyright (c) 2004-2005 The Regents of the University of California.
12 * All rights reserved.
13 * Copyright (c) 2013 Los Alamos National Security, LLC. All rights
14 * reserved.
15 * Copyright (c) 2015 Intel, Inc. All rights reserved.
16 * Copyright (c) 2015 Research Organization for Information Science
17 * and Technology (RIST). All rights reserved.
18 * $COPYRIGHT$
19 *
20 * Additional copyrights may follow
21 *
22 * $HEADER$
23 */
24 #include "ompi_config.h"
25 #include <stdio.h>
26
27 #include "ompi/mpi/c/bindings.h"
28 #include "ompi/runtime/params.h"
29 #include "ompi/communicator/communicator.h"
30 #include "ompi/errhandler/errhandler.h"
31 #include "ompi/dpm/dpm.h"
32
33
34 #if OMPI_BUILD_MPI_PROFILING
35 #if OPAL_HAVE_WEAK_SYMBOLS
36 #pragma weak MPI_Close_port = PMPI_Close_port
37 #endif
38 #define MPI_Close_port PMPI_Close_port
39 #endif
40
41 static const char FUNC_NAME[] = "MPI_Close_port";
42
43
44 int MPI_Close_port(const char *port_name)
45 {
46 int ret;
47
48 OPAL_CR_NOOP_PROGRESS();
49
50 if ( MPI_PARAM_CHECK ) {
51 OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
52
53 if ( NULL == port_name )
54 return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
55 FUNC_NAME);
56 }
57
58 ret = ompi_dpm_close_port(port_name);
59
60 OMPI_ERRHANDLER_RETURN(ret, MPI_COMM_WORLD, ret, FUNC_NAME);
61 }