diff --git a/configure.ac b/configure.ac index 5913b010e61..1533d244f9a 100644 --- a/configure.ac +++ b/configure.ac @@ -1383,7 +1383,6 @@ if test "$with_cross" != "no" ; then fi # This goes here because we need the top_srcdir -HAVE_CXX_IO=0 if test "$enable_romio" = "yes" ; then if test -d $use_top_srcdir/src/mpi/romio ; then AC_DEFINE(HAVE_ROMIO,1,[Define if ROMIO is enabled]) @@ -1403,10 +1402,9 @@ if test "$enable_romio" = "yes" ; then # This test used -e under Linux, but not all test programs understand # -e if test ! -d lib ; then mkdir lib ; fi - # tell mpi.h to include mpio.h - HAVE_ROMIO='#include "mpio.h"' - # tell mpicxx.h that we have IO - HAVE_CXX_IO=1 + # define ROMIO_VERSION in mpi.h so application can check whether ROMIO is included + ROMIO_VERSION='#define ROMIO_VERSION 126' + romio_subdir_args="" if test "$enable_mpi_abi" = "yes" ; then romio_subdir_args="--enable-mpi-abi" @@ -1416,8 +1414,7 @@ if test "$enable_romio" = "yes" ; then AC_MSG_WARN([ROMIO src directory is not available]) fi fi -AC_SUBST(HAVE_ROMIO) -AC_SUBST(HAVE_CXX_IO) +AC_SUBST(ROMIO_VERSION) AM_CONDITIONAL([BUILD_ROMIO], [test x$enable_romio = xyes]) # @@ -3383,17 +3380,14 @@ AC_DEFINE_UNQUOTED([MPIR_OFFSET_MAX],[$MPIR_OFFSET_MAX],[limits.h _MAX constant MPI_OFFSET_TYPEDEF="typedef $MPI_OFFSET MPI_Offset;" AC_SUBST(MPI_OFFSET_TYPEDEF) # -# Fortran type for an Offset type (needed to define MPI_DISPLACEMENT_CURRENT -# The value for this comes from ROMIO, and is needed in mpif.h.in +# Fortran type for an Offset type (needed to define MPI_DISPLACEMENT_CURRENT) +# and is needed in mpif.h.in. # First, we check that this works with both Fortran compilers (if # they are defined) # -# If there is no FORTRAN_MPI_OFFSET type (because ROMIO is disabled), -# just use INTEGER -if test -z "$FORTRAN_MPI_OFFSET" ; then - FORTRAN_MPI_OFFSET=INTEGER -fi if test "$enable_f77" = yes -a "$enable_f90" = yes ; then + FORTRAN_MPI_OFFSET="INTEGER(KIND=$OFFSET_KIND)" + AC_LANG_PUSH([Fortran 77]) AC_MSG_CHECKING([whether the Fortran Offset type works with Fortran 77]) AC_COMPILE_IFELSE([ diff --git a/maint/gen_binding_f08.py b/maint/gen_binding_f08.py index 0af0904b764..4c91e5de28c 100644 --- a/maint/gen_binding_f08.py +++ b/maint/gen_binding_f08.py @@ -11,7 +11,7 @@ import os def main(): - # currently support -no-real128, -no-mpiio, -fint-size, -aint-size, -count-size, -cint-size + # currently support -no-real128, -fint-size, -aint-size, -count-size, -cint-size G.parse_cmdline() binding_dir = G.get_srcdir_path("src/binding") diff --git a/maint/gen_binding_f77.py b/maint/gen_binding_f77.py index dc56f779c31..0aed977ac24 100644 --- a/maint/gen_binding_f77.py +++ b/maint/gen_binding_f77.py @@ -11,7 +11,7 @@ import os def main(): - # currently support -no-real128, -no-mpiio, -aint-is-int + # currently support -no-real128, -aint-is-int G.parse_cmdline() binding_dir = G.get_srcdir_path("src/binding") diff --git a/maint/local_python/binding_f08.py b/maint/local_python/binding_f08.py index 64d1e12040b..e794650640c 100644 --- a/maint/local_python/binding_f08.py +++ b/maint/local_python/binding_f08.py @@ -1182,16 +1182,18 @@ def dump_handle_routines(): else: G.out.append(" res = (f08%MPI_VAL /= f)") G.out.append("END FUNCTION %s" % func_name) - # e.g. MPI_Comm_f2c + + def dump_handle_f2c(): + # e.g. MPI_Comm_f2c/c2f + G.out.append("INTERFACE") + G.out.append("INDENT") for a in G.handle_list: - if a == "MPI_File": - continue if RE.match(r'MPIX?_(\w+)', a): c_name = "c_" + RE.m.group(1) for p in [("f", "c"), ("c", "f")]: func_name = "%s_%s2%s" % (a, p[0], p[1]) G.out.append("") - G.out.append("FUNCTION %s(x) result(res)" % func_name) + G.out.append("FUNCTION %s(x) bind(C, name=\"P%s\") result(res)" % (func_name, func_name)) G.out.append(" USE mpi_c_interface_types, ONLY: %s" % c_name) if p[0] == "f": G.out.append(" INTEGER, VALUE :: x") @@ -1199,25 +1201,7 @@ def dump_handle_routines(): else: G.out.append(" INTEGER(%s), VALUE :: x" % c_name) G.out.append(" INTEGER :: res") - G.out.append(" res = x") G.out.append("END FUNCTION %s" % func_name) - - def dump_file_interface(): - G.out.append("") - G.out.append("INTERFACE") - G.out.append("INDENT") - for p in [("f", "c"), ("c", "f")]: - func_name = "MPI_File_%s2%s" % (p[0], p[1]) - G.out.append("") - G.out.append("FUNCTION %s(x) bind(C, name=\"%s\") result(res)" % (func_name, func_name)) - G.out.append(" USE mpi_c_interface_types, ONLY: c_File") - if p[0] == "f": - G.out.append(" INTEGER, VALUE :: x") - G.out.append(" INTEGER(c_File) :: res") - else: - G.out.append(" INTEGER(c_File), VALUE :: x") - G.out.append(" INTEGER :: res") - G.out.append("END FUNCTION MPI_File_%s2%s" % (p[0], p[1])) G.out.append("DEDENT") G.out.append("END INTERFACE") @@ -1270,8 +1254,7 @@ def dump_sizeof_routines(): G.out.append("") G.out.append("private :: c_int, c_Count, c_Status") dump_handle_types() - if "no-mpiio" not in G.opts: - dump_file_interface() + dump_handle_f2c() dump_status_type() dump_status_interface() dump_handle_interface() diff --git a/maint/local_python/mpi_api.py b/maint/local_python/mpi_api.py index 73c0364efe1..a0e8597efc9 100644 --- a/maint/local_python/mpi_api.py +++ b/maint/local_python/mpi_api.py @@ -245,71 +245,6 @@ def parse_param_attributes(p): else: p['asynchronous'] = False -# FIXME: until ROMIO interface are generated -def get_mpiio_func_list(): - io_func_name_list = [ - "MPI_File_c2f", - "MPI_File_close", - "MPI_File_delete", - "MPI_File_errhandler_function", - "MPI_File_f2c", - "MPI_File_get_amode", - "MPI_File_get_atomicity", - "MPI_File_get_byte_offset", - "MPI_File_get_group", - "MPI_File_get_info", - "MPI_File_get_position", - "MPI_File_get_position_shared", - "MPI_File_get_size", - "MPI_File_get_type_extent", - "MPI_File_get_view", - "MPI_File_iread", - "MPI_File_iread_all", - "MPI_File_iread_at", - "MPI_File_iread_at_all", - "MPI_File_iread_shared", - "MPI_File_iwrite", - "MPI_File_iwrite_all", - "MPI_File_iwrite_at", - "MPI_File_iwrite_at_all", - "MPI_File_iwrite_shared", - "MPI_File_open", - "MPI_File_preallocate", - "MPI_File_read", - "MPI_File_read_all", - "MPI_File_read_all_begin", - "MPI_File_read_all_end", - "MPI_File_read_at", - "MPI_File_read_at_all", - "MPI_File_read_at_all_begin", - "MPI_File_read_at_all_end", - "MPI_File_read_ordered", - "MPI_File_read_ordered_begin", - "MPI_File_read_ordered_end", - "MPI_File_read_shared", - "MPI_File_seek", - "MPI_File_seek_shared", - "MPI_File_set_atomicity", - "MPI_File_set_info", - "MPI_File_set_size", - "MPI_File_set_view", - "MPI_File_sync", - "MPI_File_write", - "MPI_File_write_all", - "MPI_File_write_all_begin", - "MPI_File_write_all_end", - "MPI_File_write_at", - "MPI_File_write_at_all", - "MPI_File_write_at_all_begin", - "MPI_File_write_at_all_end", - "MPI_File_write_ordered", - "MPI_File_write_ordered_begin", - "MPI_File_write_ordered_end", - "MPI_File_write_shared", - "MPI_Register_datarep" - ] - return [G.FUNCS[a.lower()] for a in io_func_name_list] - def get_f77_dummy_func_list(): dummy_func_name_list = [ "MPI_DUP_FN", diff --git a/src/binding/c/io_api.txt b/src/binding/c/io_api.txt index 02d3257b74f..389d5cde9c6 100644 --- a/src/binding/c/io_api.txt +++ b/src/binding/c/io_api.txt @@ -111,6 +111,7 @@ MPI_File_read_at_all_begin: MPI_File_read_at_all_end: .desc: Complete a split collective read using + .skip: validate-buf MPI_File_read_all_begin: .desc: Begin a split collective read using individual file pointer @@ -120,6 +121,7 @@ MPI_File_read_all: MPI_File_read_all_end: .desc: Complete a split collective read using + .skip: validate-buf MPI_File_read_at_all: .desc: Collective read using explicit offset @@ -138,6 +140,7 @@ MPI_File_read_ordered: MPI_File_read_ordered_end: .desc: Complete a split collective read using shared file pointer + .skip: validate-buf MPI_File_read_shared: .desc: Read using shared file pointer @@ -172,6 +175,7 @@ MPI_File_write_at_all_begin: MPI_File_write_at_all_end: .desc: Complete a split collective write using explicit offset + .skip: validate-buf MPI_File_write_all_begin: .desc: Begin a split collective write using @@ -181,6 +185,7 @@ MPI_File_write_all: MPI_File_write_all_end: .desc: Complete a split collective write using individual file pointer + .skip: validate-buf MPI_File_write_at_all: .desc: Collective write using explicit offset @@ -199,6 +204,7 @@ MPI_File_write_ordered: MPI_File_write_ordered_end: .desc: Complete a split collective write using shared file pointer + .skip: validate-buf MPI_File_write_shared: .desc: Write using shared file pointer diff --git a/src/binding/cxx/buildiface b/src/binding/cxx/buildiface index 83f4106235c..0f64b31f61b 100755 --- a/src/binding/cxx/buildiface +++ b/src/binding/cxx/buildiface @@ -1254,12 +1254,6 @@ typedef int MPI_File;\ # Begin the class, writing the common operations (destructors etc.) &BeginClass( $class ); - # Hack to ifdef out the file routines - if ($class eq "file") { - # Define the file type only if supported. - print $OUTFD "#if \@HAVE_CXX_IO\@\n"; - } - foreach $mpilevel (@mpilevels) { if ($mpilevel eq "post") { $printed_extra_fnc = 1; @@ -1307,11 +1301,6 @@ typedef int MPI_File;\ &$extrafnc( $OUTFD ); } - # Hack to ifdef out the file routines - if ($class eq "file") { - # Define the file type only if supported. - print $OUTFD "#endif\n"; - } &EndClass; # Special case. Once we define a Datatype, add this typedef @@ -1347,11 +1336,9 @@ typedef int MPI_File;\ # Only define these typedefs when MPI-IO is available (this is the same # test as used for the rest of the I/O routines ); print $OUTFD "\ -#if \@HAVE_CXX_IO\@ typedef int Datarep_extent_function( const Datatype&, Aint&, void *); typedef int Datarep_conversion_function( void *, Datatype &, int, void *, Offset, void * ); -#endif \n"; print $OUTFD "\n"; @@ -1995,13 +1982,6 @@ extern Datatype TWOINTEGER; else { print $OUTFD ";\n"; } } - print $OUTFD "// Include these only if MPI-IO is available\n"; - if ($giveValue) { - print $OUTFD "#ifdef HAVE_ROMIO\n"; - } else { - print $OUTFD "#if \@HAVE_CXX_IO\@\n"; - } - # Other file constants foreach $int (MAX_DATAREP_STRING) { print $OUTFD "${extern}const int $int"; @@ -2021,7 +2001,6 @@ extern Datatype TWOINTEGER; if ($giveValue) { print $OUTFD " = MPI_MODE_$int;\n"; } else { print $OUTFD ";\n"; } } - print $OUTFD "#endif // IO\n"; # Some modes are for RMA, not I/O foreach $int (NOCHECK,NOPRECEDE, NOPUT, NOSTORE, NOSUCCEED) { @@ -2654,7 +2633,6 @@ void Win::Call_errhandler( int errorcode ) const MPI_Win_call_errhandler( (MPI_Win) the_real_win, errorcode ); } -#ifdef HAVE_ROMIO void File::Call_errhandler( int errorcode ) const { // we must free the Errhandler object returned from Get_errhandler because @@ -2671,7 +2649,6 @@ void File::Call_errhandler( int errorcode ) const } MPI_File_call_errhandler( (MPI_File) the_real_file, errorcode ); } -#endif // IO // Helper function to invoke the comm_world C++ error handler. void MPIR_Call_world_errhand( int err ) @@ -2685,7 +2662,6 @@ EOT # The data rep conversion functions need to be wrapped in C code # Only define this routine when MPI-IO is available (this is the same # test as used for the rest of the I/O routines ); -print $OUTFD "#ifdef HAVE_ROMIO\n"; print $OUTFD " extern \"C\" { // @@ -2747,7 +2723,6 @@ void Register_datarep( const char *datarep, routine for ldata will never be freed */ } "; -print $OUTFD "#endif\n"; print $OUTFD "\ diff --git a/src/binding/cxx/user_proxy.inc b/src/binding/cxx/user_proxy.inc index ab960ff0d20..f6be5b1abfc 100644 --- a/src/binding/cxx/user_proxy.inc +++ b/src/binding/cxx/user_proxy.inc @@ -32,9 +32,7 @@ struct CXX_errhan_state { union { MPI::Comm::Errhandler_function * comm_err_fn; MPI::Win::Errhandler_function * win_err_fn; -#ifdef HAVE_ROMIO MPI::File::Errhandler_function * file_err_fn; -#endif // MPI::Session::Errhandler_function * session_err_fn; } u; }; @@ -60,14 +58,12 @@ static void CXX_win_errhan_proxy(MPI_Win win, int error_code, void *extra_state) p->u.win_err_fn(h, &error_code); } -#ifdef HAVE_ROMIO static void CXX_file_errhan_proxy(MPI_File file, int error_code, void *extra_state) { CXX_errhan_state *p = (CXX_errhan_state *) extra_state; MPI::File h = file; p->u.file_err_fn(h, &error_code); } -#endif static void CXX_errhan_free(void *extra_state) { @@ -100,7 +96,6 @@ Errhandler Win::Create_errhandler(MPI::Win::Errhandler_function *f) return e1; } -#ifdef HAVE_ROMIO Errhandler File::Create_errhandler(MPI::File::Errhandler_function *f) { CXX_errhan_state *p = new(CXX_errhan_state); @@ -113,4 +108,3 @@ Errhandler File::Create_errhandler(MPI::File::Errhandler_function *f) e1.the_real_errhandler = eh; return e1; } -#endif diff --git a/src/include/mpi.h.in b/src/include/mpi.h.in index 80b71af2ff2..da22ec56e92 100644 --- a/src/include/mpi.h.in +++ b/src/include/mpi.h.in @@ -43,6 +43,8 @@ #define MPICH 1 #define MPICH_HAS_C2F 1 +@ROMIO_VERSION@ + /* MPICH_VERSION is the version string. MPICH_NUMVERSION is the * numeric version that can be used in numeric comparisons. * diff --git a/src/mpi/romio/Makefile.am b/src/mpi/romio/Makefile.am index a6429766fd4..bb152a8f779 100644 --- a/src/mpi/romio/Makefile.am +++ b/src/mpi/romio/Makefile.am @@ -52,7 +52,9 @@ AM_CPPFLAGS += $(MPI_H_INCLUDE) # handle the "include" directory here AM_CPPFLAGS += -I$(top_builddir)/include -I$(top_srcdir)/include $(external_includes) # nodist_ b/c these are created by config.status and should not be distributed +if INSTALL_HEADERS nodist_include_HEADERS += include/mpio.h include/mpiof.h +endif # ------------------------------------------------------------------------ diff --git a/src/mpi/romio/configure.ac b/src/mpi/romio/configure.ac index 6a42e3254d1..65f9fff2587 100644 --- a/src/mpi/romio/configure.ac +++ b/src/mpi/romio/configure.ac @@ -106,6 +106,7 @@ FROM_OMPI=${FROM_OMPI:-no} if test "$FROM_OMPI" = 1 ; then FROM_OMPI=yes ; fi AM_CONDITIONAL([BUILD_BINDING], [test "$FROM_MPICH" != "yes"]) +AM_CONDITIONAL([INSTALL_HEADERS], [test "$FROM_MPICH" != "yes"]) # MPL AC_ARG_VAR([MPLLIBNAME],[can be used to override the name of the MPL library (default: "mpl")]) @@ -1556,10 +1557,6 @@ fi AC_SUBST(EXTRA_SRC_DIRS) AC_SUBST(FILE_SYS_DIRS) -# -CFLAGS="$CFLAGS -DHAVE_ROMIOCONF_H" -# - AC_MSG_NOTICE([setting SYSDEP_INC to $SYSDEP_INC]) AC_SUBST(SYSDEP_INC) diff --git a/test/mpi/Makefile_f77.mtest b/test/mpi/Makefile_f77.mtest index 0282b49742b..126b0525110 100644 --- a/test/mpi/Makefile_f77.mtest +++ b/test/mpi/Makefile_f77.mtest @@ -15,7 +15,9 @@ AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include # This is right for many platforms, but not all. The right fix involves a # configure test, but this version is no worse than the simplemake version was. -AM_FFLAGS = -I. +# Add -w to suppress all warnings. Compilers such as gfortrans warns even with +# -fallow-argument-mismatch. +AM_FFLAGS = -I. -w LDADD = $(top_builddir)/util/libmtest_f77.la mtest_c_objects = $(top_builddir)/util/libmtest_single.la diff --git a/test/mpi/autogen.sh b/test/mpi/autogen.sh index 0498768f75d..22d0d252492 100755 --- a/test/mpi/autogen.sh +++ b/test/mpi/autogen.sh @@ -64,7 +64,7 @@ check_copy() { generate_benchmarks() { MYDEF_BOOT=$PWD/../../modules/mydef_boot - if test -d $MYDEF_BOOT ; then + if test -d $MYDEF_BOOT/bin ; then echo "Generating benchmark tests" export PATH=$MYDEF_BOOT/bin:$PATH export PERL5LIB=$MYDEF_BOOT/lib/perl5 @@ -127,7 +127,6 @@ for dir in errors/f77/* ; do done echo "done" -check_PYTHON $PYTHON maint/gen_all_mpitests.py echo "Running autoreconf in ." diff --git a/test/mpi/configure.ac b/test/mpi/configure.ac index 9a7ed7b50dc..24db03e3a1a 100644 --- a/test/mpi/configure.ac +++ b/test/mpi/configure.ac @@ -490,6 +490,13 @@ if test "$MPI_IS_MPICH" = "yes" ; then enable_threadcomm=no fi + # disable-romio + if test "$enable_romio" != "no" ; then + if grep 'disable-romio\|enable-romio=no' conftest.output > /dev/null ; then + enable_romio=no + fi + fi + # enable_checkerrors if test "$enable_checkerrors" != "no" ; then if grep 'disable-error-checking\|enable-error-checking=no' conftest.output > /dev/null ; then @@ -1565,11 +1572,6 @@ if test "$enable_cxx" = yes ; then AC_MSG_WARN([The compiler $CXX does not support C++ namespaces. This may cause problems for the tests]) fi AC_LANG_POP([C++]) - - dnl for util/mtest_cxx.cxx - if test "$mpi_io_works" = "yes" ; then - AC_DEFINE(HAVE_MPI_IO,1,[Define if MPI-IO (really ROMIO) is included]) - fi fi AC_LANG_C @@ -1591,6 +1593,9 @@ if test "$enable_romio" != no -a "$mpi_io_works" = yes ; then if test "$pac_cv_have_mpio_request" = no ; then AC_DEFINE(MPIO_USES_MPI_REQUEST,,[Define if MPI IO uses MPI_Request]) fi + + dnl for util/mtest_cxx.cxx, comm/cmsplit_type.c + AC_DEFINE(HAVE_MPI_IO,1,[Define if MPI-IO (really ROMIO) is included]) fi AC_SUBST(iodir) diff --git a/test/mpi/io/large_count.c b/test/mpi/io/large_count.c index dedbdb79106..ccf046a7ed6 100644 --- a/test/mpi/io/large_count.c +++ b/test/mpi/io/large_count.c @@ -67,7 +67,7 @@ int main(int argc, char **argv) if (rank == 0) { printf("nprocs=%d NVARS=%d LEN=%d\n", nprocs, NVARS, LEN); printf("Expecting file size=%lld bytes (%.1f MB, %.1f GB)\n", - fsize, (float) fsize / 1048576, (float) fsize / 1073741824); + (long long) fsize, (float) fsize / 1048576, (float) fsize / 1073741824); printf("Each global variable is of size %d bytes (%.1f MB)\n", gsize[0] * gsize[1], (float) gsize[0] * gsize[1] / 1048576); printf("Each process writes %zd bytes (%.1f MB, %.1f GB)\n", diff --git a/test/mpi/io/large_dtype.c b/test/mpi/io/large_dtype.c index 5ca4e0985bc..5f5722b0521 100644 --- a/test/mpi/io/large_dtype.c +++ b/test/mpi/io/large_dtype.c @@ -156,11 +156,12 @@ int main(int argc, char **argv) printf("Output file name = %s\n", filename); printf("nprocs=%d nvars=%d len=%d\n", nprocs, nvars, len); printf("Expecting file size=%lld bytes (%.1f MB, %.1f GB)\n", - fsize * 2, (float) fsize * 2 / 1048576, (float) fsize * 2 / 1073741824); - printf("Each global variable is of size %d bytes (%.1f MB)\n", - gsize[0] * gsize[1], (float) gsize[0] * gsize[1] / 1048576); - printf("Each process writes %zd bytes (%.1f MB, %.1f GB)\n", - buf_len, (float) buf_len / 1048576, (float) buf_len / 1073741824); + (long long) fsize * 2, (float) fsize * 2 / 1048576, + (float) fsize * 2 / 1073741824); + printf("Each global variable is of size %d bytes (%.1f MB)\n", gsize[0] * gsize[1], + (float) gsize[0] * gsize[1] / 1048576); + printf("Each process writes %zd bytes (%.1f MB, %.1f GB)\n", buf_len, + (float) buf_len / 1048576, (float) buf_len / 1073741824); printf("** For nonblocking I/O test, the amount is twice\n"); printf("-------------------------------------------------------\n"); }