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

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

DEFINITIONS

This source file includes following definitions.
  1. ompi_mprobe_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      Sandia National Laboratories. All rights reserved.
  13  * Copyright (c) 2012 Cisco Systems, Inc.  All rights reserved.
  14  * Copyright (c) 2012      Oracle and/or its affiliates.  All rights reserved.
  15  * Copyright (c) 2015      Research Organization for Information Science
  16  *                         and Technology (RIST). All rights reserved.
  17  * Copyright (c) 2015      FUJITSU LIMITED.  All rights reserved.
  18  * $COPYRIGHT$
  19  *
  20  * Additional copyrights may follow
  21  *
  22  * $HEADER$
  23  */
  24 
  25 #include "ompi_config.h"
  26 
  27 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  28 #include "ompi/mpi/fortran/mpif-h/status-conversion.h"
  29 #include "ompi/mpi/fortran/base/constants.h"
  30 #include "ompi/communicator/communicator.h"
  31 
  32 #if OMPI_BUILD_MPI_PROFILING
  33 #if OPAL_HAVE_WEAK_SYMBOLS
  34 #pragma weak PMPI_MPROBE = ompi_mprobe_f
  35 #pragma weak pmpi_mprobe = ompi_mprobe_f
  36 #pragma weak pmpi_mprobe_ = ompi_mprobe_f
  37 #pragma weak pmpi_mprobe__ = ompi_mprobe_f
  38 
  39 #pragma weak PMPI_Mprobe_f = ompi_mprobe_f
  40 #pragma weak PMPI_Mprobe_f08 = ompi_mprobe_f
  41 #else
  42 OMPI_GENERATE_F77_BINDINGS (PMPI_MPROBE,
  43                             pmpi_mprobe,
  44                             pmpi_mprobe_,
  45                             pmpi_mprobe__,
  46                             pompi_mprobe_f,
  47                             (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *message,
  48                              MPI_Fint *status, MPI_Fint *ierr),
  49                             (source, tag, comm, message, status, ierr) )
  50 #endif
  51 #endif
  52 
  53 #if OPAL_HAVE_WEAK_SYMBOLS
  54 #pragma weak MPI_MPROBE = ompi_mprobe_f
  55 #pragma weak mpi_mprobe = ompi_mprobe_f
  56 #pragma weak mpi_mprobe_ = ompi_mprobe_f
  57 #pragma weak mpi_mprobe__ = ompi_mprobe_f
  58 
  59 #pragma weak MPI_Mprobe_f = ompi_mprobe_f
  60 #pragma weak MPI_Mprobe_f08 = ompi_mprobe_f
  61 #else
  62 #if ! OMPI_BUILD_MPI_PROFILING
  63 OMPI_GENERATE_F77_BINDINGS (MPI_MPROBE,
  64                             mpi_mprobe,
  65                             mpi_mprobe_,
  66                             mpi_mprobe__,
  67                             ompi_mprobe_f,
  68                             (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *message,
  69                              MPI_Fint *status, MPI_Fint *ierr),
  70                             (source, tag, comm, message, status, ierr) )
  71 #else
  72 #define ompi_mprobe_f pompi_mprobe_f
  73 #endif
  74 #endif
  75 
  76 
  77 void ompi_mprobe_f(MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm,
  78                    MPI_Fint *message, MPI_Fint *status, MPI_Fint *ierr)
  79 {
  80     MPI_Comm c_comm;
  81     MPI_Message c_message;
  82     OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
  83     int c_ierr;
  84 
  85     c_comm = PMPI_Comm_f2c (*comm);
  86 
  87     OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
  88 
  89     c_ierr = OMPI_INT_2_FINT(PMPI_Mprobe(OMPI_FINT_2_INT(*source),
  90                                          OMPI_FINT_2_INT(*tag),
  91                                          c_comm, &c_message,
  92                                          c_status));
  93     if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
  94 
  95     if (MPI_SUCCESS == c_ierr) {
  96         OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
  97         *message = PMPI_Message_c2f(c_message);
  98     }
  99 }

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