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

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

DEFINITIONS

This source file includes following definitions.
  1. ompi_rget_accumulate_f

   1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
   2 /*
   3  * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
   4  *                         University Research and Technology
   5  *                         Corporation.  All rights reserved.
   6  * Copyright (c) 2004-2005 The University of Tennessee and The University
   7  *                         of Tennessee Research Foundation.  All rights
   8  *                         reserved.
   9  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
  10  *                         University of Stuttgart.  All rights reserved.
  11  * Copyright (c) 2004-2005 The Regents of the University of California.
  12  *                         All rights reserved.
  13  * Copyright (c) 2011-2012 Cisco Systems, Inc.  All rights reserved.
  14  * Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
  15  *                         reserved.
  16  * Copyright (c) 2015      Research Organization for Information Science
  17  *                         and Technology (RIST). All rights reserved.
  18  * Copyright (c) 2015      FUJITSU LIMITED.  All rights reserved.
  19  * $COPYRIGHT$
  20  *
  21  * Additional copyrights may follow
  22  *
  23  * $HEADER$
  24  */
  25 
  26 #include "ompi_config.h"
  27 
  28 #include "ompi/mpi/fortran/mpif-h/bindings.h"
  29 #include "ompi/mpi/fortran/base/constants.h"
  30 
  31 
  32 #if OMPI_BUILD_MPI_PROFILING
  33 #if OPAL_HAVE_WEAK_SYMBOLS
  34 #pragma weak PMPI_RGET_ACCUMULATE = ompi_rget_accumulate_f
  35 #pragma weak pmpi_rget_accumulate = ompi_rget_accumulate_f
  36 #pragma weak pmpi_rget_accumulate_ = ompi_rget_accumulate_f
  37 #pragma weak pmpi_rget_accumulate__ = ompi_rget_accumulate_f
  38 
  39 #pragma weak PMPI_Rget_accumulate_f = ompi_rget_accumulate_f
  40 #pragma weak PMPI_Rget_accumulate_f08 = ompi_rget_accumulate_f
  41 #else
  42 OMPI_GENERATE_F77_BINDINGS (PMPI_RGET_ACCUMULATE,
  43                             pmpi_rget_accumulate,
  44                             pmpi_rget_accumulate_,
  45                             pmpi_rget_accumulate__,
  46                             pompi_rget_accumulate_f,
  47                             (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, char *result_addr, MPI_Fint *result_count, MPI_Fint *result_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr),
  48                             (origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierr) )
  49 #endif
  50 #endif
  51 
  52 #if OPAL_HAVE_WEAK_SYMBOLS
  53 #pragma weak MPI_RGET_ACCUMULATE = ompi_rget_accumulate_f
  54 #pragma weak mpi_rget_accumulate = ompi_rget_accumulate_f
  55 #pragma weak mpi_rget_accumulate_ = ompi_rget_accumulate_f
  56 #pragma weak mpi_rget_accumulate__ = ompi_rget_accumulate_f
  57 
  58 #pragma weak MPI_Rget_accumulate_f = ompi_rget_accumulate_f
  59 #pragma weak MPI_Rget_accumulate_f08 = ompi_rget_accumulate_f
  60 #else
  61 #if ! OMPI_BUILD_MPI_PROFILING
  62 OMPI_GENERATE_F77_BINDINGS (MPI_RGET_ACCUMULATE,
  63                             mpi_rget_accumulate,
  64                             mpi_rget_accumulate_,
  65                             mpi_rget_accumulate__,
  66                             ompi_rget_accumulate_f,
  67                             (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, char *result_addr, MPI_Fint *result_count, MPI_Fint *result_datatype, MPI_Fint *target_rank, MPI_Aint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *op, MPI_Fint *win, MPI_Fint *request, MPI_Fint *ierr),
  68                             (origin_addr, origin_count, origin_datatype, result_addr, result_count, result_datatype, target_rank, target_disp, target_count, target_datatype, op, win, request, ierr) )
  69 #else
  70 #define ompi_rget_accumulate_f pompi_rget_accumulate_f
  71 #endif
  72 #endif
  73 
  74 
  75 void ompi_rget_accumulate_f(char *origin_addr, MPI_Fint *origin_count,
  76                             MPI_Fint *origin_datatype, char *result_addr,
  77                             MPI_Fint *result_count, MPI_Fint *result_datatype,
  78                             MPI_Fint *target_rank, MPI_Aint *target_disp,
  79                             MPI_Fint *target_count, MPI_Fint *target_datatype,
  80                             MPI_Fint *op, MPI_Fint *win, MPI_Fint *request,
  81                             MPI_Fint *ierr)
  82 {
  83     int c_ierr;
  84     MPI_Datatype c_origin_datatype = PMPI_Type_f2c(*origin_datatype);
  85     MPI_Datatype c_result_datatype = PMPI_Type_f2c(*result_datatype);
  86     MPI_Datatype c_target_datatype = PMPI_Type_f2c(*target_datatype);
  87     MPI_Win c_win = PMPI_Win_f2c(*win);
  88     MPI_Op c_op = PMPI_Op_f2c(*op);
  89     MPI_Request c_req;
  90 
  91     c_ierr = PMPI_Rget_accumulate(OMPI_F2C_BOTTOM(origin_addr),
  92                                  OMPI_FINT_2_INT(*origin_count),
  93                                  c_origin_datatype,
  94                                  OMPI_F2C_BOTTOM(result_addr),
  95                                  OMPI_FINT_2_INT(*result_count),
  96                                  c_result_datatype,
  97                                  OMPI_FINT_2_INT(*target_rank),
  98                                  *target_disp,
  99                                  OMPI_FINT_2_INT(*target_count),
 100                                  c_target_datatype, c_op, c_win, &c_req);
 101     if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
 102 
 103     if (MPI_SUCCESS == c_ierr) {
 104         *request = PMPI_Request_c2f(c_req);
 105     }
 106 }

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