From b99a70fc5b745830e90c778568bbb0e7ba1073bc Mon Sep 17 00:00:00 2001 From: Hui Zhou Date: Sat, 25 Jan 2025 22:39:49 -0600 Subject: [PATCH] test: suppress misc warning messages * Remove leftover `check_PYTHON` call. The PYTHON is already checked with check_python3() earlier. * In checking existence of mydef_boot, check its bin folder. The module path (modules/mydef_boot) may exist even without submodule checkout. * Add cast to suppress the "%lld" printf when the actual type may be "long" instead of "long long". * Add -w in Makefile_f77.mtest to suppress all warnings since gfortran always gives warnings despite -fallow-argument-mismatch. --- test/mpi/Makefile_f77.mtest | 4 +++- test/mpi/autogen.sh | 3 +-- test/mpi/io/large_count.c | 2 +- test/mpi/io/large_dtype.c | 11 ++++++----- 4 files changed, 11 insertions(+), 9 deletions(-) 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/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"); }