From 4305e64b67d1110ca11225f427afa80d5000f933 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Mon, 11 Nov 2002 11:54:30 -0500 Subject: [svn-r6066] Purpose: Improvement Description: if neither -f option nor $HDF5_PARAPREFIX was set, it exited. Solution: Use '.' (current directory) if neither -f option nor $HDF5_PARAPREFIX is used. Try to proceed as much as possible. Platforms tested: only sleipnir since it was a simple fix and was failing in sleipnir only. --- examples/ph5example.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/ph5example.c b/examples/ph5example.c index 9d2142d..a7de682 100644 --- a/examples/ph5example.c +++ b/examples/ph5example.c @@ -905,10 +905,11 @@ test_split_comm_access(char filenames[][PATH_MAX]) void usage() { - printf("Usage: testphdf5 -f [-r] [-w] [-v]\n"); + printf("Usage: testphdf5 [-f ] [-r] [-w] [-v]\n"); printf("\t-f\tfile prefix for parallel test files.\n"); printf("\t \te.g. pfs:/PFS/myname\n"); printf("\t \tcan be set via $" PARAPREFIX ".\n"); + printf("\t \tDefault is current directory.\n"); printf("\t-c\tno cleanup\n"); printf("\t-r\tno read\n"); printf("\t-w\tno write\n"); @@ -998,10 +999,9 @@ parse_options(int argc, char **argv){ if (testfiles[0][0] == '\0'){ /* try get it from environment variable HDF5_PARAPREFIX */ char *env; + char *env_default = "."; /* default to current directory */ if ((env=getenv(PARAPREFIX))==NULL){ - usage(); - nerrors++; - return(1); + env = env_default; } mkfilenames(env); } -- cgit v0.12