
This commit brings over all the work from the /tmp-public/datarep branch. See commits r16855, r16859, r16860 for the highlights of what was done. This commit was SVN r16891. The following SVN revisions from the original message are invalid or inconsistent and therefore were not cross-referenced: r16855 r16859 r16860 The following Trac tickets were found above: Ticket 1029 --> https://svn.open-mpi.org/trac/ompi/ticket/1029
72 строки
3.0 KiB
C
72 строки
3.0 KiB
C
/*
|
|
* Copyright (c) 2004-2007 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) 2007 Cisco Systems, Inc. All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
/*
|
|
* This file defines the 5 back-end functions for Fortran's version of
|
|
* MPI_CONVERSION_FN_NULL. These functions will never be invoked, but
|
|
* are rather used as sentinel values by the Fortran
|
|
* MPI_REGISTER_DATAREP function. However, given the way Fortran
|
|
* sentinel values have to be handled (4 versions for the 4 different
|
|
* symbol conventions), and given that these symbols must be the same
|
|
* size as a function pointer (because the user could pass either
|
|
* MPI_REGISTER_DATAREP *or* a real function), it just seemed either
|
|
* to use the normal mechanisms we already have in place for Fortran
|
|
* bindings and sentinel values -- even though it's a bit overkill
|
|
* (e.g., the back-end mpi_conversion_fn_null_f function will never be
|
|
* used for anything).
|
|
*
|
|
* See also the comments in ompi/mpi/f77/datarep.h.
|
|
*/
|
|
|
|
#include "ompi_config.h"
|
|
|
|
#include "ompi/mpi/f77/datarep.h"
|
|
#include "ompi/mpi/f77/fint_2_int.h"
|
|
|
|
|
|
#if OMPI_HAVE_WEAK_SYMBOLS
|
|
#pragma weak MPI_CONVERSION_FN_NULL = mpi_conversion_fn_null_f
|
|
#pragma weak mpi_conversion_fn_null = mpi_conversion_fn_null_f
|
|
#pragma weak mpi_conversion_fn_null_ = mpi_conversion_fn_null_f
|
|
#pragma weak mpi_conversion_fn_null__ = mpi_conversion_fn_null_f
|
|
|
|
#else
|
|
OMPI_GENERATE_F77_BINDINGS(MPI_CONVERSION_FN_NULL,
|
|
mpi_conversion_fn_null,
|
|
mpi_conversion_fn_null_,
|
|
mpi_conversion_fn_null__,
|
|
mpi_conversion_fn_null_f,
|
|
(char *userbuf, MPI_Fint *datatype, MPI_Fint *count, char *filebuf, MPI_Offset *position, MPI_Aint *extra_state, MPI_Fint *ierr),
|
|
(userbuf, datatype, count, filebuf, position, extra_state, ierr)
|
|
#endif
|
|
|
|
|
|
void mpi_conversion_fn_null_f(char *userbuf, MPI_Fint *datatype,
|
|
MPI_Fint *count, char *filebuf,
|
|
MPI_Offset *position,
|
|
MPI_Aint *extra_state,
|
|
MPI_Fint *ierr)
|
|
{
|
|
/* Per MPI-2:9.5.3, this function will never be called; it's only
|
|
used as a sentinel value for comparison. But we need to put
|
|
something here so that the compiler/linker doesn't optimize it
|
|
out. */
|
|
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
|
|
}
|