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

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

DEFINITIONS

This source file includes following definitions.
  1. ompi_iprobe_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) 2012      Oracle and/or its affiliates.  All rights reserved.
  14  * Copyright (c) 2015      Research Organization for Information Science
  15  *                         and Technology (RIST). 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/mpif-h/status-conversion.h"
  27 #include "ompi/mpi/fortran/base/constants.h"
  28 #include "ompi/communicator/communicator.h"
  29 
  30 #if OMPI_BUILD_MPI_PROFILING
  31 #if OPAL_HAVE_WEAK_SYMBOLS
  32 #pragma weak PMPI_IPROBE = ompi_iprobe_f
  33 #pragma weak pmpi_iprobe = ompi_iprobe_f
  34 #pragma weak pmpi_iprobe_ = ompi_iprobe_f
  35 #pragma weak pmpi_iprobe__ = ompi_iprobe_f
  36 
  37 #pragma weak PMPI_Iprobe_f = ompi_iprobe_f
  38 #pragma weak PMPI_Iprobe_f08 = ompi_iprobe_f
  39 #else
  40 OMPI_GENERATE_F77_BINDINGS (PMPI_IPROBE,
  41                            pmpi_iprobe,
  42                            pmpi_iprobe_,
  43                            pmpi_iprobe__,
  44                            pompi_iprobe_f,
  45                            (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *status, MPI_Fint *ierr),
  46                            (source, tag, comm, flag, status, ierr) )
  47 #endif
  48 #endif
  49 
  50 #if OPAL_HAVE_WEAK_SYMBOLS
  51 #pragma weak MPI_IPROBE = ompi_iprobe_f
  52 #pragma weak mpi_iprobe = ompi_iprobe_f
  53 #pragma weak mpi_iprobe_ = ompi_iprobe_f
  54 #pragma weak mpi_iprobe__ = ompi_iprobe_f
  55 
  56 #pragma weak MPI_Iprobe_f = ompi_iprobe_f
  57 #pragma weak MPI_Iprobe_f08 = ompi_iprobe_f
  58 #else
  59 #if ! OMPI_BUILD_MPI_PROFILING
  60 OMPI_GENERATE_F77_BINDINGS (MPI_IPROBE,
  61                            mpi_iprobe,
  62                            mpi_iprobe_,
  63                            mpi_iprobe__,
  64                            ompi_iprobe_f,
  65                            (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, ompi_fortran_logical_t *flag, MPI_Fint *status, MPI_Fint *ierr),
  66                            (source, tag, comm, flag, status, ierr) )
  67 #else
  68 #define ompi_iprobe_f pompi_iprobe_f
  69 #endif
  70 #endif
  71 
  72 
  73 void ompi_iprobe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
  74                   ompi_fortran_logical_t *flag, MPI_Fint *status, MPI_Fint *ierr)
  75 {
  76     int c_ierr;
  77     MPI_Comm c_comm;
  78     OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
  79     OMPI_LOGICAL_NAME_DECL(flag);
  80 
  81     c_comm = PMPI_Comm_f2c (*comm);
  82 
  83     OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
  84 
  85     c_ierr = PMPI_Iprobe(OMPI_FINT_2_INT(*source),
  86                         OMPI_FINT_2_INT(*tag),
  87                         c_comm, OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag),
  88                         c_status);
  89     if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
  90 
  91     if (MPI_SUCCESS == c_ierr) {
  92         OMPI_SINGLE_INT_2_LOGICAL(flag);
  93         OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
  94     }
  95 }

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