diff --git a/Makefile.am b/Makefile.am index 1d4afd58ed4..d926a32c0f3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -54,6 +54,11 @@ external_libs = @WRAPPER_LIBS@ mpi_convenience_libs = pmpi_convenience_libs = @mpllib@ @hwloclib@ @jsonlib@ @yaksalib@ @pmilib@ +if BUILD_ROMIO + external_subdirs += src/mpi/romio + pmpi_convenience_libs += src/mpi/romio/libromio.la +endif + # NOTE on our semi-unconventional usage of DIST_SUBDIRS: # The automake manual recommends thinking of DIST_SUBDIRS as the list of all # *configured* subdirectories. The normal autotools model involves @@ -136,12 +141,6 @@ lib_lib@MPILIBNAME@_la_LDFLAGS = $(ABIVERSIONFLAGS) lib_lib@MPILIBNAME@_la_CPPFLAGS = $(AM_CPPFLAGS) -DMPICH_MPI_FROM_PMPI lib_lib@MPILIBNAME@_la_LIBADD = lib/lib@PMPILIBNAME@.la $(mpi_convenience_libs) -if BUILD_ROMIO - # libpromio contains the PMPI symbols (unlike libpmpi, which contains MPI - # symbols) and should be added to libpmpi - lib_lib@PMPILIBNAME@_la_LIBADD += src/mpi/romio/libpromio.la - lib_lib@MPILIBNAME@_la_LIBADD += src/mpi/romio/libromio.la -endif else !BUILD_PROFILING_LIB lib_LTLIBRARIES += lib/lib@MPILIBNAME@.la @@ -151,9 +150,6 @@ lib_lib@MPILIBNAME@_la_CPPFLAGS = $(AM_CPPFLAGS) lib_lib@MPILIBNAME@_la_LIBADD = $(external_libs) $(pmpi_convenience_libs) $(mpi_convenience_libs) EXTRA_lib_lib@MPILIBNAME@_la_DEPENDENCIES = $(pmpi_convenience_libs) $(mpi_convenience_libs) -if BUILD_ROMIO - lib_lib@MPILIBNAME@_la_LIBADD += src/mpi/romio/libromio.la -endif endif !BUILD_PROFILING_LIB if BUILD_ABI_LIB @@ -177,10 +173,6 @@ lib_lib@MPIABILIBNAME@_la_LDFLAGS = $(ABIVERSIONFLAGS) lib_lib@MPIABILIBNAME@_la_CPPFLAGS = $(AM_CPPFLAGS) -DMPICH_MPI_FROM_PMPI $(abi_cppflags) lib_lib@MPIABILIBNAME@_la_LIBADD = lib/lib@PMPIABILIBNAME@.la $(mpi_convenience_libs) -if BUILD_ROMIO - lib_lib@PMPIABILIBNAME@_la_LIBADD += src/mpi/romio/libpromio_abi.la - lib_lib@MPIABILIBNAME@_la_LIBADD += src/mpi/romio/libromio_abi.la -endif else !BUILD_PROFILING_LIB lib_LTLIBRARIES += lib/lib@MPIABILIBNAME@.la @@ -190,9 +182,6 @@ lib_lib@MPIABILIBNAME@_la_CPPFLAGS = $(AM_CPPFLAGS) $(abi_cppflags) lib_lib@MPIABILIBNAME@_la_LIBADD = $(external_libs) $(pmpi_convenience_libs) $(mpi_convenience_libs) EXTRA_lib_lib@MPIABILIBNAME@_la_DEPENDENCIES = $(pmpi_convenience_libs) $(mpi_convenience_libs) -if BUILD_ROMIO - lib_lib@MPIABILIBNAME@_la_LIBADD += src/mpi/romio/libromio_abi.la -endif endif !BUILD_PROFILING_LIB endif BUILD_ABI_LIB diff --git a/maint/gen_binding_c.py b/maint/gen_binding_c.py index 1a571231ed1..60a18b62187 100644 --- a/maint/gen_binding_c.py +++ b/maint/gen_binding_c.py @@ -175,7 +175,6 @@ def dump_io_funcs(do_abi=False): if not do_abi: dump_out(c_dir + "/io.c") - G.mpi_sources.pop() else: abi_file_path = abi_dir + "/io_abi.c" G.check_write_path(abi_file_path) diff --git a/src/mpi/Makefile.mk b/src/mpi/Makefile.mk index 8d7c4236ee6..b0fa296ff04 100644 --- a/src/mpi/Makefile.mk +++ b/src/mpi/Makefile.mk @@ -22,30 +22,5 @@ include $(top_srcdir)/src/mpi/topo/Makefile.mk include $(top_srcdir)/src/mpi/stream/Makefile.mk include $(top_srcdir)/src/mpi/threadcomm/Makefile.mk -if BUILD_ROMIO -SUBDIRS += src/mpi/romio -DIST_SUBDIRS += src/mpi/romio -MANDOC_SUBDIRS += src/mpi/romio -HTMLDOC_SUBDIRS += src/mpi/romio - -# This was previously a hard copy (not a symlink) performed by config.status -# (specified via AC_CONFIG_COMMANDS). Ideally we would eliminate this "copy" -# altogether and just set -Iromio_include_dir, but MPE2's build system uses -# $(top_builddir)/bin/mpicc that can't handle more than one include dir. -# -# Using a symlink allows us to avoid trying to capture the full dependency chain -# of MPICH/mpio.h --> ROMIO/mpio.h --> ROMIO/mpio.h.in --> ROMIO/config.status --> ...MORE_AUTOTOOLS... -BUILT_SOURCES += $(top_builddir)/src/include/mpio.h -$(top_builddir)/src/include/mpio.h: $(top_builddir)/src/mpi/romio/include/mpio.h - if test ! -h $(top_builddir)/src/include/mpio.h ; then \ - rm -f $(top_builddir)/src/include/mpio.h ; \ - ( cd $(top_builddir)/src/include && \ - $(LN_S) ../mpi/romio/include/mpio.h ) ; \ - fi - -DISTCLEANFILES += $(top_builddir)/src/include/mpio.h - -endif BUILD_ROMIO - # dir is present but currently intentionally unbuilt #include $(top_srcdir)/src/mpi/io/Makefile.mk diff --git a/src/mpi/romio/configure.ac b/src/mpi/romio/configure.ac index da28bbd5761..8f51989e095 100644 --- a/src/mpi/romio/configure.ac +++ b/src/mpi/romio/configure.ac @@ -21,7 +21,7 @@ dnl AC_CONFIG_AUX_DIR(../../../confdb) dnl Set the directory that contains the required install-sh, config.sub, dnl and config.guess . Make sure that these are updated (in MPICH, use dnl the top-level confdb files). This separate directory is used for -dnl the moment to allow ROMIO to be separatedly distributed. +dnl the moment to allow ROMIO to be separately distributed. dnl scripts. AC_CONFIG_AUX_DIR([confdb]) AC_CONFIG_MACRO_DIR([confdb]) @@ -105,6 +105,8 @@ AC_ARG_VAR([FROM_OMPI],[set to "yes" if building ROMIO inside of Open MPI]) FROM_OMPI=${FROM_OMPI:-no} if test "$FROM_OMPI" = 1 ; then FROM_OMPI=yes ; fi +AM_CONDITIONAL([BUILD_BINDING], [test "$FROM_MPICH" != "yes"]) + # MPL AC_ARG_VAR([MPLLIBNAME],[can be used to override the name of the MPL library (default: "mpl")]) MPLLIBNAME=${MPLLIBNAME:-"mpl"} @@ -693,7 +695,9 @@ AM_CONDITIONAL([BUILD_MPIO_ERRHAN],[false]) # if we don't have weak symbol support, we must build a separate convenience # library in order to provide the "PMPI_" symbols -AM_CONDITIONAL([BUILD_PROFILING_LIB],[test "x$HAVE_WEAK_SYMBOLS" = "x0"]) +# MPICH will generate separate binding layer, thus we can skip PROFILING LIB +# if build inside MPICH +AM_CONDITIONAL([BUILD_PROFILING_LIB],[test "x$HAVE_WEAK_SYMBOLS" = "x0" -a "$FROM_MPICH" != "yes"]) # disable visibility if building profiling library if test "x$HAVE_WEAK_SYMBOLS" = "x0" ; then VISIBILITY_CFLAGS="" diff --git a/src/mpi/romio/mpi-io/Makefile.mk b/src/mpi/romio/mpi-io/Makefile.mk index 3bde1b94256..621fa85016f 100644 --- a/src/mpi/romio/mpi-io/Makefile.mk +++ b/src/mpi/romio/mpi-io/Makefile.mk @@ -9,6 +9,7 @@ include $(top_srcdir)/mpi-io/fortran/Makefile.mk AM_CPPFLAGS += -I$(top_builddir)/mpi-io -I$(top_srcdir)/mpi-io noinst_HEADERS += mpi-io/mpioimpl.h mpi-io/mpioprof.h +if BUILD_BINDING romio_mpi_sources += \ mpi-io/close.c \ mpi-io/delete.c \ @@ -68,6 +69,7 @@ romio_mpi_sources += \ mpi-io/write_ordb.c \ mpi-io/write_orde.c \ mpi-io/write_sh.c +endif BUILD_BINDING # non-MPI/PMPI sources that will be included in libromio