Skip to content

Commit

Permalink
test: suppress misc warning messages
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
hzhou committed Jan 26, 2025
1 parent 69ac105 commit b99a70f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion test/mpi/Makefile_f77.mtest
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions test/mpi/autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ."
Expand Down
2 changes: 1 addition & 1 deletion test/mpi/io/large_count.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 6 additions & 5 deletions test/mpi/io/large_dtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit b99a70f

Please sign in to comment.