summaryrefslogtreecommitdiffstats
path: root/testpar/t_shapesame.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-10-28 04:18:24 (GMT)
committerGitHub <noreply@github.com>2023-10-28 04:18:24 (GMT)
commit1bcef50b864fb1ea6e00900b3982e71d183cfda5 (patch)
tree4f88bd92088de8e0def6b93e6419c5307076ed0d /testpar/t_shapesame.c
parent119e694f971470b26876d227ceedbaab36eef275 (diff)
downloadhdf5-1bcef50b864fb1ea6e00900b3982e71d183cfda5.zip
hdf5-1bcef50b864fb1ea6e00900b3982e71d183cfda5.tar.gz
hdf5-1bcef50b864fb1ea6e00900b3982e71d183cfda5.tar.bz2
Print some messages in parallel tests on MPI rank 0 only (#3785)
Avoids overly verbose output from all processes emitting progress, etc. info.
Diffstat (limited to 'testpar/t_shapesame.c')
-rw-r--r--testpar/t_shapesame.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c
index 98e3077..0a3d3d0 100644
--- a/testpar/t_shapesame.c
+++ b/testpar/t_shapesame.c
@@ -4089,7 +4089,8 @@ parse_options(int argc, char **argv)
case 'h': /* print help message--return with nerrors set */
return (1);
default:
- printf("Illegal option(%s)\n", *argv);
+ if (MAINPROCESS)
+ printf("Illegal option(%s)\n", *argv);
nerrors++;
return (1);
}
@@ -4098,12 +4099,14 @@ parse_options(int argc, char **argv)
/* check validity of dimension and chunk sizes */
if (dim0 <= 0 || dim1 <= 0) {
- printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
+ if (MAINPROCESS)
+ printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
nerrors++;
return (1);
}
if (chunkdim0 <= 0 || chunkdim1 <= 0) {
- printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
+ if (MAINPROCESS)
+ printf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
nerrors++;
return (1);
}
@@ -4128,9 +4131,11 @@ parse_options(int argc, char **argv)
nerrors++;
return (1);
}
- printf("Test filenames are:\n");
- for (i = 0; i < n; i++)
- printf(" %s\n", filenames[i]);
+ if (MAINPROCESS) {
+ printf("Test filenames are:\n");
+ for (i = 0; i < n; i++)
+ printf(" %s\n", filenames[i]);
+ }
}
return (0);