Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit c7f312e

Browse files
committed
configury: remove the --enable-mpi-profiling option
and directly call the PMPI_* symbols from C and Fortran bindings (back-ported from commit open-mpi/ompi@291a464)
1 parent fca39f3 commit c7f312e

File tree

386 files changed

+1188
-2388
lines changed

Some content is hidden

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

386 files changed

+1188
-2388
lines changed

config/ompi_configure_options.m4

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -166,27 +166,6 @@ case "x$enable_mpi_fortran" in
166166
;;
167167
esac
168168

169-
#
170-
# MPI profiling
171-
#
172-
173-
AC_MSG_CHECKING([if want PMPI])
174-
AC_ARG_ENABLE(mpi-profile,
175-
AC_HELP_STRING([--enable-mpi-profile],
176-
[enable MPI profiling (default: enabled)]))
177-
if test "$enable_mpi_profile" != "no"; then
178-
AC_MSG_RESULT([yes])
179-
WANT_MPI_PROFILING=1
180-
MPIF_H_PMPI_W_FUNCS=", PMPI_WTICK, PMPI_WTIME"
181-
else
182-
AC_MSG_RESULT([no])
183-
WANT_MPI_PROFILING=0
184-
MPIF_H_PMPI_W_FUNCS=
185-
fi
186-
AC_SUBST(MPIF_H_PMPI_W_FUNCS)
187-
AM_CONDITIONAL(WANT_MPI_PROFILING, test "$WANT_MPI_PROFILING" = 1)
188-
189-
190169
#
191170
# C++
192171
#

config/ompi_setup_mpi_fortran.m4

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -374,15 +374,6 @@ AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
374374
OMPI_FORTRAN_F08_TYPE=$OMPI_FORTRAN_IGNORE_TKR_TYPE
375375
])
376376

377-
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
378-
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
379-
[ # If we don't have PMPI, we won't build mpi_f08 at all
380-
AC_MSG_CHECKING([whether PMPI is enabled (needed for mpi_f08)])
381-
AS_IF([test $WANT_MPI_PROFILING -eq 1],
382-
[AC_MSG_RESULT([yes])],
383-
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS
384-
AC_MSG_RESULT([no (cannot build mpi_f08)])])])
385-
386377
# The overall "_BIND_C" variable will be set to 1 if we have all
387378
# the necessary forms of BIND(C)
388379
OMPI_FORTRAN_HAVE_BIND_C=0
@@ -644,11 +635,10 @@ end type test_mpi_handle],
644635
# these layers need to be built or NOT
645636

646637
AM_CONDITIONAL(BUILD_MPI_FORTRAN_MPIFH_BINDINGS_LAYER,
647-
[( test $WANT_MPI_PROFILING -eq 0 || test $OMPI_PROFILING_COMPILE_SEPARATELY -eq 1 ) && \
638+
[test $OMPI_PROFILING_COMPILE_SEPARATELY -eq 1 && \
648639
test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS])
649640
AM_CONDITIONAL(BUILD_PMPI_FORTRAN_MPIFH_BINDINGS_LAYER,
650-
[test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS && \
651-
test $WANT_MPI_PROFILING -eq 1])
641+
[test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS])
652642
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_MPIFH_BINDINGS,
653643
[test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS])
654644

config/ompi_setup_mpi_profiling.m4

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
1616
# reserved.
1717
# Copyright (c) 2009 Oak Ridge National Labs. All rights 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
@@ -39,14 +41,10 @@ AC_DEFUN([OMPI_SETUP_MPI_PROFILING],[
3941
#
4042

4143
AM_CONDITIONAL(BUILD_MPI_BINDINGS_LAYER,
42-
test "$WANT_MPI_PROFILING" = 0 -o "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
44+
test "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
4345

44-
AM_CONDITIONAL(BUILD_PMPI_BINDINGS_LAYER,
45-
test "$WANT_MPI_PROFILING" = 1)
4646
AM_CONDITIONAL(COMPILE_PROFILING_SEPARATELY,
4747
test "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
48-
AC_DEFINE_UNQUOTED(OMPI_ENABLE_MPI_PROFILING, $WANT_MPI_PROFILING,
49-
[Whether we want MPI profiling or not])
5048
AC_DEFINE_UNQUOTED(OPAL_HAVE_WEAK_SYMBOLS, $OPAL_C_HAVE_WEAK_SYMBOLS,
5149
[Whether we have weak symbols or not])
5250
])

configure.ac

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -496,14 +496,10 @@ fi
496496
if test "$WANT_WEAK_SYMBOLS" = "0"; then
497497
OPAL_C_HAVE_WEAK_SYMBOLS=0
498498
fi
499-
if test "$WANT_MPI_PROFILING" = "1"; then
500-
if test "$OPAL_C_HAVE_WEAK_SYMBOLS" = "1"; then
501-
OMPI_PROFILING_COMPILE_SEPARATELY=0
502-
else
503-
OMPI_PROFILING_COMPILE_SEPARATELY=1
504-
fi
505-
else
499+
if test "$OPAL_C_HAVE_WEAK_SYMBOLS" = "1"; then
506500
OMPI_PROFILING_COMPILE_SEPARATELY=0
501+
else
502+
OMPI_PROFILING_COMPILE_SEPARATELY=1
507503
fi
508504

509505
# Check if we support the offsetof compiler directive
@@ -549,13 +545,7 @@ m4_ifdef([project_oshmem], [OSHMEM_SETUP_JAVA_BINDINGS])
549545
##################################
550546

551547
# Setup profiling bindings (if we're building the relevant projects).
552-
# Note that opal_wrapper.c has a hard-coded use of the
553-
# OMPI_ENABLE_MPI_PROFILING macro, so we need to define it (to 0) even
554-
# if we're not building the OMPI project.
555-
556-
m4_ifdef([project_ompi], [OMPI_SETUP_MPI_PROFILING],
557-
[AC_DEFINE([OMPI_ENABLE_MPI_PROFILING], [0],
558-
[We are not building OMPI, so no profiling])])
548+
m4_ifdef([project_ompi], [OMPI_SETUP_MPI_PROFILING])
559549
m4_ifdef([project_oshmem], [OSHMEM_SETUP_PROFILING])
560550

561551

ompi/Makefile.am

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# Copyright (c) 2013-2015 Los Alamos National Security, LLC. All rights
1616
# reserved.
1717
# Copyright (c) 2015 Intel, Inc. All rights 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
@@ -29,11 +31,7 @@ c_mpi_lib = mpi/c/libmpi_c_mpi.la mpi/tool/libmpi_mpit.la
2931
else
3032
c_mpi_lib =
3133
endif
32-
if BUILD_PMPI_BINDINGS_LAYER
3334
c_pmpi_lib = mpi/c/profile/libmpi_c_pmpi.la mpi/tool/profile/libmpi_pmpit.la
34-
else
35-
c_pmpi_lib =
36-
endif
3735

3836
# See if we have Fortran mpif.h MPI bindings
3937

ompi/mpi/c/errhandler_create.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,12 @@
3232
#define MPI_Errhandler_create PMPI_Errhandler_create
3333
#endif
3434

35-
#if OMPI_ENABLE_MPI_PROFILING
36-
#define MPI_Comm_create_errhandler PMPI_Comm_create_errhandler
37-
#endif
38-
3935
int MPI_Errhandler_create(MPI_Handler_function *function,
4036
MPI_Errhandler *errhandler)
4137
{
4238

4339
/* This is a deprecated -- just turn around and call the real
4440
function */
4541

46-
return MPI_Comm_create_errhandler(function, errhandler);
42+
return PMPI_Comm_create_errhandler(function, errhandler);
4743
}

ompi/mpi/c/errhandler_get.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@
3434
#define MPI_Errhandler_get PMPI_Errhandler_get
3535
#endif
3636

37-
#if OMPI_ENABLE_MPI_PROFILING
38-
#define MPI_Comm_get_errhandler PMPI_Comm_get_errhandler
39-
#endif
40-
4137
static const char FUNC_NAME[] = "MPI_Errhandler_get";
4238

4339

@@ -54,5 +50,5 @@ int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler)
5450
/* This is a deprecated -- just turn around and call the real
5551
function */
5652

57-
return MPI_Comm_get_errhandler(comm, errhandler);
53+
return PMPI_Comm_get_errhandler(comm, errhandler);
5854
}

ompi/mpi/c/errhandler_set.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@
3434
#define MPI_Errhandler_set PMPI_Errhandler_set
3535
#endif
3636

37-
#if OMPI_ENABLE_MPI_PROFILING
38-
#define MPI_Comm_set_errhandler PMPI_Comm_set_errhandler
39-
#endif
40-
4137
static const char FUNC_NAME[] = "MPI_Errhandler_set";
4238

4339

@@ -54,5 +50,5 @@ int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler)
5450
/* This is a deprecated -- just turn around and call the real
5551
function */
5652

57-
return MPI_Comm_set_errhandler(comm, errhandler);
53+
return PMPI_Comm_set_errhandler(comm, errhandler);
5854
}

ompi/mpi/c/profile/Makefile.am

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ AM_CPPFLAGS = -DOMPI_BUILD_MPI_PROFILING=1
3838
# Further, this build HAS to go through if profiling is required.
3939
#
4040

41-
noinst_LTLIBRARIES =
42-
if BUILD_PMPI_BINDINGS_LAYER
43-
noinst_LTLIBRARIES += libmpi_c_pmpi.la
44-
endif
41+
noinst_LTLIBRARIES = libmpi_c_pmpi.la
4542

4643
nodist_libmpi_c_pmpi_la_SOURCES = \
4744
pabort.c \

ompi/mpi/c/sendrecv_replace.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@
3838
#define MPI_Sendrecv_replace PMPI_Sendrecv_replace
3939
#endif
4040

41-
#if OMPI_ENABLE_MPI_PROFILING
42-
#define MPI_Alloc_mem PMPI_Alloc_mem
43-
#define MPI_Free_mem PMPI_Free_mem
44-
#define MPI_Sendrecv PMPI_Sendrecv
45-
#endif
46-
4741
static const char FUNC_NAME[] = "MPI_Sendrecv_replace";
4842

4943

@@ -81,7 +75,7 @@ int MPI_Sendrecv_replace(void * buf, int count, MPI_Datatype datatype,
8175

8276
/* simple case */
8377
if ( source == MPI_PROC_NULL || dest == MPI_PROC_NULL || count == 0 ) {
84-
rc = MPI_Sendrecv(buf,count,datatype,dest,sendtag,buf,count,datatype,source,recvtag,comm,status);
78+
rc = PMPI_Sendrecv(buf,count,datatype,dest,sendtag,buf,count,datatype,source,recvtag,comm,status);
8579

8680
return rc;
8781
} else {
@@ -106,7 +100,7 @@ int MPI_Sendrecv_replace(void * buf, int count, MPI_Datatype datatype,
106100
/* setup a buffer for recv */
107101
opal_convertor_get_packed_size( &convertor, &packed_size );
108102
if( packed_size > sizeof(recv_data) ) {
109-
rc = MPI_Alloc_mem(packed_size, MPI_INFO_NULL, &iov.iov_base);
103+
rc = PMPI_Alloc_mem(packed_size, MPI_INFO_NULL, &iov.iov_base);
110104
if(OMPI_SUCCESS != rc) {
111105
OMPI_ERRHANDLER_RETURN(OMPI_ERR_OUT_OF_RESOURCE, comm, MPI_ERR_BUFFER, FUNC_NAME);
112106
}
@@ -115,11 +109,11 @@ int MPI_Sendrecv_replace(void * buf, int count, MPI_Datatype datatype,
115109
}
116110

117111
/* recv into temporary buffer */
118-
rc = MPI_Sendrecv( buf, count, datatype, dest, sendtag, iov.iov_base, packed_size,
112+
rc = PMPI_Sendrecv( buf, count, datatype, dest, sendtag, iov.iov_base, packed_size,
119113
MPI_BYTE, source, recvtag, comm, &recv_status );
120114
if (rc != MPI_SUCCESS) {
121115
if(packed_size > sizeof(recv_data))
122-
MPI_Free_mem(iov.iov_base);
116+
PMPI_Free_mem(iov.iov_base);
123117
OBJ_DESTRUCT(&convertor);
124118
OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
125119
}
@@ -137,7 +131,7 @@ int MPI_Sendrecv_replace(void * buf, int count, MPI_Datatype datatype,
137131

138132
/* release resources */
139133
if(packed_size > sizeof(recv_data)) {
140-
MPI_Free_mem(iov.iov_base);
134+
PMPI_Free_mem(iov.iov_base);
141135
}
142136
OBJ_DESTRUCT(&convertor);
143137

0 commit comments

Comments
 (0)