mpiext/pcollreq: Add Fortran mpif-h bindings
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Этот коммит содержится в:
родитель
44110a575d
Коммит
9e0115c980
@ -7,4 +7,4 @@
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
SUBDIRS = c
|
||||
SUBDIRS = c mpif-h
|
||||
|
@ -17,6 +17,8 @@ AC_DEFUN([OMPI_MPIEXT_pcollreq_CONFIG],[
|
||||
ompi/mpiext/pcollreq/Makefile
|
||||
ompi/mpiext/pcollreq/c/Makefile
|
||||
ompi/mpiext/pcollreq/c/profile/Makefile
|
||||
ompi/mpiext/pcollreq/mpif-h/Makefile
|
||||
ompi/mpiext/pcollreq/mpif-h/profile/Makefile
|
||||
])
|
||||
|
||||
AS_IF([test "$ENABLE_pcollreq" = "1" || \
|
||||
|
88
ompi/mpiext/pcollreq/mpif-h/Makefile.am
Обычный файл
88
ompi/mpiext/pcollreq/mpif-h/Makefile.am
Обычный файл
@ -0,0 +1,88 @@
|
||||
#
|
||||
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
|
||||
# Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
# Copyright (c) 2018 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
SUBDIRS = profile
|
||||
|
||||
# This file builds the mpif.h-based bindings for MPI extensions. It
|
||||
# is optional in MPI extensions.
|
||||
|
||||
# We must set these #defines so that the inner OMPI MPI prototype
|
||||
# header files do the Right Thing.
|
||||
AM_CPPFLAGS = -DOMPI_BUILD_MPI_PROFILING=0 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1
|
||||
|
||||
# Note that the mpif.h-based bindings are optional -- they can only be
|
||||
# built if OMPI is also building the Fortran-based bindings. So we
|
||||
# initially set some Makefile macros to empty, and then conditionally
|
||||
# add to them later.
|
||||
noinst_LTLIBRARIES =
|
||||
|
||||
# Directory where the header file to be included in mpif-ext.h must be
|
||||
# installed.
|
||||
ompidir = $(ompiincludedir)/ompi/mpiext/pcollreq/mpif-h
|
||||
|
||||
# Just like noinst_LTLIBRARIES, set this macro to empty and
|
||||
# conditionally add to it later.
|
||||
ompi_HEADERS =
|
||||
|
||||
# Use the Automake conditional to know if we're building the mpif.h
|
||||
# bindings.
|
||||
if OMPI_BUILD_FORTRAN_MPIFH_BINDINGS
|
||||
|
||||
# If we are, build the convenience libtool library that will be
|
||||
# slurped up into libmpi_mpifh.la.
|
||||
noinst_LTLIBRARIES += libmpiext_pcollreq_mpifh.la
|
||||
|
||||
# This is the header file that is installed.
|
||||
ompi_HEADERS += mpiext_pcollreq_mpifh.h
|
||||
|
||||
noinst_HEADERS = mpiext_pcollreq_prototypes.h
|
||||
|
||||
# Sources for the convenience libtool library.
|
||||
libmpiext_pcollreq_mpifh_la_SOURCES = \
|
||||
$(ompi_HEADERS) \
|
||||
mpiext_pcollreq_mpifh.c
|
||||
|
||||
if BUILD_MPI_BINDINGS_LAYER
|
||||
libmpiext_pcollreq_mpifh_la_SOURCES += \
|
||||
allgather_init_f.c \
|
||||
allgatherv_init_f.c \
|
||||
allreduce_init_f.c \
|
||||
alltoall_init_f.c \
|
||||
alltoallv_init_f.c \
|
||||
alltoallw_init_f.c \
|
||||
barrier_init_f.c \
|
||||
bcast_init_f.c \
|
||||
exscan_init_f.c \
|
||||
gather_init_f.c \
|
||||
gatherv_init_f.c \
|
||||
reduce_init_f.c \
|
||||
reduce_scatter_init_f.c \
|
||||
reduce_scatter_block_init_f.c \
|
||||
scan_init_f.c \
|
||||
scatter_init_f.c \
|
||||
scatterv_init_f.c \
|
||||
\
|
||||
neighbor_allgather_init_f.c \
|
||||
neighbor_allgatherv_init_f.c \
|
||||
neighbor_alltoall_init_f.c \
|
||||
neighbor_alltoallv_init_f.c \
|
||||
neighbor_alltoallw_init_f.c
|
||||
endif
|
||||
|
||||
libmpiext_pcollreq_mpifh_la_LIBADD = \
|
||||
profile/libpmpiext_pcollreq_mpifh.la
|
||||
|
||||
endif
|
100
ompi/mpiext/pcollreq/mpif-h/allgather_init_f.c
Обычный файл
100
ompi/mpiext/pcollreq/mpif-h/allgather_init_f.c
Обычный файл
@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_ALLGATHER_INIT = ompix_allgather_init_f
|
||||
#pragma weak pmpix_allgather_init = ompix_allgather_init_f
|
||||
#pragma weak pmpix_allgather_init_ = ompix_allgather_init_f
|
||||
#pragma weak pmpix_allgather_init__ = ompix_allgather_init_f
|
||||
|
||||
#pragma weak PMPIX_Allgather_init_f = ompix_allgather_init_f
|
||||
#pragma weak PMPIX_Allgather_init_f08 = ompix_allgather_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_ALLGATHER_INIT,
|
||||
pmpix_allgather_init,
|
||||
pmpix_allgather_init_,
|
||||
pmpix_allgather_init__,
|
||||
pompix_allgather_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_ALLGATHER_INIT = ompix_allgather_init_f
|
||||
#pragma weak mpix_allgather_init = ompix_allgather_init_f
|
||||
#pragma weak mpix_allgather_init_ = ompix_allgather_init_f
|
||||
#pragma weak mpix_allgather_init__ = ompix_allgather_init_f
|
||||
|
||||
#pragma weak MPIX_Allgather_init_f = ompix_allgather_init_f
|
||||
#pragma weak MPIX_Allgather_init_f08 = ompix_allgather_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_ALLGATHER_INIT,
|
||||
mpix_allgather_init,
|
||||
mpix_allgather_init_,
|
||||
mpix_allgather_init__,
|
||||
ompix_allgather_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_allgather_init_f pompix_allgather_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_allgather_init_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype,
|
||||
MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
int ierr_c;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Request c_req;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
MPI_Info c_info;
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
ierr_c = PMPIX_Allgather_init(sendbuf,
|
||||
OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype,
|
||||
recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
c_recvtype, c_comm, c_info, &c_req);
|
||||
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c);
|
||||
|
||||
if (MPI_SUCCESS == ierr_c) *request = PMPI_Request_c2f(c_req);
|
||||
}
|
110
ompi/mpiext/pcollreq/mpif-h/allgatherv_init_f.c
Обычный файл
110
ompi/mpiext/pcollreq/mpif-h/allgatherv_init_f.c
Обычный файл
@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_ALLGATHERV_INIT = ompix_allgatherv_init_f
|
||||
#pragma weak pmpix_allgatherv_init = ompix_allgatherv_init_f
|
||||
#pragma weak pmpix_allgatherv_init_ = ompix_allgatherv_init_f
|
||||
#pragma weak pmpix_allgatherv_init__ = ompix_allgatherv_init_f
|
||||
|
||||
#pragma weak PMPIX_Allgatherv_init_f = ompix_allgatherv_init_f
|
||||
#pragma weak PMPIX_Allgatherv_init_f08 = ompix_allgatherv_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_ALLGATHERV_INIT,
|
||||
pmpix_allgatherv_init,
|
||||
pmpix_allgatherv_init_,
|
||||
pmpix_allgatherv_init__,
|
||||
pompix_allgatherv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_ALLGATHERV_INIT = ompix_allgatherv_init_f
|
||||
#pragma weak mpix_allgatherv_init = ompix_allgatherv_init_f
|
||||
#pragma weak mpix_allgatherv_init_ = ompix_allgatherv_init_f
|
||||
#pragma weak mpix_allgatherv_init__ = ompix_allgatherv_init_f
|
||||
|
||||
#pragma weak MPIX_Allgatherv_init_f = ompix_allgatherv_init_f
|
||||
#pragma weak MPIX_Allgatherv_init_f08 = ompix_allgatherv_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_ALLGATHERV_INIT,
|
||||
mpix_allgatherv_init,
|
||||
mpix_allgatherv_init_,
|
||||
mpix_allgatherv_init__,
|
||||
ompix_allgatherv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_allgatherv_init_f pompix_allgatherv_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_allgatherv_init_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs,
|
||||
MPI_Fint *recvtype, MPI_Fint *comm,
|
||||
MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
MPI_Request c_request;
|
||||
MPI_Info c_info;
|
||||
int size, ierr_c;
|
||||
OMPI_ARRAY_NAME_DECL(recvcounts);
|
||||
OMPI_ARRAY_NAME_DECL(displs);
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
PMPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
ierr_c = PMPIX_Allgatherv_init(sendbuf,
|
||||
OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype,
|
||||
recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(displs),
|
||||
c_recvtype, c_comm, c_info, &c_request);
|
||||
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c);
|
||||
if (MPI_SUCCESS == ierr_c) *request = PMPI_Request_c2f(c_request);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(recvcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(displs);
|
||||
}
|
96
ompi/mpiext/pcollreq/mpif-h/allreduce_init_f.c
Обычный файл
96
ompi/mpiext/pcollreq/mpif-h/allreduce_init_f.c
Обычный файл
@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_ALLREDUCE_INIT = ompix_allreduce_init_f
|
||||
#pragma weak pmpix_allreduce_init = ompix_allreduce_init_f
|
||||
#pragma weak pmpix_allreduce_init_ = ompix_allreduce_init_f
|
||||
#pragma weak pmpix_allreduce_init__ = ompix_allreduce_init_f
|
||||
|
||||
#pragma weak PMPIX_Allreduce_init_f = ompix_allreduce_init_f
|
||||
#pragma weak PMPIX_Allreduce_init_f08 = ompix_allreduce_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_ALLREDUCE_INIT,
|
||||
pmpix_allreduce_init,
|
||||
pmpix_allreduce_init_,
|
||||
pmpix_allreduce_init__,
|
||||
pompix_allreduce_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_ALLREDUCE_INIT = ompix_allreduce_init_f
|
||||
#pragma weak mpix_allreduce_init = ompix_allreduce_init_f
|
||||
#pragma weak mpix_allreduce_init_ = ompix_allreduce_init_f
|
||||
#pragma weak mpix_allreduce_init__ = ompix_allreduce_init_f
|
||||
|
||||
#pragma weak MPIX_Allreduce_init_f = ompix_allreduce_init_f
|
||||
#pragma weak MPIX_Allreduce_init_f08 = ompix_allreduce_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_ALLREDUCE_INIT,
|
||||
mpix_allreduce_init,
|
||||
mpix_allreduce_init_,
|
||||
mpix_allreduce_init__,
|
||||
ompix_allreduce_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_allreduce_init_f pompix_allreduce_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_allreduce_init_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm,
|
||||
MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
int ierr_c;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_type;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
MPI_Op c_op;
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_type = PMPI_Type_f2c(*datatype);
|
||||
c_op = PMPI_Op_f2c(*op);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
ierr_c = PMPIX_Allreduce_init(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_op, c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c);
|
||||
if (MPI_SUCCESS == ierr_c) *request = PMPI_Request_c2f(c_request);
|
||||
}
|
99
ompi/mpiext/pcollreq/mpif-h/alltoall_init_f.c
Обычный файл
99
ompi/mpiext/pcollreq/mpif-h/alltoall_init_f.c
Обычный файл
@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_ALLTOALL_INIT = ompix_alltoall_init_f
|
||||
#pragma weak pmpix_alltoall_init = ompix_alltoall_init_f
|
||||
#pragma weak pmpix_alltoall_init_ = ompix_alltoall_init_f
|
||||
#pragma weak pmpix_alltoall_init__ = ompix_alltoall_init_f
|
||||
|
||||
#pragma weak PMPIX_Alltoall_init_f = ompix_alltoall_init_f
|
||||
#pragma weak PMPIX_Alltoall_init_f08 = ompix_alltoall_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_ALLTOALL_INIT,
|
||||
pmpix_alltoall_init,
|
||||
pmpix_alltoall_init_,
|
||||
pmpix_alltoall_init__,
|
||||
pompix_alltoall_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_ALLTOALL_INIT = ompix_alltoall_init_f
|
||||
#pragma weak mpix_alltoall_init = ompix_alltoall_init_f
|
||||
#pragma weak mpix_alltoall_init_ = ompix_alltoall_init_f
|
||||
#pragma weak mpix_alltoall_init__ = ompix_alltoall_init_f
|
||||
|
||||
#pragma weak MPIX_Alltoall_init_f = ompix_alltoall_init_f
|
||||
#pragma weak MPIX_Alltoall_init_f08 = ompix_alltoall_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_ALLTOALL_INIT,
|
||||
mpix_alltoall_init,
|
||||
mpix_alltoall_init_,
|
||||
mpix_alltoall_init__,
|
||||
ompix_alltoall_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_alltoall_init_f pompix_alltoall_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_alltoall_init_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype,
|
||||
MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Request c_req;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
MPI_Info c_info;
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Alltoall_init(sendbuf,
|
||||
OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype,
|
||||
recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
c_recvtype, c_comm, c_info, &c_req);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_req);
|
||||
}
|
116
ompi/mpiext/pcollreq/mpif-h/alltoallv_init_f.c
Обычный файл
116
ompi/mpiext/pcollreq/mpif-h/alltoallv_init_f.c
Обычный файл
@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_ALLTOALLV_INIT = ompix_alltoallv_init_f
|
||||
#pragma weak pmpix_alltoallv_init = ompix_alltoallv_init_f
|
||||
#pragma weak pmpix_alltoallv_init_ = ompix_alltoallv_init_f
|
||||
#pragma weak pmpix_alltoallv_init__ = ompix_alltoallv_init_f
|
||||
|
||||
#pragma weak PMPIX_Alltoallv_init_f = ompix_alltoallv_init_f
|
||||
#pragma weak PMPIX_Alltoallv_init_f08 = ompix_alltoallv_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_ALLTOALLV_INIT,
|
||||
pmpix_alltoallv_init,
|
||||
pmpix_alltoallv_init_,
|
||||
pmpix_alltoallv_init__,
|
||||
pompix_alltoallv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_ALLTOALLV_INIT = ompix_alltoallv_init_f
|
||||
#pragma weak mpix_alltoallv_init = ompix_alltoallv_init_f
|
||||
#pragma weak mpix_alltoallv_init_ = ompix_alltoallv_init_f
|
||||
#pragma weak mpix_alltoallv_init__ = ompix_alltoallv_init_f
|
||||
|
||||
#pragma weak MPIX_Alltoallv_init_f = ompix_alltoallv_init_f
|
||||
#pragma weak MPIX_Alltoallv_init_f08 = ompix_alltoallv_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_ALLTOALLV_INIT,
|
||||
mpix_alltoallv_init,
|
||||
mpix_alltoallv_init_,
|
||||
mpix_alltoallv_init__,
|
||||
ompix_alltoallv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_alltoallv_init_f pompix_alltoallv_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_alltoallv_init_f(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls,
|
||||
MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts,
|
||||
MPI_Fint *rdispls, MPI_Fint *recvtype,
|
||||
MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
int size, c_ierr;
|
||||
OMPI_ARRAY_NAME_DECL(sendcounts);
|
||||
OMPI_ARRAY_NAME_DECL(sdispls);
|
||||
OMPI_ARRAY_NAME_DECL(recvcounts);
|
||||
OMPI_ARRAY_NAME_DECL(rdispls);
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
PMPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(sendcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(sdispls, size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(rdispls, size);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Alltoallv_init(sendbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(sendcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(sdispls),
|
||||
c_sendtype,
|
||||
recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(rdispls),
|
||||
c_recvtype, c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(sendcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(sdispls);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(recvcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(rdispls);
|
||||
}
|
127
ompi/mpiext/pcollreq/mpif-h/alltoallw_init_f.c
Обычный файл
127
ompi/mpiext/pcollreq/mpif-h/alltoallw_init_f.c
Обычный файл
@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_ALLTOALLW_INIT = ompix_alltoallw_init_f
|
||||
#pragma weak pmpix_alltoallw_init = ompix_alltoallw_init_f
|
||||
#pragma weak pmpix_alltoallw_init_ = ompix_alltoallw_init_f
|
||||
#pragma weak pmpix_alltoallw_init__ = ompix_alltoallw_init_f
|
||||
|
||||
#pragma weak PMPIX_Alltoallw_init_f = ompix_alltoallw_init_f
|
||||
#pragma weak PMPIX_Alltoallw_init_f08 = ompix_alltoallw_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_ALLTOALLW_INIT,
|
||||
pmpix_alltoallw_init,
|
||||
pmpix_alltoallw_init_,
|
||||
pmpix_alltoallw_init__,
|
||||
pompix_alltoallw_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtypes, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtypes, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_ALLTOALLW_INIT = ompix_alltoallw_init_f
|
||||
#pragma weak mpix_alltoallw_init = ompix_alltoallw_init_f
|
||||
#pragma weak mpix_alltoallw_init_ = ompix_alltoallw_init_f
|
||||
#pragma weak mpix_alltoallw_init__ = ompix_alltoallw_init_f
|
||||
|
||||
#pragma weak MPIX_Alltoallw_init_f = ompix_alltoallw_init_f
|
||||
#pragma weak MPIX_Alltoallw_init_f08 = ompix_alltoallw_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_ALLTOALLW_INIT,
|
||||
mpix_alltoallw_init,
|
||||
mpix_alltoallw_init_,
|
||||
mpix_alltoallw_init__,
|
||||
ompix_alltoallw_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtypes, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtypes, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_alltoallw_init_f pompix_alltoallw_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_alltoallw_init_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
MPI_Fint *sdispls, MPI_Fint *sendtypes,
|
||||
char *recvbuf, MPI_Fint *recvcounts,
|
||||
MPI_Fint *rdispls, MPI_Fint *recvtypes,
|
||||
MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype *c_sendtypes, *c_recvtypes;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
int size, c_ierr;
|
||||
OMPI_ARRAY_NAME_DECL(sendcounts);
|
||||
OMPI_ARRAY_NAME_DECL(sdispls);
|
||||
OMPI_ARRAY_NAME_DECL(recvcounts);
|
||||
OMPI_ARRAY_NAME_DECL(rdispls);
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
PMPI_Comm_size(c_comm, &size);
|
||||
|
||||
c_sendtypes = (MPI_Datatype *) malloc(size * sizeof(MPI_Datatype));
|
||||
c_recvtypes = (MPI_Datatype *) malloc(size * sizeof(MPI_Datatype));
|
||||
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT(sendcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(sdispls, size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(rdispls, size);
|
||||
|
||||
while (size > 0) {
|
||||
c_sendtypes[size - 1] = PMPI_Type_f2c(sendtypes[size - 1]);
|
||||
c_recvtypes[size - 1] = PMPI_Type_f2c(recvtypes[size - 1]);
|
||||
--size;
|
||||
}
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Alltoallw_init(sendbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(sendcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(sdispls),
|
||||
c_sendtypes,
|
||||
recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(rdispls),
|
||||
c_recvtypes, c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(sendcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(sdispls);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(recvcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(rdispls);
|
||||
free(c_sendtypes);
|
||||
free(c_recvtypes);
|
||||
}
|
84
ompi/mpiext/pcollreq/mpif-h/barrier_init_f.c
Обычный файл
84
ompi/mpiext/pcollreq/mpif-h/barrier_init_f.c
Обычный файл
@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_BARRIER_INIT = ompix_barrier_init_f
|
||||
#pragma weak pmpix_barrier_init = ompix_barrier_init_f
|
||||
#pragma weak pmpix_barrier_init_ = ompix_barrier_init_f
|
||||
#pragma weak pmpix_barrier_init__ = ompix_barrier_init_f
|
||||
|
||||
#pragma weak PMPIX_Barrier_init_f = ompix_barrier_init_f
|
||||
#pragma weak PMPIX_Barrier_init_f08 = ompix_barrier_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_BARRIER_INIT,
|
||||
pmpix_barrier_init,
|
||||
pmpix_barrier_init_,
|
||||
pmpix_barrier_init__,
|
||||
pompix_barrier_init_f,
|
||||
(MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_BARRIER_INIT = ompix_barrier_init_f
|
||||
#pragma weak mpix_barrier_init = ompix_barrier_init_f
|
||||
#pragma weak mpix_barrier_init_ = ompix_barrier_init_f
|
||||
#pragma weak mpix_barrier_init__ = ompix_barrier_init_f
|
||||
|
||||
#pragma weak MPIX_Barrier_init_f = ompix_barrier_init_f
|
||||
#pragma weak MPIX_Barrier_init_f08 = ompix_barrier_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_BARRIER_INIT,
|
||||
mpix_barrier_init,
|
||||
mpix_barrier_init_,
|
||||
mpix_barrier_init__,
|
||||
ompix_barrier_init_f,
|
||||
(MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_barrier_init_f pompix_barrier_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_barrier_init_f(MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
int ierr_c;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_req;
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
ierr_c = PMPIX_Barrier_init(c_comm, c_info, &c_req);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c);
|
||||
|
||||
if (MPI_SUCCESS == ierr_c) *request = PMPI_Request_c2f(c_req);
|
||||
}
|
94
ompi/mpiext/pcollreq/mpif-h/bcast_init_f.c
Обычный файл
94
ompi/mpiext/pcollreq/mpif-h/bcast_init_f.c
Обычный файл
@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_BCAST_INIT = ompix_bcast_init_f
|
||||
#pragma weak pmpix_bcast_init = ompix_bcast_init_f
|
||||
#pragma weak pmpix_bcast_init_ = ompix_bcast_init_f
|
||||
#pragma weak pmpix_bcast_init__ = ompix_bcast_init_f
|
||||
|
||||
#pragma weak PMPIX_Bcast_init_f = ompix_bcast_init_f
|
||||
#pragma weak PMPIX_Bcast_init_f08 = ompix_bcast_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_BCAST_INIT,
|
||||
pmpix_bcast_init,
|
||||
pmpix_bcast_init_,
|
||||
pmpix_bcast_init__,
|
||||
pompix_bcast_init_f,
|
||||
(char *buffer, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(buffer, count, datatype, root, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_BCAST_INIT = ompix_bcast_init_f
|
||||
#pragma weak mpix_bcast_init = ompix_bcast_init_f
|
||||
#pragma weak mpix_bcast_init_ = ompix_bcast_init_f
|
||||
#pragma weak mpix_bcast_init__ = ompix_bcast_init_f
|
||||
|
||||
#pragma weak MPIX_Bcast_init_f = ompix_bcast_init_f
|
||||
#pragma weak MPIX_Bcast_init_f08 = ompix_bcast_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_BCAST_INIT,
|
||||
mpix_bcast_init,
|
||||
mpix_bcast_init_,
|
||||
mpix_bcast_init__,
|
||||
ompix_bcast_init_f,
|
||||
(char *buffer, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(buffer, count, datatype, root, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_bcast_init_f pompix_bcast_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_bcast_init_f(char *buffer, MPI_Fint *count, MPI_Fint *datatype,
|
||||
MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_req;
|
||||
MPI_Datatype c_type;
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_type = PMPI_Type_f2c(*datatype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
c_ierr = PMPIX_Bcast_init(OMPI_F2C_BOTTOM(buffer),
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type,
|
||||
OMPI_FINT_2_INT(*root),
|
||||
c_comm,
|
||||
c_info,
|
||||
&c_req);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_req);
|
||||
}
|
96
ompi/mpiext/pcollreq/mpif-h/exscan_init_f.c
Обычный файл
96
ompi/mpiext/pcollreq/mpif-h/exscan_init_f.c
Обычный файл
@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_EXSCAN_INIT = ompix_exscan_init_f
|
||||
#pragma weak pmpix_exscan_init = ompix_exscan_init_f
|
||||
#pragma weak pmpix_exscan_init_ = ompix_exscan_init_f
|
||||
#pragma weak pmpix_exscan_init__ = ompix_exscan_init_f
|
||||
|
||||
#pragma weak PMPIX_Exscan_init_f = ompix_exscan_init_f
|
||||
#pragma weak PMPIX_Exscan_init_f08 = ompix_exscan_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_EXSCAN_INIT,
|
||||
pmpix_exscan_init,
|
||||
pmpix_exscan_init_,
|
||||
pmpix_exscan_init__,
|
||||
pompix_exscan_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_EXSCAN_INIT = ompix_exscan_init_f
|
||||
#pragma weak mpix_exscan_init = ompix_exscan_init_f
|
||||
#pragma weak mpix_exscan_init_ = ompix_exscan_init_f
|
||||
#pragma weak mpix_exscan_init__ = ompix_exscan_init_f
|
||||
|
||||
#pragma weak MPIX_Exscan_init_f = ompix_exscan_init_f
|
||||
#pragma weak MPIX_Exscan_init_f08 = ompix_exscan_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_EXSCAN_INIT,
|
||||
mpix_exscan_init,
|
||||
mpix_exscan_init_,
|
||||
mpix_exscan_init__,
|
||||
ompix_exscan_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_exscan_init_f pompix_exscan_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_exscan_init_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm,
|
||||
MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_type;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
MPI_Op c_op;
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_type = PMPI_Type_f2c(*datatype);
|
||||
c_op = PMPI_Op_f2c(*op);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM (sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM (recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Exscan_init(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_op, c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
}
|
99
ompi/mpiext/pcollreq/mpif-h/gather_init_f.c
Обычный файл
99
ompi/mpiext/pcollreq/mpif-h/gather_init_f.c
Обычный файл
@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_GATHER_INIT = ompix_gather_init_f
|
||||
#pragma weak pmpix_gather_init = ompix_gather_init_f
|
||||
#pragma weak pmpix_gather_init_ = ompix_gather_init_f
|
||||
#pragma weak pmpix_gather_init__ = ompix_gather_init_f
|
||||
|
||||
#pragma weak PMPIX_Gather_init_f = ompix_gather_init_f
|
||||
#pragma weak PMPIX_Gather_init_f08 = ompix_gather_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_GATHER_INIT,
|
||||
pmpix_gather_init,
|
||||
pmpix_gather_init_,
|
||||
pmpix_gather_init__,
|
||||
pompix_gather_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_GATHER_INIT = ompix_gather_init_f
|
||||
#pragma weak mpix_gather_init = ompix_gather_init_f
|
||||
#pragma weak mpix_gather_init_ = ompix_gather_init_f
|
||||
#pragma weak mpix_gather_init__ = ompix_gather_init_f
|
||||
|
||||
#pragma weak MPIX_Gather_init_f = ompix_gather_init_f
|
||||
#pragma weak MPIX_Gather_init_f08 = ompix_gather_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_GATHER_INIT,
|
||||
mpix_gather_init,
|
||||
mpix_gather_init_,
|
||||
mpix_gather_init__,
|
||||
ompix_gather_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_gather_init_f pompix_gather_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_gather_init_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype,
|
||||
MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Gather_init(sendbuf, OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
c_recvtype,
|
||||
OMPI_FINT_2_INT(*root),
|
||||
c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
}
|
106
ompi/mpiext/pcollreq/mpif-h/gatherv_init_f.c
Обычный файл
106
ompi/mpiext/pcollreq/mpif-h/gatherv_init_f.c
Обычный файл
@ -0,0 +1,106 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_GATHERV_INIT = ompix_gatherv_init_f
|
||||
#pragma weak pmpix_gatherv_init = ompix_gatherv_init_f
|
||||
#pragma weak pmpix_gatherv_init_ = ompix_gatherv_init_f
|
||||
#pragma weak pmpix_gatherv_init__ = ompix_gatherv_init_f
|
||||
|
||||
#pragma weak PMPIX_Gatherv_init_f = ompix_gatherv_init_f
|
||||
#pragma weak PMPIX_Gatherv_init_f08 = ompix_gatherv_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_GATHERV_INIT,
|
||||
pmpix_gatherv_init,
|
||||
pmpix_gatherv_init_,
|
||||
pmpix_gatherv_init__,
|
||||
pompix_gatherv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_GATHERV_INIT = ompix_gatherv_init_f
|
||||
#pragma weak mpix_gatherv_init = ompix_gatherv_init_f
|
||||
#pragma weak mpix_gatherv_init_ = ompix_gatherv_init_f
|
||||
#pragma weak mpix_gatherv_init__ = ompix_gatherv_init_f
|
||||
|
||||
#pragma weak MPIX_Gatherv_init_f = ompix_gatherv_init_f
|
||||
#pragma weak MPIX_Gatherv_init_f08 = ompix_gatherv_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_GATHERV_INIT,
|
||||
mpix_gatherv_init,
|
||||
mpix_gatherv_init_,
|
||||
mpix_gatherv_init__,
|
||||
ompix_gatherv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request,MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_gatherv_init_f pompix_gatherv_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_gatherv_init_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs,
|
||||
MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm,
|
||||
MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
int size, c_ierr;
|
||||
OMPI_ARRAY_NAME_DECL(recvcounts);
|
||||
OMPI_ARRAY_NAME_DECL(displs);
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
PMPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Gatherv_init(sendbuf, OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(displs),
|
||||
c_recvtype,
|
||||
OMPI_FINT_2_INT(*root),
|
||||
c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
}
|
15
ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_mpifh.c
Обычный файл
15
ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_mpifh.c
Обычный файл
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright (c) 2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
*/
|
||||
|
||||
void mpiext_pcollreq_mpifh_dummy(void);
|
||||
|
||||
void mpiext_pcollreq_mpifh_dummy() {
|
||||
}
|
15
ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_mpifh.h
Обычный файл
15
ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_mpifh.h
Обычный файл
@ -0,0 +1,15 @@
|
||||
! -*- fortran -*-
|
||||
!
|
||||
! Copyright (c) 2010-2011 Oak Ridge National Labs. All rights reserved.
|
||||
! Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
||||
! Copyright (c) 2018 Research Organization for Information Science
|
||||
! and Technology (RIST). All rights reserved.
|
||||
! $COPYRIGHT$
|
||||
!
|
||||
! Additional copyrights may follow
|
||||
!
|
||||
! $HEADER$
|
||||
!
|
||||
|
||||
! Since the OMPI mpif.h interface does not prototype subroutines, do not
|
||||
! declare any subroutines here.
|
105
ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h
Обычный файл
105
ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h
Обычный файл
@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2013 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2006-2015 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2011-2013 Inria. All rights reserved.
|
||||
* Copyright (c) 2011-2013 Universite Bordeaux 1
|
||||
* Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2016-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*
|
||||
* This file prototypes all MPI fortran functions in all four fortran
|
||||
* symbol conventions as well as all the internal real OMPI wrapper
|
||||
* functions (different from any of the four fortran symbol
|
||||
* conventions for clarity, at the cost of more typing for me...).
|
||||
* This file is included in the top-level build ONLY. The prototyping
|
||||
* is done ONLY for MPI_* bindings
|
||||
*
|
||||
* Zeroth, the OMPI wrapper functions, with a ompi_ prefix and _f
|
||||
* suffix.
|
||||
*
|
||||
* This is needed ONLY if the lower-level prototypes_pmpi.h has not
|
||||
* already been included.
|
||||
*
|
||||
* Note about function pointers: all function pointers are prototyped
|
||||
* here as (void*) rather than including the .h file that defines the
|
||||
* proper type (e.g., "op/op.h" defines ompi_op_fortran_handler_fn_t,
|
||||
* which is the function pointer type for fortran op callback
|
||||
* functions). This is because there is no type checking coming in
|
||||
* from fortran, so why bother? Also, including "op/op.h" (and
|
||||
* friends) makes the all the f77 bindings files dependant on these
|
||||
* files -- any change to any one of them will cause the recompilation
|
||||
* of the entire set of f77 bindings (ugh!).
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
#include "ompi/errhandler/errhandler.h"
|
||||
#include "ompi/attribute/attribute.h"
|
||||
#include "ompi/op/op.h"
|
||||
#include "ompi/request/grequest.h"
|
||||
#include "ompi/mpi/fortran/base/datarep.h"
|
||||
|
||||
#include "ompi/mpiext/pcollreq/c/mpiext_pcollreq_c.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
/* These are the prototypes for the "real" back-end fortran functions. */
|
||||
#define PN2(ret, mixed_name, lower_name, upper_name, args) \
|
||||
/* Prototype the actual OMPI function */ \
|
||||
OMPI_DECLSPEC ret o##lower_name##_f args; \
|
||||
/* Prototype the 4 versions of the MPI mpif.h name */ \
|
||||
OMPI_DECLSPEC ret lower_name args; \
|
||||
OMPI_DECLSPEC ret lower_name##_ args; \
|
||||
OMPI_DECLSPEC ret lower_name##__ args; \
|
||||
OMPI_DECLSPEC ret upper_name args; \
|
||||
/* Prototype the use mpi/use mpi_f08 names */ \
|
||||
OMPI_DECLSPEC ret mixed_name##_f08 args; \
|
||||
OMPI_DECLSPEC ret mixed_name##_f args; \
|
||||
/* Prototype the actual POMPI function */ \
|
||||
OMPI_DECLSPEC ret po##lower_name##_f args; \
|
||||
/* Prototype the 4 versions of the PMPI mpif.h name */ \
|
||||
OMPI_DECLSPEC ret p##lower_name args; \
|
||||
OMPI_DECLSPEC ret p##lower_name##_ args; \
|
||||
OMPI_DECLSPEC ret p##lower_name##__ args; \
|
||||
OMPI_DECLSPEC ret P##upper_name args; \
|
||||
/* Prototype the use mpi/use mpi_f08 PMPI names */ \
|
||||
OMPI_DECLSPEC ret P##mixed_name##_f08 args; \
|
||||
OMPI_DECLSPEC ret P##mixed_name##_f args
|
||||
|
||||
PN2(void, MPIX_Allgather_init, mpix_allgather_init, MPIX_ALLGATHER_INIT, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Allgatherv_init, mpix_allgatherv_init, MPIX_ALLGATHERV_INIT, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
END_C_DECLS
|
||||
PN2(void, MPIX_Allreduce_init, mpix_allreduce_init, MPIX_ALLREDUCE_INIT, (char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_alltoall_init, mpix_alltoall_init, MPIX_ALLTOALL_INIT, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Alltoallv_init, mpix_alltoallv_init, MPIX_ALLTOALLV_INIT, (char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Alltoallw_init, mpix_alltoallw_init, MPIX_ALLTOALLW_INIT, (char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtypes, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtypes, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Barrier_init, mpix_barrier_init, MPIX_BARRIER_init, (MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Bcast_init, mpix_bcast_init, MPIX_BCAST_INIT, (char *buffer, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Exscan_init, mpix_exscan_init, MPIX_EXSCAN_INIT, (char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Gather_init, mpix_gather_init, MPIX_GATHER_INIT, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Gatherv_init, mpix_gatherv_init, MPIX_GATHERV_INIT, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Reduce_init, mpix_reduce_init, MPIX_REDUCE_INIT, (char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Reduce_scatter_init, mpix_reduce_scatter_init, MPIX_REDUCE_SCATTER_INIT, (char *sendbuf, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Reduce_scatter_block_init, mpix_reduce_scatter_block_init, MPIX_REDUCE_SCATTER_BLOCK_INIT, (char *sendbuf, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Scan_init, mpix_scan_init, MPIX_SCAN_INIT, (char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Scatter_init, mpix_scatter_init, MPIX_SCATTER_INIT, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Scatterv_init, mpix_scatterv_init, MPIX_SCATTERV_INIT, (char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *displs, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Neighbor_allgather_init, mpix_neighbor_allgather_init, MPIX_NEIGHBOR_ALLGATHER_INIT, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Neighbor_allgatherv_init, mpix_neighbor_allgatherv_init, MPIX_NEIGHBOR_ALLGATHERV_INIT, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Neighbor_alltoall_init, mpix_neighbor_alltoall_init, MPIX_NEIGHBOR_ALLTOALL_INIT, (char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Neighbor_alltoallv_init, mpix_neighbor_alltoallv_init, MPIX_NEIGHBOR_ALLTOALLV_INIT, (char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
||||
PN2(void, MPIX_Neighbor_alltoallw_init, mpix_neighbor_alltoallw_init, MPIX_NEIGHBOR_ALLTOALLW_INIT, (char *sendbuf, MPI_Fint *sendcounts, MPI_Aint *sdispls, MPI_Fint *sendtypes, char *recvbuf, MPI_Fint *recvcounts, MPI_Aint *rdispls, MPI_Fint *recvtypes, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr));
|
103
ompi/mpiext/pcollreq/mpif-h/neighbor_allgather_init_f.c
Обычный файл
103
ompi/mpiext/pcollreq/mpif-h/neighbor_allgather_init_f.c
Обычный файл
@ -0,0 +1,103 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_NEIGHBOR_ALLGATHER_INIT = ompix_neighbor_allgather_init_f
|
||||
#pragma weak pmpix_neighbor_allgather_init = ompix_neighbor_allgather_init_f
|
||||
#pragma weak pmpix_neighbor_allgather_init_ = ompix_neighbor_allgather_init_f
|
||||
#pragma weak pmpix_neighbor_allgather_init__ = ompix_neighbor_allgather_init_f
|
||||
|
||||
#pragma weak PMPIX_Neighbor_allgather_init_f = ompix_neighbor_allgather_init_f
|
||||
#pragma weak PMPIX_Neighbor_allgather_init_f08 = ompix_neighbor_allgather_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_NEIGHBOR_ALLGATHER_INIT,
|
||||
pmpix_neighbor_allgather_init,
|
||||
pmpix_neighbor_allgather_init_,
|
||||
pmpix_neighbor_allgather_init__,
|
||||
pompix_neighbor_allgather_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_NEIGHBOR_ALLGATHER_INIT = ompix_neighbor_allgather_init_f
|
||||
#pragma weak mpix_neighbor_allgather_init = ompix_neighbor_allgather_init_f
|
||||
#pragma weak mpix_neighbor_allgather_init_ = ompix_neighbor_allgather_init_f
|
||||
#pragma weak mpix_neighbor_allgather_init__ = ompix_neighbor_allgather_init_f
|
||||
|
||||
#pragma weak MPIX_Neighbor_allgather_init_f = ompix_neighbor_allgather_init_f
|
||||
#pragma weak MPIX_Neighbor_allgather_init_f08 = ompix_neighbor_allgather_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_NEIGHBOR_ALLGATHER_INIT,
|
||||
mpix_neighbor_allgather_init,
|
||||
mpix_neighbor_allgather_init_,
|
||||
mpix_neighbor_allgather_init__,
|
||||
ompix_neighbor_allgather_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_neighbor_allgather_init_f pompix_neighbor_allgather_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_neighbor_allgather_init_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype,
|
||||
MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
int ierr_c;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_req;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
ierr_c = PMPIX_Neighbor_allgather_init(sendbuf,
|
||||
OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype,
|
||||
recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
c_recvtype, c_comm, c_info, &c_req);
|
||||
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c);
|
||||
|
||||
if (MPI_SUCCESS == ierr_c) *request = PMPI_Request_c2f(c_req);
|
||||
}
|
113
ompi/mpiext/pcollreq/mpif-h/neighbor_allgatherv_init_f.c
Обычный файл
113
ompi/mpiext/pcollreq/mpif-h/neighbor_allgatherv_init_f.c
Обычный файл
@ -0,0 +1,113 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_NEIGHBOR_ALLGATHERV_INIT = ompix_neighbor_allgatherv_init_f
|
||||
#pragma weak pmpix_neighbor_allgatherv_init = ompix_neighbor_allgatherv_init_f
|
||||
#pragma weak pmpix_neighbor_allgatherv_init_ = ompix_neighbor_allgatherv_init_f
|
||||
#pragma weak pmpix_neighbor_allgatherv_init__ = ompix_neighbor_allgatherv_init_f
|
||||
|
||||
#pragma weak PMPIX_Neighbor_allgatherv_init_f = ompix_neighbor_allgatherv_init_f
|
||||
#pragma weak PMPIX_Neighbor_allgatherv_init_f08 = ompix_neighbor_allgatherv_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_NEIGHBOR_ALLGATHERV_INIT,
|
||||
pmpix_neighbor_allgatherv_init,
|
||||
pmpix_neighbor_allgatherv_init_,
|
||||
pmpix_neighbor_allgatherv_init__,
|
||||
pompix_neighbor_allgatherv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_NEIGHBOR_ALLGATHERV_INIT = ompix_neighbor_allgatherv_init_f
|
||||
#pragma weak mpix_neighbor_allgatherv_init = ompix_neighbor_allgatherv_init_f
|
||||
#pragma weak mpix_neighbor_allgatherv_init_ = ompix_neighbor_allgatherv_init_f
|
||||
#pragma weak mpix_neighbor_allgatherv_init__ = ompix_neighbor_allgatherv_init_f
|
||||
|
||||
#pragma weak MPIX_Neighbor_allgatherv_init_f = ompix_neighbor_allgatherv_init_f
|
||||
#pragma weak MPIX_Neighbor_allgatherv_init_f08 = ompix_neighbor_allgatherv_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_NEIGHBOR_ALLGATHERV_INIT,
|
||||
mpix_neighbor_allgatherv_init,
|
||||
mpix_neighbor_allgatherv_init_,
|
||||
mpix_neighbor_allgatherv_init__,
|
||||
ompix_neighbor_allgatherv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_neighbor_allgatherv_init_f pompix_neighbor_allgatherv_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_neighbor_allgatherv_init_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *displs,
|
||||
MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
int size, ierr_c;
|
||||
OMPI_ARRAY_NAME_DECL(recvcounts);
|
||||
OMPI_ARRAY_NAME_DECL(displs);
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
PMPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
ierr_c = PMPIX_Neighbor_allgatherv_init(sendbuf,
|
||||
OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype,
|
||||
recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(displs),
|
||||
c_recvtype, c_comm, c_info, &c_request);
|
||||
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(ierr_c);
|
||||
if (MPI_SUCCESS == ierr_c) *request = PMPI_Request_c2f(c_request);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(recvcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(displs);
|
||||
}
|
102
ompi/mpiext/pcollreq/mpif-h/neighbor_alltoall_init_f.c
Обычный файл
102
ompi/mpiext/pcollreq/mpif-h/neighbor_alltoall_init_f.c
Обычный файл
@ -0,0 +1,102 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_NEIGHBOR_ALLTOALL = ompix_neighbor_alltoall_init_f
|
||||
#pragma weak pmpix_neighbor_alltoall_init = ompix_neighbor_alltoall_init_f
|
||||
#pragma weak pmpix_neighbor_alltoall_init_ = ompix_neighbor_alltoall_init_f
|
||||
#pragma weak pmpix_neighbor_alltoall_init__ = ompix_neighbor_alltoall_init_f
|
||||
|
||||
#pragma weak PMPIX_Neighbor_alltoall_init_f = ompix_neighbor_alltoall_init_f
|
||||
#pragma weak PMPIX_Neighbor_alltoall_init_f08 = ompix_neighbor_alltoall_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_NEIGHBOR_ALLTOALL,
|
||||
pmpix_neighbor_alltoall_init,
|
||||
pmpix_neighbor_alltoall_init_,
|
||||
pmpix_neighbor_alltoall_init__,
|
||||
pompix_neighbor_alltoall_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_NEIGHBOR_ALLTOALL = ompix_neighbor_alltoall_init_f
|
||||
#pragma weak mpix_neighbor_alltoall_init = ompix_neighbor_alltoall_init_f
|
||||
#pragma weak mpix_neighbor_alltoall_init_ = ompix_neighbor_alltoall_init_f
|
||||
#pragma weak mpix_neighbor_alltoall_init__ = ompix_neighbor_alltoall_init_f
|
||||
|
||||
#pragma weak MPIX_Neighbor_alltoall_init_f = ompix_neighbor_alltoall_init_f
|
||||
#pragma weak MPIX_Neighbor_alltoall_init_f08 = ompix_neighbor_alltoall_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_NEIGHBOR_ALLTOALL,
|
||||
mpix_neighbor_alltoall_init,
|
||||
mpix_neighbor_alltoall_init_,
|
||||
mpix_neighbor_alltoall_init__,
|
||||
ompix_neighbor_alltoall_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_neighbor_alltoall_init_f pompix_neighbor_alltoall_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_neighbor_alltoall_init_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype,
|
||||
MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_req;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Neighbor_alltoall_init(sendbuf,
|
||||
OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype,
|
||||
recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
c_recvtype, c_comm, c_info, &c_req);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_req);
|
||||
}
|
119
ompi/mpiext/pcollreq/mpif-h/neighbor_alltoallv_init_f.c
Обычный файл
119
ompi/mpiext/pcollreq/mpif-h/neighbor_alltoallv_init_f.c
Обычный файл
@ -0,0 +1,119 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_NEIGHBOR_ALLTOALLV_INIT = ompix_neighbor_alltoallv_init_f
|
||||
#pragma weak pmpix_neighbor_alltoallv_init = ompix_neighbor_alltoallv_init_f
|
||||
#pragma weak pmpix_neighbor_alltoallv_init_ = ompix_neighbor_alltoallv_init_f
|
||||
#pragma weak pmpix_neighbor_alltoallv_init__ = ompix_neighbor_alltoallv_init_f
|
||||
|
||||
#pragma weak PMPIX_Neighbor_alltoallv_init_f = ompix_neighbor_alltoallv_init_f
|
||||
#pragma weak PMPIX_Neighbor_alltoallv_init_f08 = ompix_neighbor_alltoallv_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_NEIGHBOR_ALLTOALLV_INIT,
|
||||
pmpix_neighbor_alltoallv_init,
|
||||
pmpix_neighbor_alltoallv_init_,
|
||||
pmpix_neighbor_alltoallv_init__,
|
||||
pompix_neighbor_alltoallv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_NEIGHBOR_ALLTOALLV_INIT = ompix_neighbor_alltoallv_init_f
|
||||
#pragma weak mpix_neighbor_alltoallv_init = ompix_neighbor_alltoallv_init_f
|
||||
#pragma weak mpix_neighbor_alltoallv_init_ = ompix_neighbor_alltoallv_init_f
|
||||
#pragma weak mpix_neighbor_alltoallv_init__ = ompix_neighbor_alltoallv_init_f
|
||||
|
||||
#pragma weak MPIX_Neighbor_alltoallv_init_f = ompix_neighbor_alltoallv_init_f
|
||||
#pragma weak MPIX_Neighbor_alltoallv_init_f08 = ompix_neighbor_alltoallv_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_NEIGHBOR_ALLTOALLV_INIT,
|
||||
mpix_neighbor_alltoallv_init,
|
||||
mpix_neighbor_alltoallv_init_,
|
||||
mpix_neighbor_alltoallv_init__,
|
||||
ompix_neighbor_alltoallv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *rdispls, MPI_Fint *recvtype, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_neighbor_alltoallv_init_f pompix_neighbor_alltoallv_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_neighbor_alltoallv_init_f(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls,
|
||||
MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcounts,
|
||||
MPI_Fint *rdispls, MPI_Fint *recvtype,
|
||||
MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
int size, c_ierr;
|
||||
OMPI_ARRAY_NAME_DECL(sendcounts);
|
||||
OMPI_ARRAY_NAME_DECL(sdispls);
|
||||
OMPI_ARRAY_NAME_DECL(recvcounts);
|
||||
OMPI_ARRAY_NAME_DECL(rdispls);
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
PMPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(sendcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(sdispls, size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(rdispls, size);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Neighbor_alltoallv_init(sendbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(sendcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(sdispls),
|
||||
c_sendtype,
|
||||
recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(rdispls),
|
||||
c_recvtype, c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(sendcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(sdispls);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(recvcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(rdispls);
|
||||
}
|
123
ompi/mpiext/pcollreq/mpif-h/neighbor_alltoallw_init_f.c
Обычный файл
123
ompi/mpiext/pcollreq/mpif-h/neighbor_alltoallw_init_f.c
Обычный файл
@ -0,0 +1,123 @@
|
||||
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_NEIGHBOR_ALLTOALLW_INIT = ompix_neighbor_alltoallw_init_f
|
||||
#pragma weak pmpix_neighbor_alltoallw_init = ompix_neighbor_alltoallw_init_f
|
||||
#pragma weak pmpix_neighbor_alltoallw_init_ = ompix_neighbor_alltoallw_init_f
|
||||
#pragma weak pmpix_neighbor_alltoallw_init__ = ompix_neighbor_alltoallw_init_f
|
||||
|
||||
#pragma weak PMPIX_Neighbor_alltoallw_init_f = ompix_neighbor_alltoallw_init_f
|
||||
#pragma weak PMPIX_Neighbor_alltoallw_init_f08 = ompix_neighbor_alltoallw_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_NEIGHBOR_ALLTOALLW_INIT,
|
||||
pmpix_neighbor_alltoallw_init,
|
||||
pmpix_neighbor_alltoallw_init_,
|
||||
pmpix_neighbor_alltoallw_init__,
|
||||
pompix_neighbor_alltoallw_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcounts, MPI_Aint *sdispls, MPI_Fint *sendtypes, char *recvbuf, MPI_Fint *recvcounts, MPI_Aint *rdispls, MPI_Fint *recvtypes, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_NEIGHBOR_ALLTOALLW_INIT = ompix_neighbor_alltoallw_init_f
|
||||
#pragma weak mpix_neighbor_alltoallw_init = ompix_neighbor_alltoallw_init_f
|
||||
#pragma weak mpix_neighbor_alltoallw_init_ = ompix_neighbor_alltoallw_init_f
|
||||
#pragma weak mpix_neighbor_alltoallw_init__ = ompix_neighbor_alltoallw_init_f
|
||||
|
||||
#pragma weak MPIX_Neighbor_alltoallw_init_f = ompix_neighbor_alltoallw_init_f
|
||||
#pragma weak MPIX_Neighbor_alltoallw_init_f08 = ompix_neighbor_alltoallw_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_NEIGHBOR_ALLTOALLW_INIT,
|
||||
mpix_neighbor_alltoallw_init,
|
||||
mpix_neighbor_alltoallw_init_,
|
||||
mpix_neighbor_alltoallw_init__,
|
||||
ompix_neighbor_alltoallw_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcounts, MPI_Aint *sdispls, MPI_Fint *sendtypes, char *recvbuf, MPI_Fint *recvcounts, MPI_Aint *rdispls, MPI_Fint *recvtypes, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_neighbor_alltoallw_init_f pompix_neighbor_alltoallw_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_neighbor_alltoallw_init_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
MPI_Aint *sdispls, MPI_Fint *sendtypes,
|
||||
char *recvbuf, MPI_Fint *recvcounts,
|
||||
MPI_Aint *rdispls, MPI_Fint *recvtypes,
|
||||
MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype *c_sendtypes, *c_recvtypes;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
int size, c_ierr;
|
||||
OMPI_ARRAY_NAME_DECL(sendcounts);
|
||||
OMPI_ARRAY_NAME_DECL(recvcounts);
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
PMPI_Comm_size(c_comm, &size);
|
||||
|
||||
c_sendtypes = (MPI_Datatype *) malloc(size * sizeof(MPI_Datatype));
|
||||
c_recvtypes = (MPI_Datatype *) malloc(size * sizeof(MPI_Datatype));
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT(sendcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
|
||||
while (size > 0) {
|
||||
c_sendtypes[size - 1] = PMPI_Type_f2c(sendtypes[size - 1]);
|
||||
c_recvtypes[size - 1] = PMPI_Type_f2c(recvtypes[size - 1]);
|
||||
--size;
|
||||
}
|
||||
|
||||
/* Neighbor_alltoallw_init does not support MPI_IN_PLACE */
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Neighbor_alltoallw_init(sendbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(sendcounts),
|
||||
sdispls,
|
||||
c_sendtypes,
|
||||
recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
rdispls,
|
||||
c_recvtypes, c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(sendcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(recvcounts);
|
||||
free(c_sendtypes);
|
||||
free(c_recvtypes);
|
||||
}
|
80
ompi/mpiext/pcollreq/mpif-h/profile/Makefile.am
Обычный файл
80
ompi/mpiext/pcollreq/mpif-h/profile/Makefile.am
Обычный файл
@ -0,0 +1,80 @@
|
||||
#
|
||||
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2011 Oak Ridge National Labs. All rights reserved.
|
||||
# Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2018 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# This file builds the mpif.h-based bindings for MPI extensions. It
|
||||
# is optional in MPI extensions.
|
||||
|
||||
# We must set these #defines so that the inner OMPI MPI prototype
|
||||
# header files do the Right Thing.
|
||||
AM_CPPFLAGS = -DOMPI_BUILD_MPI_PROFILING=1 -DOMPI_COMPILING_FORTRAN_WRAPPERS=1
|
||||
|
||||
# Note that the mpif.h-based bindings are optional -- they can only be
|
||||
# built if OMPI is also building the Fortran-based bindings. So we
|
||||
# initially set some Makefile macros to empty, and then conditionally
|
||||
# add to them later.
|
||||
noinst_LTLIBRARIES =
|
||||
|
||||
# Directory where the header file to be included in mpif-ext.h must be
|
||||
# installed.
|
||||
ompidir = $(ompiincludedir)/ompi/mpiext/pcollreq/mpif-h
|
||||
|
||||
# Just like noinst_LTLIBRARIES, set this macro to empty and
|
||||
# conditionally add to it later.
|
||||
ompi_HEADERS =
|
||||
|
||||
# Use the Automake conditional to know if we're building the mpif.h
|
||||
# bindings.
|
||||
if OMPI_BUILD_FORTRAN_MPIFH_BINDINGS
|
||||
|
||||
# If we are, build the convenience libtool library that will be
|
||||
# slurped up into libmpi_mpifh.la.
|
||||
noinst_LTLIBRARIES += libpmpiext_pcollreq_mpifh.la
|
||||
|
||||
# Sources for the convenience libtool library.
|
||||
nodist_libpmpiext_pcollreq_mpifh_la_SOURCES = \
|
||||
pallgather_init_f.c \
|
||||
pallgatherv_init_f.c \
|
||||
pallreduce_init_f.c \
|
||||
palltoall_init_f.c \
|
||||
palltoallv_init_f.c \
|
||||
palltoallw_init_f.c \
|
||||
pbarrier_init_f.c \
|
||||
pbcast_init_f.c \
|
||||
pexscan_init_f.c \
|
||||
pgather_init_f.c \
|
||||
pgatherv_init_f.c \
|
||||
preduce_init_f.c \
|
||||
preduce_scatter_init_f.c \
|
||||
preduce_scatter_block_init_f.c \
|
||||
pscan_init_f.c \
|
||||
pscatter_init_f.c \
|
||||
pscatterv_init_f.c \
|
||||
\
|
||||
pneighbor_allgather_init_f.c \
|
||||
pneighbor_allgatherv_init_f.c \
|
||||
pneighbor_alltoall_init_f.c \
|
||||
pneighbor_alltoallv_init_f.c \
|
||||
pneighbor_alltoallw_init_f.c
|
||||
|
||||
#
|
||||
# Sym link in the sources from the real MPI directory
|
||||
#
|
||||
$(nodist_libpmpiext_pcollreq_mpifh_la_SOURCES):
|
||||
$(OMPI_V_LN_S) if test ! -r $@ ; then \
|
||||
pname=`echo $@ | cut -b '2-'` ; \
|
||||
$(LN_S) $(top_srcdir)/ompi/mpiext/pcollreq/mpif-h/$$pname $@ ; \
|
||||
fi
|
||||
|
||||
endif
|
99
ompi/mpiext/pcollreq/mpif-h/reduce_init_f.c
Обычный файл
99
ompi/mpiext/pcollreq/mpif-h/reduce_init_f.c
Обычный файл
@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_REDUCE_INIT = ompix_reduce_init_f
|
||||
#pragma weak pmpix_reduce_init = ompix_reduce_init_f
|
||||
#pragma weak pmpix_reduce_init_ = ompix_reduce_init_f
|
||||
#pragma weak pmpix_reduce_init__ = ompix_reduce_init_f
|
||||
|
||||
#pragma weak PMPIX_Reduce_init_f = ompix_reduce_init_f
|
||||
#pragma weak PMPIX_Reduce_init_f08 = ompix_reduce_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_REDUCE_INIT,
|
||||
pmpix_reduce_init,
|
||||
pmpix_reduce_init_,
|
||||
pmpix_reduce_init__,
|
||||
pompix_reduce_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, count, datatype, op, root, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_REDUCE_INIT = ompix_reduce_init_f
|
||||
#pragma weak mpix_reduce_init = ompix_reduce_init_f
|
||||
#pragma weak mpix_reduce_init_ = ompix_reduce_init_f
|
||||
#pragma weak mpix_reduce_init__ = ompix_reduce_init_f
|
||||
|
||||
#pragma weak MPIX_Reduce_init_f = ompix_reduce_init_f
|
||||
#pragma weak MPIX_Reduce_init_f08 = ompix_reduce_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_REDUCE_INIT,
|
||||
mpix_reduce_init,
|
||||
mpix_reduce_init_,
|
||||
mpix_reduce_init__,
|
||||
ompix_reduce_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, count, datatype, op, root, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_reduce_init_f pompix_reduce_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_reduce_init_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
MPI_Fint *datatype, MPI_Fint *op,
|
||||
MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Datatype c_type;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
MPI_Op c_op;
|
||||
MPI_Comm c_comm;
|
||||
|
||||
c_type = PMPI_Type_f2c(*datatype);
|
||||
c_op = PMPI_Op_f2c(*op);
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Reduce_init(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_op,
|
||||
OMPI_FINT_2_INT(*root),
|
||||
c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
}
|
100
ompi/mpiext/pcollreq/mpif-h/reduce_scatter_block_init_f.c
Обычный файл
100
ompi/mpiext/pcollreq/mpif-h/reduce_scatter_block_init_f.c
Обычный файл
@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_REDUCE_SCATTER_BLOCK_INIT = ompix_reduce_scatter_block_init_f
|
||||
#pragma weak pmpix_reduce_scatter_block_init = ompix_reduce_scatter_block_init_f
|
||||
#pragma weak pmpix_reduce_scatter_block_init_ = ompix_reduce_scatter_block_init_f
|
||||
#pragma weak pmpix_reduce_scatter_block_init__ = ompix_reduce_scatter_block_init_f
|
||||
|
||||
#pragma weak PMPIX_Reduce_scatter_block_init_f = ompix_reduce_scatter_block_init_f
|
||||
#pragma weak PMPIX_Reduce_scatter_block_init_f08 = ompix_reduce_scatter_block_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_REDUCE_SCATTER_BLOCK_INIT,
|
||||
pmpix_reduce_scatter_block_init,
|
||||
pmpix_reduce_scatter_block_init_,
|
||||
pmpix_reduce_scatter_block_init__,
|
||||
pompix_reduce_scatter_block_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_REDUCE_SCATTER_BLOCK_INIT = ompix_reduce_scatter_block_init_f
|
||||
#pragma weak mpix_reduce_scatter_block_init = ompix_reduce_scatter_block_init_f
|
||||
#pragma weak mpix_reduce_scatter_block_init_ = ompix_reduce_scatter_block_init_f
|
||||
#pragma weak mpix_reduce_scatter_block_init__ = ompix_reduce_scatter_block_init_f
|
||||
|
||||
#pragma weak MPIX_Reduce_scatter_block_init_f = ompix_reduce_scatter_block_init_f
|
||||
#pragma weak MPIX_Reduce_scatter_block_init_f08 = ompix_reduce_scatter_block_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_REDUCE_SCATTER_BLOCK_INIT,
|
||||
mpix_reduce_scatter_block_init,
|
||||
mpix_reduce_scatter_block_init_,
|
||||
mpix_reduce_scatter_block_init__,
|
||||
ompix_reduce_scatter_block_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_reduce_scatter_block_init_f pompix_reduce_scatter_block_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_reduce_scatter_block_init_f(char *sendbuf, char *recvbuf,
|
||||
MPI_Fint *recvcount, MPI_Fint *datatype,
|
||||
MPI_Fint *op, MPI_Fint *comm,
|
||||
MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_type;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
MPI_Op c_op;
|
||||
int size;
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_type = PMPI_Type_f2c(*datatype);
|
||||
c_op = PMPI_Op_f2c(*op);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
PMPI_Comm_size(c_comm, &size);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Reduce_scatter_block_init(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
c_type, c_op, c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
}
|
102
ompi/mpiext/pcollreq/mpif-h/reduce_scatter_init_f.c
Обычный файл
102
ompi/mpiext/pcollreq/mpif-h/reduce_scatter_init_f.c
Обычный файл
@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_REDUCE_SCATTER_INIT = ompix_reduce_scatter_init_f
|
||||
#pragma weak pmpix_reduce_scatter_init = ompix_reduce_scatter_init_f
|
||||
#pragma weak pmpix_reduce_scatter_init_ = ompix_reduce_scatter_init_f
|
||||
#pragma weak pmpix_reduce_scatter_init__ = ompix_reduce_scatter_init_f
|
||||
|
||||
#pragma weak PMPIX_Reduce_scatter_init_f = ompix_reduce_scatter_init_f
|
||||
#pragma weak PMPIX_Reduce_scatter_init_f08 = ompix_reduce_scatter_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_REDUCE_SCATTER_INIT,
|
||||
pmpix_reduce_scatter_init,
|
||||
pmpix_reduce_scatter_init_,
|
||||
pmpix_reduce_scatter_init__,
|
||||
pompix_reduce_scatter_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_REDUCE_SCATTER_INIT = ompix_reduce_scatter_init_f
|
||||
#pragma weak mpix_reduce_scatter_init = ompix_reduce_scatter_init_f
|
||||
#pragma weak mpix_reduce_scatter_init_ = ompix_reduce_scatter_init_f
|
||||
#pragma weak mpix_reduce_scatter_init__ = ompix_reduce_scatter_init_f
|
||||
|
||||
#pragma weak MPIX_Reduce_scatter_init_f = ompix_reduce_scatter_init_f
|
||||
#pragma weak MPIX_Reduce_scatter_init_f08 = ompix_reduce_scatter_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_REDUCE_SCATTER_INIT,
|
||||
mpix_reduce_scatter_init,
|
||||
mpix_reduce_scatter_init_,
|
||||
mpix_reduce_scatter_init__,
|
||||
ompix_reduce_scatter_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *recvcounts, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, recvcounts, datatype, op, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_reduce_scatter_init_f pompix_reduce_scatter_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_reduce_scatter_init_f(char *sendbuf, char *recvbuf,
|
||||
MPI_Fint *recvcounts, MPI_Fint *datatype,
|
||||
MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_type;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
MPI_Op c_op;
|
||||
int size;
|
||||
OMPI_ARRAY_NAME_DECL(recvcounts);
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_type = PMPI_Type_f2c(*datatype);
|
||||
c_op = PMPI_Op_f2c(*op);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
PMPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Reduce_scatter_init(sendbuf, recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
c_type, c_op, c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
}
|
97
ompi/mpiext/pcollreq/mpif-h/scan_init_f.c
Обычный файл
97
ompi/mpiext/pcollreq/mpif-h/scan_init_f.c
Обычный файл
@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_SCAN_INIT = ompix_scan_init_f
|
||||
#pragma weak pmpix_scan_init = ompix_scan_init_f
|
||||
#pragma weak pmpix_scan_init_ = ompix_scan_init_f
|
||||
#pragma weak pmpix_scan_init__ = ompix_scan_init_f
|
||||
|
||||
#pragma weak PMPIX_Scan_init_f = ompix_scan_init_f
|
||||
#pragma weak PMPIX_Scan_init_f08 = ompix_scan_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_SCAN_INIT,
|
||||
pmpix_scan_init,
|
||||
pmpix_scan_init_,
|
||||
pmpix_scan_init__,
|
||||
pompix_scan_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_SCAN_INIT = ompix_scan_init_f
|
||||
#pragma weak mpix_scan_init = ompix_scan_init_f
|
||||
#pragma weak mpix_scan_init_ = ompix_scan_init_f
|
||||
#pragma weak mpix_scan_init__ = ompix_scan_init_f
|
||||
|
||||
#pragma weak MPIX_Scan_init_f = ompix_scan_init_f
|
||||
#pragma weak MPIX_Scan_init_f08 = ompix_scan_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_SCAN_INIT,
|
||||
mpix_scan_init,
|
||||
mpix_scan_init_,
|
||||
mpix_scan_init__,
|
||||
ompix_scan_init_f,
|
||||
(char *sendbuf, char *recvbuf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, recvbuf, count, datatype, op, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_scan_init_f pompix_scan_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_scan_init_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
MPI_Fint *datatype, MPI_Fint *op, MPI_Fint *comm,
|
||||
MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_type;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
MPI_Op c_op;
|
||||
|
||||
c_type = PMPI_Type_f2c(*datatype);
|
||||
c_op = PMPI_Op_f2c(*op);
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Scan_init(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
c_type, c_op,
|
||||
c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
}
|
98
ompi/mpiext/pcollreq/mpif-h/scatter_init_f.c
Обычный файл
98
ompi/mpiext/pcollreq/mpif-h/scatter_init_f.c
Обычный файл
@ -0,0 +1,98 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_SCATTER_INIT = ompix_scatter_init_f
|
||||
#pragma weak pmpix_scatter_init = ompix_scatter_init_f
|
||||
#pragma weak pmpix_scatter_init_ = ompix_scatter_init_f
|
||||
#pragma weak pmpix_scatter_init__ = ompix_scatter_init_f
|
||||
|
||||
#pragma weak PMPIX_Scatter_init_f = ompix_scatter_init_f
|
||||
#pragma weak PMPIX_Scatter_init_f08 = ompix_scatter_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_SCATTER_INIT,
|
||||
pmpix_scatter_init,
|
||||
pmpix_scatter_init_,
|
||||
pmpix_scatter_init__,
|
||||
pompix_scatter_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_SCATTER_INIT = ompix_scatter_init_f
|
||||
#pragma weak mpix_scatter_init = ompix_scatter_init_f
|
||||
#pragma weak mpix_scatter_init_ = ompix_scatter_init_f
|
||||
#pragma weak mpix_scatter_init__ = ompix_scatter_init_f
|
||||
|
||||
#pragma weak MPIX_Scatter_init_f = ompix_scatter_init_f
|
||||
#pragma weak MPIX_Scatter_init_f08 = ompix_scatter_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_SCATTER_INIT,
|
||||
mpix_scatter_init,
|
||||
mpix_scatter_init_,
|
||||
mpix_scatter_init__,
|
||||
ompix_scatter_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_scatter_init_f pompix_scatter_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_scatter_init_f(char *sendbuf, MPI_Fint *sendcount,
|
||||
MPI_Fint *sendtype, char *recvbuf,
|
||||
MPI_Fint *recvcount, MPI_Fint *recvtype,
|
||||
MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request,
|
||||
MPI_Fint *ierr)
|
||||
{
|
||||
int c_ierr;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
MPI_Comm c_comm = PMPI_Comm_f2c(*comm);
|
||||
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_IN_PLACE(recvbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Scatter_init(sendbuf,OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
c_recvtype,
|
||||
OMPI_FINT_2_INT(*root), c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
}
|
110
ompi/mpiext/pcollreq/mpif-h/scatterv_init_f.c
Обычный файл
110
ompi/mpiext/pcollreq/mpif-h/scatterv_init_f.c
Обычный файл
@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include "ompi/mpi/fortran/mpif-h/bindings.h"
|
||||
#include "ompi/mpi/fortran/base/constants.h"
|
||||
#include "ompi/mpiext/pcollreq/mpif-h/mpiext_pcollreq_prototypes.h"
|
||||
|
||||
#if OMPI_BUILD_MPI_PROFILING
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPIX_SCATTERV_INIT = ompix_scatterv_init_f
|
||||
#pragma weak pmpix_scatterv_init = ompix_scatterv_init_f
|
||||
#pragma weak pmpix_scatterv_init_ = ompix_scatterv_init_f
|
||||
#pragma weak pmpix_scatterv_init__ = ompix_scatterv_init_f
|
||||
|
||||
#pragma weak PMPIX_Scatterv_init_f = ompix_scatterv_init_f
|
||||
#pragma weak PMPIX_Scatterv_init_f08 = ompix_scatterv_init_f
|
||||
#else
|
||||
OMPI_GENERATE_F77_BINDINGS (PMPIX_SCATTERV_INIT,
|
||||
pmpix_scatterv_init,
|
||||
pmpix_scatterv_init_,
|
||||
pmpix_scatterv_init__,
|
||||
pompix_scatterv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *displs, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierr) )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if OPAL_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak MPIX_SCATTERV_INIT = ompix_scatterv_init_f
|
||||
#pragma weak mpix_scatterv_init = ompix_scatterv_init_f
|
||||
#pragma weak mpix_scatterv_init_ = ompix_scatterv_init_f
|
||||
#pragma weak mpix_scatterv_init__ = ompix_scatterv_init_f
|
||||
|
||||
#pragma weak MPIX_Scatterv_init_f = ompix_scatterv_init_f
|
||||
#pragma weak MPIX_Scatterv_init_f08 = ompix_scatterv_init_f
|
||||
#else
|
||||
#if ! OMPI_BUILD_MPI_PROFILING
|
||||
OMPI_GENERATE_F77_BINDINGS (MPIX_SCATTERV_INIT,
|
||||
mpix_scatterv_init,
|
||||
mpix_scatterv_init_,
|
||||
mpix_scatterv_init__,
|
||||
ompix_scatterv_init_f,
|
||||
(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *displs, MPI_Fint *sendtype, char *recvbuf, MPI_Fint *recvcount, MPI_Fint *recvtype, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr),
|
||||
(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, info, request, ierr) )
|
||||
#else
|
||||
#define ompix_scatterv_init_f pompix_scatterv_init_f
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
void ompix_scatterv_init_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
MPI_Fint *displs, MPI_Fint *sendtype,
|
||||
char *recvbuf, MPI_Fint *recvcount,
|
||||
MPI_Fint *recvtype, MPI_Fint *root,
|
||||
MPI_Fint *comm, MPI_Fint *info, MPI_Fint *request, MPI_Fint *ierr)
|
||||
{
|
||||
MPI_Comm c_comm;
|
||||
MPI_Datatype c_sendtype, c_recvtype;
|
||||
MPI_Info c_info;
|
||||
MPI_Request c_request;
|
||||
int size, c_ierr;
|
||||
OMPI_ARRAY_NAME_DECL(sendcounts);
|
||||
OMPI_ARRAY_NAME_DECL(displs);
|
||||
|
||||
c_comm = PMPI_Comm_f2c(*comm);
|
||||
c_sendtype = PMPI_Type_f2c(*sendtype);
|
||||
c_recvtype = PMPI_Type_f2c(*recvtype);
|
||||
c_info = PMPI_Info_f2c(*info);
|
||||
|
||||
PMPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(sendcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_IN_PLACE(recvbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
c_ierr = PMPIX_Scatterv_init(sendbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(sendcounts),
|
||||
OMPI_ARRAY_NAME_CONVERT(displs),
|
||||
c_sendtype, recvbuf,
|
||||
OMPI_FINT_2_INT(*recvcount),
|
||||
c_recvtype,
|
||||
OMPI_FINT_2_INT(*root), c_comm, c_info, &c_request);
|
||||
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
|
||||
if (MPI_SUCCESS == c_ierr) *request = PMPI_Request_c2f(c_request);
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(sendcounts);
|
||||
OMPI_ARRAY_FINT_2_INT_CLEANUP(displs);
|
||||
}
|
Загрузка…
x
Ссылка в новой задаче
Block a user