Skip to content

Commit 16d65a2

Browse files
committed
fortran/mpif-h: invoke the C PMPI_* subroutines instead of the MPI_* ones
when profiling is built. This prevents Fortran subroutines from being wrapped twice by third party tools (e.g. once in Fortran and once in C) see discussion starting at http://www.open-mpi.org/community/lists/devel/2015/08/17842.php
1 parent eeddb7a commit 16d65a2

File tree

755 files changed

+4323
-2381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

755 files changed

+4323
-2381
lines changed

ompi/mpi/c/Makefile.am

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# Copyright (c) 2012-2013 Inria. All rights reserved.
1616
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights
1717
# reserved.
18+
# Copyright (c) 2015 Research Organization for Information Science
19+
# and Technology (RIST). All rights reserved.
1820
# $COPYRIGHT$
1921
#
2022
# Additional copyrights may follow
@@ -24,15 +26,11 @@
2426

2527
SUBDIRS = profile
2628

27-
#
28-
# OMPI_PRPOFILING_DEFINES flag s enabled when we want our MPI_* symbols
29-
# to be replaced by PMPI_*. In other words, this flag decides
30-
# whether "profile/defines.h" is included or not. "profile/defines.h"
31-
# replaces all MPI_* symbols with PMPI_* symbols. In this directory,
32-
# we need it to be 0
33-
#
29+
# if OMPI_BUILD_MPI_PROFILING is enabled when we want our generated MPI_* symbols
30+
# to be replaced by PMPI_*.
31+
# In this directory, we need it to be 0
3432

35-
AM_CPPFLAGS = -DOMPI_PROFILING_DEFINES=0
33+
AM_CPPFLAGS = -DOMPI_BUILD_MPI_PROFILING=0
3634

3735
#
3836
# The top directory always builds MPI_* bindings. The bottom directory

ompi/mpi/c/abort.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2015 Research Organization for Information Science
14+
* and Technology (RIST). All rights reserved.
1315
* $COPYRIGHT$
1416
*
1517
* Additional copyrights may follow
@@ -26,12 +28,12 @@
2628
#include "ompi/memchecker.h"
2729
#include "ompi/communicator/communicator.h"
2830

29-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
31+
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_BUILD_MPI_PROFILING
3032
#pragma weak MPI_Abort = PMPI_Abort
3133
#endif
3234

33-
#if OMPI_PROFILING_DEFINES
34-
#include "ompi/mpi/c/profile/defines.h"
35+
#if OMPI_BUILD_MPI_PROFILING
36+
#define MPI_Abort PMPI_Abort
3537
#endif
3638

3739
static const char FUNC_NAME[] = "MPI_Abort";

ompi/mpi/c/accumulate.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
#include "ompi/datatype/ompi_datatype_internal.h"
3535
#include "ompi/memchecker.h"
3636

37-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
37+
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_BUILD_MPI_PROFILING
3838
#pragma weak MPI_Accumulate = PMPI_Accumulate
3939
#endif
4040

41-
#if OMPI_PROFILING_DEFINES
42-
#include "ompi/mpi/c/profile/defines.h"
41+
#if OMPI_BUILD_MPI_PROFILING
42+
#define MPI_Accumulate PMPI_Accumulate
4343
#endif
4444

4545
static const char FUNC_NAME[] = "MPI_Accumulate";

ompi/mpi/c/add_error_class.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2006 University of Houston. All rights reserved.
13+
* Copyright (c) 2015 Research Organization for Information Science
14+
* and Technology (RIST). All rights reserved.
1315
* $COPYRIGHT$
1416
*
1517
* Additional copyrights may follow
@@ -26,12 +28,12 @@
2628
#include "ompi/communicator/communicator.h"
2729
#include "ompi/attribute/attribute.h"
2830

29-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
31+
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_BUILD_MPI_PROFILING
3032
#pragma weak MPI_Add_error_class = PMPI_Add_error_class
3133
#endif
3234

33-
#if OMPI_PROFILING_DEFINES
34-
#include "ompi/mpi/c/profile/defines.h"
35+
#if OMPI_BUILD_MPI_PROFILING
36+
#define MPI_Add_error_class PMPI_Add_error_class
3537
#endif
3638

3739
static const char FUNC_NAME[] = "MPI_Add_error_class";

ompi/mpi/c/add_error_code.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2006 University of Houston. All rights reserved.
13+
* Copyright (c) 2015 Research Organization for Information Science
14+
* and Technology (RIST). All rights reserved.
1315
* $COPYRIGHT$
1416
*
1517
* Additional copyrights may follow
@@ -26,12 +28,12 @@
2628
#include "ompi/errhandler/errcode.h"
2729
#include "ompi/attribute/attribute.h"
2830

29-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
31+
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_BUILD_MPI_PROFILING
3032
#pragma weak MPI_Add_error_code = PMPI_Add_error_code
3133
#endif
3234

33-
#if OMPI_PROFILING_DEFINES
34-
#include "ompi/mpi/c/profile/defines.h"
35+
#if OMPI_BUILD_MPI_PROFILING
36+
#define MPI_Add_error_code PMPI_Add_error_code
3537
#endif
3638

3739
static const char FUNC_NAME[] = "MPI_Add_error_code";

ompi/mpi/c/add_error_string.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2006 University of Houston. All rights reserved.
13+
* Copyright (c) 2015 Research Organization for Information Science
14+
* and Technology (RIST). All rights reserved.
1315
* $COPYRIGHT$
1416
*
1517
* Additional copyrights may follow
@@ -26,12 +28,12 @@
2628
#include "ompi/errhandler/errhandler.h"
2729
#include "ompi/errhandler/errcode.h"
2830

29-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
31+
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_BUILD_MPI_PROFILING
3032
#pragma weak MPI_Add_error_string = PMPI_Add_error_string
3133
#endif
3234

33-
#if OMPI_PROFILING_DEFINES
34-
#include "ompi/mpi/c/profile/defines.h"
35+
#if OMPI_BUILD_MPI_PROFILING
36+
#define MPI_Add_error_string PMPI_Add_error_string
3537
#endif
3638

3739
static const char FUNC_NAME[] = "MPI_Add_error_string";

ompi/mpi/c/address.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* University of Stuttgart. All rights reserved.
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
12+
* Copyright (c) 2015 Research Organization for Information Science
13+
* and Technology (RIST). All rights reserved.
1214
* $COPYRIGHT$
1315
*
1416
* Additional copyrights may follow
@@ -24,12 +26,12 @@
2426
#include "ompi/communicator/communicator.h"
2527
#include "ompi/errhandler/errhandler.h"
2628

27-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
29+
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_BUILD_MPI_PROFILING
2830
#pragma weak MPI_Address = PMPI_Address
2931
#endif
3032

31-
#if OMPI_PROFILING_DEFINES
32-
#include "ompi/mpi/c/profile/defines.h"
33+
#if OMPI_BUILD_MPI_PROFILING
34+
#define MPI_Address PMPI_Address
3335
#endif
3436

3537
static const char FUNC_NAME[] = "MPI_Address";

ompi/mpi/c/allgather.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333
#include "ompi/datatype/ompi_datatype.h"
3434
#include "ompi/memchecker.h"
3535

36-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
36+
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_BUILD_MPI_PROFILING
3737
#pragma weak MPI_Allgather = PMPI_Allgather
3838
#endif
3939

40-
#if OMPI_PROFILING_DEFINES
41-
#include "ompi/mpi/c/profile/defines.h"
40+
#if OMPI_BUILD_MPI_PROFILING
41+
#define MPI_Allgather PMPI_Allgather
4242
#endif
4343

4444
static const char FUNC_NAME[] = "MPI_Allgather";

ompi/mpi/c/allgatherv.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333
#include "ompi/datatype/ompi_datatype.h"
3434
#include "ompi/memchecker.h"
3535

36-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
36+
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_BUILD_MPI_PROFILING
3737
#pragma weak MPI_Allgatherv = PMPI_Allgatherv
3838
#endif
3939

40-
#if OMPI_PROFILING_DEFINES
41-
#include "ompi/mpi/c/profile/defines.h"
40+
#if OMPI_BUILD_MPI_PROFILING
41+
#define MPI_Allgatherv PMPI_Allgatherv
4242
#endif
4343

4444
static const char FUNC_NAME[] = "MPI_Allgatherv";

ompi/mpi/c/alloc_mem.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
* Copyright (c) 2004-2005 The Regents of the University of California.
1111
* All rights reserved.
1212
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2015 Research Organization for Information Science
14+
* and Technology (RIST). All rights reserved.
1315
* $COPYRIGHT$
1416
*
1517
* Additional copyrights may follow
@@ -29,12 +31,12 @@
2931
#include "ompi/info/info.h"
3032
#include "opal/mca/mpool/mpool.h"
3133

32-
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
34+
#if OPAL_HAVE_WEAK_SYMBOLS && OMPI_BUILD_MPI_PROFILING
3335
#pragma weak MPI_Alloc_mem = PMPI_Alloc_mem
3436
#endif
3537

36-
#if OMPI_PROFILING_DEFINES
37-
#include "ompi/mpi/c/profile/defines.h"
38+
#if OMPI_BUILD_MPI_PROFILING
39+
#define MPI_Alloc_mem PMPI_Alloc_mem
3840
#endif
3941

4042
static const char FUNC_NAME[] = "MPI_Alloc_mem";

0 commit comments

Comments
 (0)