1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */ 2 /* 3 * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana 4 * University Research and Technology 5 * Corporation. All rights reserved. 6 * Copyright (c) 2004-2005 The University of Tennessee and The University 7 * of Tennessee Research Foundation. All rights 8 * reserved. 9 * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, 10 * University of Stuttgart. All rights reserved. 11 * Copyright (c) 2004-2005 The Regents of the University of California. 12 * All rights reserved. 13 * Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved. 14 * Copyright (c) 2015 Los Alamos National Security, LLC. All rights 15 * reserved. 16 * Copyright (c) 2015 Research Organization for Information Science 17 * and Technology (RIST). All rights reserved. 18 * $COPYRIGHT$ 19 * 20 * Additional copyrights may follow 21 * 22 * $HEADER$ 23 */ 24 25 #include "ompi_config.h" 26 27 #include "ompi/mpi/fortran/mpif-h/bindings.h" 28 29 /* The OMPI_GENERATE_F77_BINDINGS work only for the most common F77 bindings, the 30 * one that does not return any value. There are 4 exceptions MPI_Wtick, MPI_Wtime, 31 * MPI_Aint_add, and MPI_Aint_diff. For these 4 we can insert the bindings 32 * manually. 33 */ 34 #if OMPI_BUILD_MPI_PROFILING 35 #if OPAL_HAVE_WEAK_SYMBOLS 36 #pragma weak PMPI_WTIME = ompi_wtime_f 37 #pragma weak pmpi_wtime = ompi_wtime_f 38 #pragma weak pmpi_wtime_ = ompi_wtime_f 39 #pragma weak pmpi_wtime__ = ompi_wtime_f 40 41 #pragma weak PMPI_Wtime_f = ompi_wtime_f 42 #pragma weak PMPI_Wtime_f08 = ompi_wtime_f 43 #else PMPI_WTIME(void)44double PMPI_WTIME(void) { return pompi_wtime_f(); } pmpi_wtime(void)45double pmpi_wtime(void) { return pompi_wtime_f(); } pmpi_wtime_(void)46double pmpi_wtime_(void) { return pompi_wtime_f(); } pmpi_wtime__(void)47double pmpi_wtime__(void) { return pompi_wtime_f(); } 48 #endif 49 #endif 50 51 #if OPAL_HAVE_WEAK_SYMBOLS 52 #pragma weak MPI_WTIME = ompi_wtime_f 53 #pragma weak mpi_wtime = ompi_wtime_f 54 #pragma weak mpi_wtime_ = ompi_wtime_f 55 #pragma weak mpi_wtime__ = ompi_wtime_f 56 57 #pragma weak MPI_Wtime_f = ompi_wtime_f 58 #pragma weak MPI_Wtime_f08 = ompi_wtime_f 59 #else 60 #if ! OMPI_BUILD_MPI_PROFILING MPI_WTIME(void)61double MPI_WTIME(void) { return ompi_wtime_f(); } mpi_wtime(void)62double mpi_wtime(void) { return ompi_wtime_f(); } mpi_wtime_(void)63double mpi_wtime_(void) { return ompi_wtime_f(); } mpi_wtime__(void)64double mpi_wtime__(void) { return ompi_wtime_f(); } 65 #else 66 #define ompi_wtime_f pompi_wtime_f 67 #endif 68 #endif 69 70 ompi_wtime_f(void)71double ompi_wtime_f(void) 72 { 73 return PMPI_Wtime(); 74 } 75