summaryrefslogtreecommitdiffstats
path: root/examples/ph5example.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2002-11-11 16:54:30 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2002-11-11 16:54:30 (GMT)
commit4305e64b67d1110ca11225f427afa80d5000f933 (patch)
tree43ff919c39c7e2770b7d0377b16bc53556d6ead1 /examples/ph5example.c
parentdddcde81eac7c9b6d2051320578457e518ed6ba6 (diff)
downloadhdf5-4305e64b67d1110ca11225f427afa80d5000f933.zip
hdf5-4305e64b67d1110ca11225f427afa80d5000f933.tar.gz
hdf5-4305e64b67d1110ca11225f427afa80d5000f933.tar.bz2
[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.
Diffstat (limited to 'examples/ph5example.c')
-rw-r--r--examples/ph5example.c8
1 files 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 <prefix> [-r] [-w] [-v]\n");
+ printf("Usage: testphdf5 [-f <prefix>] [-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);
}