root/ompi/mpi/c/win_set_name.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. MPI_Win_set_name

   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) 2006      Cisco Systems, Inc.  All rights reserved.
  14  * Copyright (c) 2013      Los Alamos National Security, LLC.  All rights
  15  *                         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/win/win.h"
  32 
  33 #if OMPI_BUILD_MPI_PROFILING
  34 #if OPAL_HAVE_WEAK_SYMBOLS
  35 #pragma weak MPI_Win_set_name = PMPI_Win_set_name
  36 #endif
  37 #define MPI_Win_set_name PMPI_Win_set_name
  38 #endif
  39 
  40 static const char FUNC_NAME[] = "MPI_Win_set_name";
  41 
  42 
  43 int MPI_Win_set_name(MPI_Win win, const char *win_name)
  44 {
  45     int ret;
  46 
  47     if (MPI_PARAM_CHECK) {
  48         OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
  49 
  50         if (ompi_win_invalid(win)) {
  51             return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, FUNC_NAME);
  52         } else if (NULL == win_name) {
  53             return OMPI_ERRHANDLER_INVOKE(win, MPI_ERR_ARG, FUNC_NAME);
  54         }
  55     }
  56 
  57     OPAL_CR_ENTER_LIBRARY();
  58 
  59     ret = ompi_win_set_name(win, win_name);
  60     OMPI_ERRHANDLER_RETURN(ret, win, ret, FUNC_NAME);
  61 }

/* [<][>][^][v][top][bottom][index][help] */