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

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

DEFINITIONS

This source file includes following definitions.
  1. ompi_improbe_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) 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 (c) 2015      FUJITSU LIMITED.  All rights reserved.
  17  * $COPYRIGHT$
  18  *
  19  * Additional copyrights may follow
  20  *
  21  * $HEADER$
  22  */
  23 
  24 #include "ompi_config.h"
  25 
  26 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  27 #include "ompi/mpi/fortran/mpif-h/status-conversion.h"
  28 #include "ompi/mpi/fortran/base/constants.h"
  29 #include "ompi/communicator/communicator.h"
  30 
  31 #if OMPI_BUILD_MPI_PROFILING
  32 #if OPAL_HAVE_WEAK_SYMBOLS
  33 #pragma weak PMPI_IMPROBE = ompi_improbe_f
  34 #pragma weak pmpi_improbe = ompi_improbe_f
  35 #pragma weak pmpi_improbe_ = ompi_improbe_f
  36 #pragma weak pmpi_improbe__ = ompi_improbe_f
  37 
  38 #pragma weak PMPI_Improbe_f = ompi_improbe_f
  39 #pragma weak PMPI_Improbe_f08 = ompi_improbe_f
  40 #else
  41 OMPI_GENERATE_F77_BINDINGS (PMPI_IMPROBE,
  42                             pmpi_improbe,
  43                             pmpi_improbe_,
  44                             pmpi_improbe__,
  45                             pompi_improbe_f,
  46                             (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, ompi_fortran_logical_t *flag,
  47                              MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr),
  48                             (source, tag, comm, flag, message, status, ierr) )
  49 #endif
  50 #endif
  51 
  52 #if OPAL_HAVE_WEAK_SYMBOLS
  53 #pragma weak MPI_IMPROBE = ompi_improbe_f
  54 #pragma weak mpi_improbe = ompi_improbe_f
  55 #pragma weak mpi_improbe_ = ompi_improbe_f
  56 #pragma weak mpi_improbe__ = ompi_improbe_f
  57 
  58 #pragma weak MPI_Improbe_f = ompi_improbe_f
  59 #pragma weak MPI_Improbe_f08 = ompi_improbe_f
  60 #else
  61 #if ! OMPI_BUILD_MPI_PROFILING
  62 OMPI_GENERATE_F77_BINDINGS (MPI_IMPROBE,
  63                             mpi_improbe,
  64                             mpi_improbe_,
  65                             mpi_improbe__,
  66                             ompi_improbe_f,
  67                             (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, ompi_fortran_logical_t *flag,
  68                              MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr),
  69                             (source, tag, comm, flag, message, status, ierr) )
  70 #else
  71 #define ompi_improbe_f pompi_improbe_f
  72 #endif
  73 #endif
  74 
  75 
  76 void ompi_improbe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
  77                     ompi_fortran_logical_t *flag, MPI_Fint *message,
  78                     MPI_Fint *status, MPI_Fint *ierr)
  79 {
  80     MPI_Message c_message;
  81     MPI_Comm c_comm;
  82     OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
  83     int c_ierr;
  84     OMPI_LOGICAL_NAME_DECL(flag);
  85 
  86     c_comm = PMPI_Comm_f2c (*comm);
  87 
  88     OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
  89 
  90     c_ierr = OMPI_INT_2_FINT(PMPI_Improbe(OMPI_FINT_2_INT(*source),
  91                                           OMPI_FINT_2_INT(*tag),
  92                                           c_comm, OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag),
  93                                           &c_message, c_status));
  94     if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
  95 
  96     if (MPI_SUCCESS == c_ierr) {
  97         OMPI_SINGLE_INT_2_LOGICAL(flag);
  98         if (OMPI_FORTRAN_VALUE_TRUE == *flag) {
  99             OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
 100             *message = PMPI_Message_c2f(c_message);
 101         }
 102     }
 103 }

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