1
1

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.
Этот коммит содержится в:
Prabhanjan Kambadur 2004-01-15 01:11:59 +00:00
родитель 92b97053c7
Коммит 5c1aca22c7
5 изменённых файлов: 175 добавлений и 91 удалений

Просмотреть файл

@ -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,68 +4,102 @@
# #
include $(top_srcdir)/config/Makefile.options include $(top_srcdir)/config/Makefile.options
#
# We must traverse into the profile directory to install the proper # LAM_IS_PMPI_BINDING flag s enabled when we want our MPI_* symbols
# header files. So only only expect to find the C profiling library # to be replaced by PMPI_*. In other words, this flag decides
# if we're compiling profiling separately. # whether "profile/defines.h" is included or not. "profile/defines.h"
# replaces all MPI_* symbols with PMPI_* symbols. In this directory,
if COMPILE_PROFILING_SEPARATELY # we need it to be 0
profile_lib = profile/libmpi_c_profile.la #
AM_CPPFLAGS = -DLAM_PROFILING_DEFINES=0
#
# The top directory always builds MPI_* bindings. The bottom directory
# always builds PMPI_* bindings. The cases where the top directory
# needs to be built are
# 1. When profiling is disabled.
# 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 =
alloc_mem.c \
comm_get_name.c \
comm_set_name.c \
init.c \
finalize.c \
free_mem.c \
type_commit.c \
type_contiguous.c \
type_create_darray.c \
type_create_f90_complex.c \
type_create_f90_integer.c \
type_create_f90_real.c \
type_create_hindexed.c \
type_create_hvector.c \
type_create_indexed_block.c \
type_create_keyval.c \
type_create_resized.c \
type_create_struct.c \
type_create_subarray.c \
type_delete_attr.c \
type_dup.c \
type_extent.c \
type_free.c \
type_free_keyval.c \
type_get_attr.c \
type_get_contents.c \
type_get_envelope.c \
type_get_extent.c \
type_get_name.c \
type_get_true_extent.c \
type_hindexed.c \
type_hvector.c \
type_indexed.c \
type_lb.c \
type_match_size.c \
type_set_attr.c \
type_set_name.c \
type_size.c \
type_struct.c \
type_ub.c \
type_vector.c
libmpi_c_la_LIBADD = $(profile_lib) libmpi_c_la_LIBADD = \
$(mpi_lib) \
$(pmpi_lib)
libmpi_c_mpi_la_SOURCES = \
alloc_mem.c \
comm_get_name.c \
comm_set_name.c \
finalize.c \
free_mem.c \
init.c \
type_commit.c \
type_contiguous.c \
type_create_darray.c \
type_create_f90_complex.c \
type_create_f90_integer.c \
type_create_f90_real.c \
type_create_hindexed.c \
type_create_hvector.c \
type_create_indexed_block.c \
type_create_keyval.c \
type_create_resized.c \
type_create_struct.c \
type_create_subarray.c \
type_delete_attr.c \
type_dup.c \
type_extent.c \
type_free.c \
type_free_keyval.c \
type_get_attr.c \
type_get_contents.c \
type_get_envelope.c \
type_get_extent.c \
type_get_name.c \
type_get_true_extent.c \
type_hindexed.c \
type_hvector.c \
type_indexed.c \
type_lb.c \
type_match_size.c \
type_set_attr.c \
type_set_name.c \
type_size.c \
type_struct.c \
type_ub.c \
type_vector.c
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
#
# This build needs to go through only if profiling is required.
# Further, this build HAS to go through if profiling is required.
#
AM_CPPFLAGS = -DLAM_PROFILING_DEFINES=1 if WANT_PMPI_BINDINGS_LAYER
pmpi_lib = libmpi_c_pmpi.la
# We must traverse into the profile directory to install the proper
# header files. So only only expect to find the C profiling library
# if we're compiling profiling separately.
if COMPILE_PROFILING_SEPARATELY
lib = libmpi_c_profile.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 */