CVSc: Changed to have 2 new AM_CONDITIONALS, WANT_MPI_BINDINGS_LAYER
and WANT_PMPI_BINDINGS_LAYER. These determine whether src/mpi/interface/c and src/mpi/interface/c/profile are built. Makefile.am's were changed to reflect the same change. Now the top layer always builds MPI bindings and the lower layer always builds PMPI bindings : ---------------------------------------------------------------------- This commit was SVN r393.
Этот коммит содержится в:
родитель
92b97053c7
Коммит
5c1aca22c7
21
configure.ac
21
configure.ac
@ -163,7 +163,7 @@ LAM_C_WEAK_SYMBOLS
|
|||||||
# separate directory.
|
# separate directory.
|
||||||
|
|
||||||
if test "$WANT_WEAK_SYMBOLS" = "0"; then
|
if test "$WANT_WEAK_SYMBOLS" = "0"; then
|
||||||
LAM_C_HAVE_WEAK_SYMBOLS=1
|
LAM_C_HAVE_WEAK_SYMBOLS=0
|
||||||
fi
|
fi
|
||||||
if test "$WANT_MPI_PROFILING" = "1"; then
|
if test "$WANT_MPI_PROFILING" = "1"; then
|
||||||
if test "$LAM_C_HAVE_WEAK_SYMBOLS" = "1"; then
|
if test "$LAM_C_HAVE_WEAK_SYMBOLS" = "1"; then
|
||||||
@ -174,6 +174,25 @@ if test "$WANT_MPI_PROFILING" = "1"; then
|
|||||||
else
|
else
|
||||||
LAM_PROFILING_COMPILE_SEPARATELY=0
|
LAM_PROFILING_COMPILE_SEPARATELY=0
|
||||||
fi
|
fi
|
||||||
|
#
|
||||||
|
# There are 2 layers to the MPI Language binidings
|
||||||
|
# One layer generates MPI_* bindings. The other layer
|
||||||
|
# generates PMPI_* bindings. The following conditions
|
||||||
|
# determine whether each (or both) these layers are
|
||||||
|
# built.
|
||||||
|
# 1. MPI_* bindings are needed if:
|
||||||
|
# - Profiling is not required
|
||||||
|
# - Profiling is required but weak symbols are not
|
||||||
|
# supported
|
||||||
|
# 2. PMPI_* bindings are needed if profiling is required.
|
||||||
|
# Hence we define 2 AM_CONDITIONALs which tell us whether
|
||||||
|
# each of these layers need to be built or NOT
|
||||||
|
#
|
||||||
|
AM_CONDITIONAL(WANT_MPI_BINDINGS_LAYER,
|
||||||
|
test "$WANT_MPI_PROFILING" = 0 -o "$LAM_PROFILING_COMPILE_SEPARATELY" = 1)
|
||||||
|
|
||||||
|
AM_CONDITIONAL(WANT_PMPI_BINDINGS_LAYER,
|
||||||
|
test "$WANT_MPI_PROFILING" = 1)
|
||||||
AM_CONDITIONAL(COMPILE_PROFILING_SEPARATELY,
|
AM_CONDITIONAL(COMPILE_PROFILING_SEPARATELY,
|
||||||
test "$LAM_PROFILING_COMPILE_SEPARATELY" = 1)
|
test "$LAM_PROFILING_COMPILE_SEPARATELY" = 1)
|
||||||
AC_DEFINE_UNQUOTED(LAM_WANT_MPI_PROFILING, $WANT_MPI_PROFILING,
|
AC_DEFINE_UNQUOTED(LAM_WANT_MPI_PROFILING, $WANT_MPI_PROFILING,
|
||||||
|
@ -4,30 +4,64 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
include $(top_srcdir)/config/Makefile.options
|
||||||
|
#
|
||||||
|
# LAM_IS_PMPI_BINDING flag s enabled when we want our MPI_* symbols
|
||||||
|
# to be replaced by PMPI_*. In other words, this flag decides
|
||||||
|
# whether "profile/defines.h" is included or not. "profile/defines.h"
|
||||||
|
# replaces all MPI_* symbols with PMPI_* symbols. In this directory,
|
||||||
|
# we need it to be 0
|
||||||
|
#
|
||||||
|
AM_CPPFLAGS = -DLAM_PROFILING_DEFINES=0
|
||||||
|
|
||||||
# We must traverse into the profile directory to install the proper
|
#
|
||||||
# header files. So only only expect to find the C profiling library
|
# The top directory always builds MPI_* bindings. The bottom directory
|
||||||
# if we're compiling profiling separately.
|
# always builds PMPI_* bindings. The cases where the top directory
|
||||||
|
# needs to be built are
|
||||||
if COMPILE_PROFILING_SEPARATELY
|
# 1. When profiling is disabled.
|
||||||
profile_lib = profile/libmpi_c_profile.la
|
# 2. When profiling is enabled but weak symbol support is absent.
|
||||||
|
#
|
||||||
|
if WANT_MPI_BINDINGS_LAYER
|
||||||
|
mpi_lib = libmpi_c_mpi.la
|
||||||
else
|
else
|
||||||
profile_lib =
|
mpi_lib =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
noinst_LTLIBRARIES = libmpi_c.la $(mpi_lib)
|
||||||
|
|
||||||
|
#
|
||||||
|
# The profile subdirectory always builds PMPI_* bindings. Hence, this
|
||||||
|
# directory needs to be built whenever profiling is enabled
|
||||||
|
#
|
||||||
|
if WANT_PMPI_BINDINGS_LAYER
|
||||||
|
pmpi_lib = profile/libmpi_c_pmpi.la
|
||||||
|
else
|
||||||
|
pmpi_lib =
|
||||||
|
endif
|
||||||
|
#
|
||||||
|
#
|
||||||
SUBDIRS = profile
|
SUBDIRS = profile
|
||||||
|
#
|
||||||
noinst_LTLIBRARIES = libmpi_c.la
|
#
|
||||||
|
|
||||||
headers = bindings.h
|
headers = bindings.h
|
||||||
|
#
|
||||||
|
# libmpi_c.la is the final library that will be built. This will try
|
||||||
|
# to snarf in mpi_lib and pmpi_lib. So, the right things will be done
|
||||||
|
# by default
|
||||||
|
#
|
||||||
|
|
||||||
libmpi_c_la_SOURCES = \
|
libmpi_c_la_SOURCES =
|
||||||
|
|
||||||
|
libmpi_c_la_LIBADD = \
|
||||||
|
$(mpi_lib) \
|
||||||
|
$(pmpi_lib)
|
||||||
|
|
||||||
|
libmpi_c_mpi_la_SOURCES = \
|
||||||
alloc_mem.c \
|
alloc_mem.c \
|
||||||
comm_get_name.c \
|
comm_get_name.c \
|
||||||
comm_set_name.c \
|
comm_set_name.c \
|
||||||
init.c \
|
|
||||||
finalize.c \
|
finalize.c \
|
||||||
free_mem.c \
|
free_mem.c \
|
||||||
|
init.c \
|
||||||
type_commit.c \
|
type_commit.c \
|
||||||
type_contiguous.c \
|
type_contiguous.c \
|
||||||
type_create_darray.c \
|
type_create_darray.c \
|
||||||
@ -64,8 +98,8 @@ libmpi_c_la_SOURCES = \
|
|||||||
type_ub.c \
|
type_ub.c \
|
||||||
type_vector.c
|
type_vector.c
|
||||||
|
|
||||||
libmpi_c_la_LIBADD = $(profile_lib)
|
|
||||||
|
|
||||||
|
EXTRA_DIST = $(libmpi_c_mpi_la_SOURCES)
|
||||||
# Conditionally install the header files
|
# Conditionally install the header files
|
||||||
|
|
||||||
if WANT_INSTALL_HEADERS
|
if WANT_INSTALL_HEADERS
|
||||||
|
@ -8,10 +8,6 @@
|
|||||||
#include "lam_config.h"
|
#include "lam_config.h"
|
||||||
#include "mpi.h"
|
#include "mpi.h"
|
||||||
|
|
||||||
#ifndef LAM_PROFILING_DEFINES
|
|
||||||
#define LAM_PROFILING_DEFINES 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* If compiling in the profile directory, then we don't have weak
|
/* If compiling in the profile directory, then we don't have weak
|
||||||
symbols and therefore we need the defines to map from MPI->PMPI.
|
symbols and therefore we need the defines to map from MPI->PMPI.
|
||||||
NOTE: pragma weak stuff is handled on a file-by-file basis; it
|
NOTE: pragma weak stuff is handled on a file-by-file basis; it
|
||||||
|
@ -4,34 +4,76 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
include $(top_srcdir)/config/Makefile.options
|
include $(top_srcdir)/config/Makefile.options
|
||||||
|
#
|
||||||
|
# LAM_IS_PMPI_BINDING flag s enabled when we want our MPI_* symbols
|
||||||
|
# to be replaced by PMPI_*. In other words, this flag decides
|
||||||
|
# whether "profile/defines.h" is included or not. "profile/defines.h"
|
||||||
|
# replaces all MPI_* symbols with PMPI_* symbols. In this directory
|
||||||
|
# we definately need it to be 1.
|
||||||
|
#
|
||||||
AM_CPPFLAGS = -DLAM_PROFILING_DEFINES=1
|
AM_CPPFLAGS = -DLAM_PROFILING_DEFINES=1
|
||||||
|
|
||||||
# We must traverse into the profile directory to install the proper
|
#
|
||||||
# header files. So only only expect to find the C profiling library
|
# This build needs to go through only if profiling is required.
|
||||||
# if we're compiling profiling separately.
|
# Further, this build HAS to go through if profiling is required.
|
||||||
|
#
|
||||||
|
|
||||||
if COMPILE_PROFILING_SEPARATELY
|
if WANT_PMPI_BINDINGS_LAYER
|
||||||
lib = libmpi_c_profile.la
|
pmpi_lib = libmpi_c_pmpi.la
|
||||||
else
|
else
|
||||||
lib =
|
pmpi_lib =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
noinst_LTLIBRARIES = $(lib)
|
noinst_LTLIBRARIES = $(pmpi_lib)
|
||||||
|
|
||||||
headers = defines.h
|
headers = defines.h
|
||||||
|
|
||||||
nodist_libmpi_c_profile_la_SOURCES = \
|
nodist_libmpi_c_pmpi_la_SOURCES = \
|
||||||
palloc_mem.c \
|
palloc_mem.c \
|
||||||
pcomm_get_name.c \
|
pcomm_get_name.c \
|
||||||
pcomm_set_name.c \
|
pcomm_set_name.c \
|
||||||
pinit.c \
|
|
||||||
pfinalize.c \
|
pfinalize.c \
|
||||||
pfree_mem.c
|
pfree_mem.c \
|
||||||
|
pinit.c \
|
||||||
|
ptype_commit.c \
|
||||||
|
ptype_contiguous.c \
|
||||||
|
ptype_create_darray.c \
|
||||||
|
ptype_create_f90_complex.c \
|
||||||
|
ptype_create_f90_integer.c \
|
||||||
|
ptype_create_f90_real.c \
|
||||||
|
ptype_create_hindexed.c \
|
||||||
|
ptype_create_hvector.c \
|
||||||
|
ptype_create_indexed_block.c \
|
||||||
|
ptype_create_keyval.c \
|
||||||
|
ptype_create_resized.c \
|
||||||
|
ptype_create_struct.c \
|
||||||
|
ptype_create_subarray.c \
|
||||||
|
ptype_delete_attr.c \
|
||||||
|
ptype_dup.c \
|
||||||
|
ptype_extent.c \
|
||||||
|
ptype_free.c \
|
||||||
|
ptype_free_keyval.c \
|
||||||
|
ptype_get_attr.c \
|
||||||
|
ptype_get_contents.c \
|
||||||
|
ptype_get_envelope.c \
|
||||||
|
ptype_get_extent.c \
|
||||||
|
ptype_get_name.c \
|
||||||
|
ptype_get_true_extent.c \
|
||||||
|
ptype_hindexed.c \
|
||||||
|
ptype_hvector.c \
|
||||||
|
ptype_indexed.c \
|
||||||
|
ptype_lb.c \
|
||||||
|
ptype_match_size.c \
|
||||||
|
ptype_set_attr.c \
|
||||||
|
ptype_set_name.c \
|
||||||
|
ptype_size.c \
|
||||||
|
ptype_struct.c \
|
||||||
|
ptype_ub.c \
|
||||||
|
ptype_vector.c
|
||||||
|
#
|
||||||
# Sym link in the sources from the real MPI directory
|
# Sym link in the sources from the real MPI directory
|
||||||
|
#
|
||||||
$(nodist_libmpi_c_profile_la_SOURCES):
|
$(nodist_libmpi_c_pmpi_la_SOURCES):
|
||||||
if test ! -r $@ ; then \
|
if test ! -r $@ ; then \
|
||||||
pname=`echo $@ | cut -b '2-'` ; \
|
pname=`echo $@ | cut -b '2-'` ; \
|
||||||
ln -s $(top_srcdir)/src/mpi/interface/c/$$pname $@ ; \
|
ln -s $(top_srcdir)/src/mpi/interface/c/$$pname $@ ; \
|
||||||
@ -48,7 +90,7 @@ endif
|
|||||||
|
|
||||||
# These files were created by targets above
|
# These files were created by targets above
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = $(nodist_libmpi_c_profile_la_SOURCES)
|
MAINTAINERCLEANFILES = $(nodist_libmpi_c_pmpi_la_SOURCES)
|
||||||
|
|
||||||
# Don't want these targets in here
|
# Don't want these targets in here
|
||||||
|
|
||||||
|
@ -4,20 +4,13 @@
|
|||||||
|
|
||||||
#ifndef LAM_C_PROFILE_DEFINES_H
|
#ifndef LAM_C_PROFILE_DEFINES_H
|
||||||
#define LAM_C_PROFILE_DEFINES_H
|
#define LAM_C_PROFILE_DEFINES_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file contains the #defines for the profiled versions of all
|
* This file is included in the top directory only if
|
||||||
* the MPI C bindings. It is only included if we do not have weak
|
* profiling is required. Once profiling is required,
|
||||||
* symbols, or weak symbol support was explicitly disabled.
|
* this file will replace all MPI_* symbols with
|
||||||
|
* PMPI_* symbols
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if LAM_PROFILING_DEFINES
|
|
||||||
#define MPI_Comm_set_name PMPI_Comm_set_name
|
|
||||||
#define MPI_Comm_get_name PMPI_Comm_get_name
|
|
||||||
#define MPI_Init PMPI_Init
|
|
||||||
#define MPI_Finalize PMPI_Finalize
|
|
||||||
#define MPI_Alloc_mem PMPI_Alloc_mem
|
#define MPI_Alloc_mem PMPI_Alloc_mem
|
||||||
#define MPI_Free_mem PMPI_Free_mem
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* LAM_C_PROFILE_DEFINES_H */
|
#endif /* LAM_C_PROFILE_DEFINES_H */
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user