1
1
openmpi/ompi/mpi/f77/base/conversion_fn_null_f.c
Jeff Squyres 477cdb0b62 Had to abondon the first approach from r19040: it caused problems with
"make distclean".  It's not clear whether it's an Automake bug or
whether what I did simply is not supported (I've got pending mail into
Ralf W. asking about it).  The short version is that during "make
distclean", ompi/mpi/f77/Makefile would rm -rf ompi/mpi/f77/.deps.
But ompi/Makefile still include's some .Plo files from that directory,
so Bad Things happened when "make distclean" unrolled from the
ompi/mpi/f77 dir back up to the ompi/ dir.

So I went with George's original suggestion and moved the f77 "base"
files in question into a new directory: ompi/mpi/f77/base and put a
Makefile.include in there.  That way, this directory is not traversed
twice by distclean, and .deps is only removed when it is supposed to
be.  Maybe we'll be able to do it a little better someday, but that's
the way it is now.

I'll check this with a fresh checkout once this is committed to SVN as
well; some of these kinds of problems don't show up until you do a
build from a completely fresh SVN checkout.

This commit was SVN r19054.

The following SVN revision numbers were found above:
  r19040 --> open-mpi/ompi@9f4d4c4312
2008-07-26 20:38:30 +00:00

73 строки
3.1 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"
#include "ompi/mpi/f77/bindings.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
#endif
#if ! OMPI_HAVE_WEAK_SYMBOLS && ! OMPI_PROFILE_LAYER
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);
}