root/ompi/mpi/fortran/mpif-h/attr_get_f.c

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

DEFINITIONS

This source file includes following definitions.
  1. ompi_attr_get_f

   1 /*
   2  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2005 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * Copyright (c) 2011-2012 Cisco Systems, Inc.  All rights reserved.
  13  * Copyright (c) 2015-2017 Research Organization for Information Science
  14  *                         and Technology (RIST). All rights reserved.
  15  * $COPYRIGHT$
  16  *
  17  * Additional copyrights may follow
  18  *
  19  * $HEADER$
  20  */
  21 
  22 #include "ompi_config.h"
  23 
  24 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  25 #include "ompi/attribute/attribute.h"
  26 #include "ompi/communicator/communicator.h"
  27 
  28 #if OMPI_BUILD_MPI_PROFILING
  29 #if OPAL_HAVE_WEAK_SYMBOLS
  30 #pragma weak PMPI_ATTR_GET = ompi_attr_get_f
  31 #pragma weak pmpi_attr_get = ompi_attr_get_f
  32 #pragma weak pmpi_attr_get_ = ompi_attr_get_f
  33 #pragma weak pmpi_attr_get__ = ompi_attr_get_f
  34 
  35 #pragma weak PMPI_Attr_get_f = ompi_attr_get_f
  36 #pragma weak PMPI_Attr_get_f08 = ompi_attr_get_f
  37 #else
  38 OMPI_GENERATE_F77_BINDINGS (PMPI_ATTR_GET,
  39                            pmpi_attr_get,
  40                            pmpi_attr_get_,
  41                            pmpi_attr_get__,
  42                            pompi_attr_get_f,
  43                            (MPI_Fint *comm, MPI_Fint *keyval, MPI_Fint *attribute_val, ompi_fortran_logical_t *flag, MPI_Fint *ierr),
  44                            (comm, keyval, attribute_val, flag, ierr) )
  45 #endif
  46 #endif
  47 
  48 #if OPAL_HAVE_WEAK_SYMBOLS
  49 #pragma weak MPI_ATTR_GET = ompi_attr_get_f
  50 #pragma weak mpi_attr_get = ompi_attr_get_f
  51 #pragma weak mpi_attr_get_ = ompi_attr_get_f
  52 #pragma weak mpi_attr_get__ = ompi_attr_get_f
  53 
  54 #pragma weak MPI_Attr_get_f = ompi_attr_get_f
  55 #pragma weak MPI_Attr_get_f08 = ompi_attr_get_f
  56 #else
  57 #if ! OMPI_BUILD_MPI_PROFILING
  58 OMPI_GENERATE_F77_BINDINGS (MPI_ATTR_GET,
  59                            mpi_attr_get,
  60                            mpi_attr_get_,
  61                            mpi_attr_get__,
  62                            ompi_attr_get_f,
  63                            (MPI_Fint *comm, MPI_Fint *keyval, MPI_Fint *attribute_val, ompi_fortran_logical_t *flag, MPI_Fint *ierr),
  64                            (comm, keyval, attribute_val, flag, ierr) )
  65 #else
  66 #define ompi_attr_get_f pompi_attr_get_f
  67 #endif
  68 #endif
  69 
  70 void ompi_attr_get_f(MPI_Fint *comm, MPI_Fint *keyval,
  71                     MPI_Fint *attribute_val, ompi_fortran_logical_t *flag, MPI_Fint *ierr)
  72 {
  73     int c_ierr;
  74     MPI_Comm c_comm = PMPI_Comm_f2c(*comm);
  75     OMPI_LOGICAL_NAME_DECL(flag);
  76 
  77     /* This stuff is very confusing.  Be sure to see the comment at
  78        the top of src/attributes/attributes.c. */
  79 
  80     c_ierr = ompi_attr_get_fint(c_comm->c_keyhash,
  81                                 OMPI_FINT_2_INT(*keyval),
  82                                 attribute_val,
  83                                 OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag));
  84     if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
  85 
  86     OMPI_SINGLE_INT_2_LOGICAL(flag);
  87 }

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