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

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

DEFINITIONS

This source file includes following definitions.
  1. ompi_imrecv_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) 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 (c) 2015      FUJITSU LIMITED.  All rights reserved.
  16  * $COPYRIGHT$
  17  *
  18  * Additional copyrights may follow
  19  *
  20  * $HEADER$
  21  */
  22 
  23 #include "ompi_config.h"
  24 
  25 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  26 #include "ompi/mpi/fortran/base/constants.h"
  27 
  28 #if OMPI_BUILD_MPI_PROFILING
  29 #if OPAL_HAVE_WEAK_SYMBOLS
  30 #pragma weak PMPI_IMRECV = ompi_imrecv_f
  31 #pragma weak pmpi_imrecv = ompi_imrecv_f
  32 #pragma weak pmpi_imrecv_ = ompi_imrecv_f
  33 #pragma weak pmpi_imrecv__ = ompi_imrecv_f
  34 
  35 #pragma weak PMPI_Imrecv_f = ompi_imrecv_f
  36 #pragma weak PMPI_Imrecv_f08 = ompi_imrecv_f
  37 #else
  38 OMPI_GENERATE_F77_BINDINGS (PMPI_IMRECV,
  39                             pmpi_imrecv,
  40                             pmpi_imrecv_,
  41                             pmpi_imrecv__,
  42                             pompi_imrecv_f,
  43                             (char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *message,
  44                              MPI_Fint *request, MPI_Fint *ierr),
  45                             (buf, count, datatype, message, request, ierr) )
  46 #endif
  47 #endif
  48 
  49 #if OPAL_HAVE_WEAK_SYMBOLS
  50 #pragma weak MPI_IMRECV = ompi_imrecv_f
  51 #pragma weak mpi_imrecv = ompi_imrecv_f
  52 #pragma weak mpi_imrecv_ = ompi_imrecv_f
  53 #pragma weak mpi_imrecv__ = ompi_imrecv_f
  54 
  55 #pragma weak MPI_Imrecv_f = ompi_imrecv_f
  56 #pragma weak MPI_Imrecv_f08 = ompi_imrecv_f
  57 #else
  58 #if ! OMPI_BUILD_MPI_PROFILING
  59 OMPI_GENERATE_F77_BINDINGS (MPI_IMRECV,
  60                             mpi_imrecv,
  61                             mpi_imrecv_,
  62                             mpi_imrecv__,
  63                             ompi_imrecv_f,
  64                             (char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *message,
  65                              MPI_Fint *request, MPI_Fint *ierr),
  66                             (buf, count, datatype, message, request, ierr) )
  67 #else
  68 #define ompi_imrecv_f pompi_imrecv_f
  69 #endif
  70 #endif
  71 
  72 
  73 void ompi_imrecv_f(char *buf, MPI_Fint *count, MPI_Fint *datatype,
  74                    MPI_Fint *message, MPI_Fint *request, MPI_Fint *ierr)
  75 {
  76    int c_ierr;
  77    MPI_Datatype c_type = PMPI_Type_f2c(*datatype);
  78    MPI_Request c_req;
  79    MPI_Message c_message;
  80 
  81    c_message = PMPI_Message_f2c(*message);
  82 
  83    c_ierr = OMPI_INT_2_FINT(PMPI_Imrecv(OMPI_F2C_BOTTOM(buf), OMPI_FINT_2_INT(*count),
  84                                         c_type, &c_message, &c_req));
  85    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
  86 
  87    if (MPI_SUCCESS == c_ierr) {
  88       *request = PMPI_Request_c2f(c_req);
  89       /* message is an INOUT, and may be updated by the recv */
  90       *message = PMPI_Message_c2f(c_message);
  91    }
  92 }

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