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

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

DEFINITIONS

This source file includes following definitions.
  1. ompi_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      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/mpi/fortran/base/constants.h"
  26 
  27 
  28 #if OMPI_BUILD_MPI_PROFILING
  29 #if OPAL_HAVE_WEAK_SYMBOLS
  30 #pragma weak PMPI_GET = ompi_get_f
  31 #pragma weak pmpi_get = ompi_get_f
  32 #pragma weak pmpi_get_ = ompi_get_f
  33 #pragma weak pmpi_get__ = ompi_get_f
  34 
  35 #pragma weak PMPI_Get_f = ompi_get_f
  36 #pragma weak PMPI_Get_f08 = ompi_get_f
  37 #else
  38 OMPI_GENERATE_F77_BINDINGS (PMPI_GET,
  39                            pmpi_get,
  40                            pmpi_get_,
  41                            pmpi_get__,
  42                            pompi_get_f,
  43                            (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *ierr),
  44                            (origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, ierr) )
  45 #endif
  46 #endif
  47 
  48 #if OPAL_HAVE_WEAK_SYMBOLS
  49 #pragma weak MPI_GET = ompi_get_f
  50 #pragma weak mpi_get = ompi_get_f
  51 #pragma weak mpi_get_ = ompi_get_f
  52 #pragma weak mpi_get__ = ompi_get_f
  53 
  54 #pragma weak MPI_Get_f = ompi_get_f
  55 #pragma weak MPI_Get_f08 = ompi_get_f
  56 #else
  57 #if ! OMPI_BUILD_MPI_PROFILING
  58 OMPI_GENERATE_F77_BINDINGS (MPI_GET,
  59                            mpi_get,
  60                            mpi_get_,
  61                            mpi_get__,
  62                            ompi_get_f,
  63                            (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *ierr),
  64                            (origin_addr, origin_count, origin_datatype, target_rank, target_disp, target_count, target_datatype, win, ierr) )
  65 #else
  66 #define ompi_get_f pompi_get_f
  67 #endif
  68 #endif
  69 
  70 
  71 void ompi_get_f(char *origin_addr, MPI_Fint *origin_count,
  72                MPI_Fint *origin_datatype, MPI_Fint *target_rank,
  73                MPI_Aint *target_disp, MPI_Fint *target_count,
  74                MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *ierr)
  75 {
  76     int c_ierr;
  77     MPI_Datatype c_origin_datatype = PMPI_Type_f2c(*origin_datatype);
  78     MPI_Datatype c_target_datatype = PMPI_Type_f2c(*target_datatype);
  79     MPI_Win c_win = PMPI_Win_f2c(*win);
  80 
  81     c_ierr = PMPI_Get(OMPI_F2C_BOTTOM(origin_addr),
  82                      OMPI_FINT_2_INT(*origin_count),
  83                      c_origin_datatype,
  84                      OMPI_FINT_2_INT(*target_rank),
  85                      *target_disp,
  86                      OMPI_FINT_2_INT(*target_count),
  87                      c_target_datatype, c_win);
  88     if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
  89 }

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