summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-08-15 17:08:16 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-08-15 17:08:16 (GMT)
commit3a504899eef1a66031c6f52623c24bb4e51ca51e (patch)
treee32cff5395ceb53020ca5c59ccf214a525d7ab9f
parent6b8d369a0c8e3f317fd7c3b665254c75265ceba0 (diff)
parent8ef09e5ce9f191c2a7af301f1aec9254f4458a50 (diff)
downloadhdf5-3a504899eef1a66031c6f52623c24bb4e51ca51e.zip
hdf5-3a504899eef1a66031c6f52623c24bb4e51ca51e.tar.gz
hdf5-3a504899eef1a66031c6f52623c24bb4e51ca51e.tar.bz2
Merge pull request #1875 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '8ef09e5ce9f191c2a7af301f1aec9254f4458a50': Correct name of folder Mostly whitespace in testpar, addl changes for tmp dir Whitespace cleanup
-rw-r--r--test/CMakeTests.cmake10
-rw-r--r--test/Makefile.am3
-rw-r--r--test/links.c194
-rw-r--r--test/links_env.c76
-rw-r--r--test/testlinks_env.sh.in12
-rw-r--r--test/testvds_env.sh.in8
-rw-r--r--testpar/t_chunk_alloc.c159
-rw-r--r--testpar/testphdf5.c366
-rw-r--r--tools/test/perform/perf.c12
-rw-r--r--tools/test/perform/sio_engine.c12
-rw-r--r--tools/test/perform/sio_perf.c2
11 files changed, 427 insertions, 427 deletions
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 587af80..b7eaa56 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -444,7 +444,7 @@ set (test_CLEANFILES
cache_logging.out
vds_swmr.h5
vds_swmr_src_*.h5
- tmp/vds_src_2.h5
+ tmp_vds_env/vds_src_2.h5
direct_chunk.h5
native_vol_test.h5
)
@@ -613,7 +613,7 @@ else ()
-D "TEST_PROGRAM=$<TARGET_FILE:vds_env>"
-D "TEST_ARGS:STRING="
-D "TEST_ENV_VAR:STRING=HDF5_VDS_PREFIX"
- -D "TEST_ENV_VALUE:STRING=\${ORIGIN}/tmp"
+ -D "TEST_ENV_VALUE:STRING=\${ORIGIN}/tmp_vds_env"
-D "TEST_EXPECT=0"
-D "TEST_SKIP_COMPARE=TRUE"
-D "TEST_OUTPUT=vds_env.txt"
@@ -837,7 +837,7 @@ add_test (NAME H5TEST-links_env-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
extlinks_env0.h5
extlinks_env1.h5
- tmp/extlinks_env1.h5
+ tmp_links_env/extlinks_env1.h5
WORKING_DIRECTORY
${HDF5_TEST_BINARY_DIR}/H5TEST
)
@@ -850,7 +850,7 @@ else ()
-D "TEST_PROGRAM=$<TARGET_FILE:links_env>"
-D "TEST_ARGS:STRING="
#-D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX"
- #-D "TEST_ENV_VALUE:STRING=.:tmp"
+ #-D "TEST_ENV_VALUE:STRING=.:tmp_links_env"
-D "TEST_EXPECT=0"
-D "TEST_OUTPUT=links_env.txt"
-D "TEST_REFERENCE=links_env.out"
@@ -860,7 +860,7 @@ else ()
endif ()
set_tests_properties (H5TEST-links_env PROPERTIES
FIXTURES_REQUIRED clear_links_env
- ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_EXT_PREFIX=.:tmp"
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_EXT_PREFIX=.:tmp_links_env"
WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST
)
diff --git a/test/Makefile.am b/test/Makefile.am
index aa6afee..ff6d1c6 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -184,7 +184,8 @@ CHECK_CLEANFILES+=accum.h5 cmpd_dset.h5 compact_dataset.h5 dataset.h5 dset_offse
sys_file1 tfile[1-7].h5 th5s[1-4].h5 lheap.h5 fheap.h5 ohdr.h5 \
stab.h5 extern_[1-5].h5 extern_[1-4][rw].raw gheap[0-4].h5 \
ohdr_min_a.h5 ohdr_min_b.h5 min_dset_ohdr_testfile.h5\
- dt_arith[1-2] links.h5 links[0-6]*.h5 extlinks[0-15].h5 tmp \
+ dt_arith[1-2] links.h5 links[0-6]*.h5 extlinks[0-15].h5 \
+ tmp tmp_links tmp2_links tmp_links_env tmp_vds_env \
big.data big[0-9][0-9][0-9][0-9][0-9].h5 \
stdio.h5 sec2.h5 dtypes[0-9].h5 dtypes1[0].h5 dt_arith[1-2].h5 tattr.h5 \
tselect.h5 mtime.h5 unlink.h5 unicode.h5 coord.h5 \
diff --git a/test/links.c b/test/links.c
index 4ade33a..cd44433 100644
--- a/test/links.c
+++ b/test/links.c
@@ -106,7 +106,7 @@ const char *FILENAME[] = {
#define CORE_INCREMENT 1024
#define NUM40 40
-/* do not do check_all_closed() for "ext*" files and "tmp/ext*" */
+/* do not do check_all_closed() for "ext*" files and "tmp_links/ext*" */
#define EXTSTOP 12
#define LINK_BUF_SIZE 1024
@@ -2562,9 +2562,9 @@ error:
*
* Purpose: 1. target link: "extlinks2"
* 2. main file: "extlinks0"
- * 3. target file: "tmp/extlinks2"
- * 4. Set up external link prefix via H5Pset_elink_prefix() to be "tmp"
- * Should be able to access the target file in tmp directory via the prefix set
+ * 3. target file: "tmp_links/extlinks2"
+ * 4. Set up external link prefix via H5Pset_elink_prefix() to be "tmp_links"
+ * Should be able to access the target file in tmp_links directory via the prefix set
* by H5Pset_elink_prefix()
*
*
@@ -2592,11 +2592,11 @@ external_link_prefix(hid_t fapl, hbool_t new_format)
/* set up name for external linked target file: "extlinks2" */
h5_fixname(FILENAME[16], fapl, filename2, sizeof filename2);
- /* create tmp directory and get current working directory path */
+ /* create tmp_links directory and get current working directory path */
if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
TEST_ERROR
- /* set up name for target file: "tmp/extlinks2" */
+ /* set up name for target file: "tmp_links/extlinks2" */
h5_fixname(FILENAME[17], fapl, filename3, sizeof filename3);
/* Create the target file */
@@ -2626,7 +2626,7 @@ external_link_prefix(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from pathnames set via H5Pset_elink_prefix() */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp directory.");
+ HDputs(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -2650,8 +2650,8 @@ error:
* Function: external_link_abs_mainpath: test 3
*
* Purpose: 1. target link: "extlinks3"
- * 2. main file: Linux:"/CWD/tmp/extlinks0"; Windows: "<cur drive>:/CWD/tmp/extlinks0"
- * 3. target file: "tmp/extlinks3"
+ * 2. main file: Linux:"/CWD/tmp_links/extlinks0"; Windows: "<cur drive>:/CWD/tmp_links/extlinks0"
+ * 3. target file: "tmp_links/extlinks3"
* Should be able to access the target file via the main file's absolute path
*
* Return: Success: 0
@@ -2676,17 +2676,17 @@ external_link_abs_mainpath(hid_t fapl, hbool_t new_format)
/* set up name for external linked target file: "extlinks3" */
h5_fixname(FILENAME[18], fapl, filename2, sizeof filename2);
- /* set up name for target file: "tmp/extlinks3" */
+ /* set up name for target file: "tmp_links/extlinks3" */
h5_fixname(FILENAME[19], fapl, filename3, sizeof filename3);
- /* create tmp directory and get current working directory path */
+ /* create tmp_links directory and get current working directory path */
if((HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) || (NULL == HDgetcwd(cwdpath, (size_t)NAME_BUF_SIZE)))
TEST_ERROR
/*
* set up name for main file:
- * Linux: "/CWD/tmp/extlinks0"
- * Window: "<cur drive>:/CWD/tmp/extlinks0"
+ * Linux: "/CWD/tmp_links/extlinks0"
+ * Window: "<cur drive>:/CWD/tmp_links/extlinks0"
*/
fix_ext_filename(tmpname, cwdpath, FILENAME[13]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
@@ -2714,7 +2714,7 @@ external_link_abs_mainpath(hid_t fapl, hbool_t new_format)
/* should be able to find the target file from absolute path set for main file */
if(gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp directory.");
+ HDputs(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -2738,8 +2738,8 @@ error:
* Function: external_link_rel_mainpath: test 4
*
* Purpose: 1. target link: "extlinks4"
- * 2. main file: "tmp/extlinks0"
- * 3. target file: "tmp/extlinks4"
+ * 2. main file: "tmp_links/extlinks0"
+ * 3. target file: "tmp_links/extlinks4"
* Should be able to access the target file via the main file's CWD+relative path
*
* Return: Success: 0
@@ -2766,9 +2766,9 @@ external_link_rel_mainpath(hid_t fapl, hbool_t new_format)
if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
TEST_ERROR
- /* set up name for main file: "tmp/extlinks0" */
+ /* set up name for main file: "tmp_links/extlinks0" */
h5_fixname(FILENAME[13], fapl, filename1, sizeof filename1);
- /* set up name for target file: "tmp/extlinks4" */
+ /* set up name for target file: "tmp_links/extlinks4" */
h5_fixname(FILENAME[21], fapl, filename3, sizeof filename3);
/* Create the target file */
@@ -2817,7 +2817,7 @@ error:
* Function: external_link_cwd: test 5
*
* Purpose: 1. target link: "extlinks5"
- * 2. main file: Linux:"/CWD/tmp/extlinks0"; Window: "<cur drive>:/CWD/tmp/extlinks0"
+ * 2. main file: Linux:"/CWD/tmp_links/extlinks0"; Window: "<cur drive>:/CWD/tmp_links/extlinks0"
* 3. target file: "extlinks5"
* Should be able to access the target file in the current working directory
*
@@ -2849,8 +2849,8 @@ external_link_cwd(hid_t fapl, hbool_t new_format)
/*
* set up name for main file:
- * Linux: "/CWD/tmp/extlinks0"
- * Windows: "<cur drive>:/CWD/tmp/extlinks0"
+ * Linux: "/CWD/tmp_links/extlinks0"
+ * Windows: "<cur drive>:/CWD/tmp_links/extlinks0"
*/
fix_ext_filename(tmpname, cwdpath, FILENAME[13]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
@@ -2901,9 +2901,9 @@ error:
/*-------------------------------------------------------------------------
* Function: external_link_abstar: test 6
*
- * Purpose: 1. target link: Linux:"/CWD/tmp/extlinks6"; Windows:"<cur drive>:/CWD/tmp/extlinks6"
+ * Purpose: 1. target link: Linux:"/CWD/tmp_links/extlinks6"; Windows:"<cur drive>:/CWD/tmp_links/extlinks6"
* 2. main file: "extlinks0"
- * 3. target file: "tmp/extlinks6"
+ * 3. target file: "tmp_links/extlinks6"
* Should be able to access the target file's absolute path
*
* Return: Success: 0
@@ -2929,19 +2929,19 @@ external_link_abstar(hid_t fapl, hbool_t new_format)
/* set up name for main file: "extlinks0" */
h5_fixname(FILENAME[12], fapl, filename1, sizeof filename1);
- /* create tmp directory and get current working directory path */
+ /* create tmp_links directory and get current working directory path */
if((HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) || (NULL == HDgetcwd(cwdpath, (size_t)NAME_BUF_SIZE)))
TEST_ERROR
/*
* set up name for external linked target file:
- * Linux: "/CWD/tmp/extlinks6"
- * Windows: "<cur drive>:/CWD/tmp/extlinks6"
+ * Linux: "/CWD/tmp_links/extlinks6"
+ * Windows: "<cur drive>:/CWD/tmp_links/extlinks6"
*/
fix_ext_filename(tmpname, cwdpath, FILENAME[23]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
- /* set up name for target file: "tmp/extlinks6" */
+ /* set up name for target file: "tmp_links/extlinks6" */
h5_fixname(FILENAME[23], fapl, filename3, sizeof filename3);
/* Create the target file */
@@ -2966,7 +2966,7 @@ external_link_abstar(hid_t fapl, hbool_t new_format)
/* should be able to find the target file with abolute path */
if(gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp directory.");
+ HDputs(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -2988,7 +2988,7 @@ error:
/*-------------------------------------------------------------------------
* Function: external_link_abstar_cur: test 7
*
- * Purpose: 1. target link: Linux: "/CWD/tmp/extlinks7"; Windows: "<cur drive>:/CWD/tmp/extlinks7"
+ * Purpose: 1. target link: Linux: "/CWD/tmp_links/extlinks7"; Windows: "<cur drive>:/CWD/tmp_links/extlinks7"
* 2. main file: "extlinks0"
* 3. target file: "extlinks7"
* Should be able to access the target file via the main file's CWD.
@@ -3019,14 +3019,14 @@ external_link_abstar_cur(hid_t fapl, hbool_t new_format)
/* set up name for target file name: "extlinks7" */
h5_fixname(FILENAME[24], fapl, filename3, sizeof filename3);
- /* create tmp directory and get current working directory path */
+ /* create tmp_links directory and get current working directory path */
if((HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) || (NULL == HDgetcwd(cwdpath, (size_t)NAME_BUF_SIZE)))
TEST_ERROR
/*
* set up name for external linked target file:
- * Linux: "/CWD/tmp/extlinks7"
- * Windows: "<cur drive>:/CWD/tmp/extlinks7"
+ * Linux: "/CWD/tmp_links/extlinks7"
+ * Windows: "<cur drive>:/CWD/tmp_links/extlinks7"
*/
fix_ext_filename(tmpname, cwdpath, FILENAME[25]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
@@ -3076,9 +3076,9 @@ error:
/*-------------------------------------------------------------------------
* Function: external_link_reltar: test 8
*
- * Purpose: 1. target link: Linux:"tmp/extlinks8"
+ * Purpose: 1. target link: Linux:"tmp_links/extlinks8"
* 2. main file: "extlinks0"
- * 3. target file: "tmp/extlinks8"
+ * 3. target file: "tmp_links/extlinks8"
* Should be able to access the target file via the main file's CWD+ target's relative path
*
* Return: Success: 0
@@ -3101,11 +3101,11 @@ external_link_reltar(hid_t fapl, hbool_t new_format)
/* set up name for main file: "extlinks0" */
h5_fixname(FILENAME[12], fapl, filename1, sizeof filename1);
- /* create tmp directory */
+ /* create tmp_links directory */
if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) TEST_ERROR
- /* set up name for target file name: "tmp/extlinks8" */
- /* set up name for external linked target file: "tmp/extlinks8" */
+ /* set up name for target file name: "tmp_links/extlinks8" */
+ /* set up name for external linked target file: "tmp_links/extlinks8" */
h5_fixname(FILENAME[26], fapl, filename2, sizeof filename2);
/* Create the target file */
@@ -3126,7 +3126,7 @@ external_link_reltar(hid_t fapl, hbool_t new_format)
/* Open object through external link */
if((gid = H5Gopen2(fid, "ext_link", H5P_DEFAULT)) < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp directory.");
+ HDputs(" Should have found the file in tmp_links directory.");
goto error;
} /* end if */
@@ -3152,8 +3152,8 @@ error:
* Purpose:
* 1. target link: "extlinks9"
* 2. main file: "extlinks0"
- * 3. target file" "tmp/extlinks9"
- * 3. chdir "tmp"
+ * 3. target file" "tmp_links/extlinks9"
+ * 3. chdir "tmp_links"
* Should be able to access the target file in current working directory
*
* Return: Success: 0
@@ -3179,10 +3179,10 @@ external_link_chdir(hid_t fapl, hbool_t new_format)
/* set up name for external linked target file ("extlinks9") */
h5_fixname(FILENAME[27], fapl, filename2, sizeof filename2);
- /* create tmp directory */
+ /* create tmp_links directory */
if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) TEST_ERROR
- /* set up name for target file name ("tmp/extlinks9") */
+ /* set up name for target file name ("tmp_links/extlinks9") */
h5_fixname(FILENAME[28], fapl, filename3, sizeof filename3);
/* Create the target file */
@@ -3215,7 +3215,7 @@ external_link_chdir(hid_t fapl, hbool_t new_format)
*/
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp directory.");
+ HDputs(" Should have found the file in tmp_links directory.");
goto error;
}
@@ -3243,7 +3243,7 @@ error:
*
* 1. target link: "extlinks16"
* 2. target file: "extlinks16"
- * 3. main file: Linux:"/CWD/tmp/extlinks0"; Window: "<cur drive>:/CWD/tmp/extlinks0"
+ * 3. main file: Linux:"/CWD/tmp_links/extlinks0"; Window: "<cur drive>:/CWD/tmp_links/extlinks0"
* 4. Create target file A to be a "family" file: extlinks16A
* 4. Create target file B to be a "multi" file: extlinks16B
* 5. Create external link from main file to target file A: ext_linkA->extlinks16A:/A
@@ -3285,8 +3285,8 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format)
/*
* set up name for main file:
- * Linux: "/CWD/tmp/extlinks0"
- * Windows: "<cur drive>:/CWD/tmp/extlinks0"
+ * Linux: "/CWD/tmp_links/extlinks0"
+ * Windows: "<cur drive>:/CWD/tmp_links/extlinks0"
*/
fix_ext_filename(tmpname, cwdpath, FILENAME[13]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
@@ -3435,7 +3435,7 @@ error:
*
* 1. target link: "extlinks17"
* 2. target file: "extlinks17"
- * 3. main file: Linux:"/CWD/tmp/extlinks0"; Window: "<cur drive>:/CWD/tmp/extlinks0"
+ * 3. main file: Linux:"/CWD/tmp_links/extlinks0"; Window: "<cur drive>:/CWD/tmp_links/extlinks0"
* 4. Create target file to be a "core" file:/A/Dataset
* 5. Create external link from main file to target file:ext_link->target file:/A/Dataset
* 6. Set the file access property list of the link access to use "core" file without
@@ -3474,8 +3474,8 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format)
/*
* set up name for main file:
- * Linux: "/CWD/tmp/extlinks0"
- * Windows: "<cur drive>:/CWD/tmp/extlinks0"
+ * Linux: "/CWD/tmp_links/extlinks0"
+ * Windows: "<cur drive>:/CWD/tmp_links/extlinks0"
*/
fix_ext_filename(tmpname, cwdpath, FILENAME[13]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
@@ -4108,7 +4108,7 @@ error:
* Function: external_link_win1
*
* Purpose:
- * 1. target link: "/CWD/tmp/extlinks10"
+ * 1. target link: "/CWD/tmp_links/extlinks10"
* 2. main file: "extlinks0"
* 3. target file: "extlinks10"
* Should be able to find the target file via main file's current drive/rel path
@@ -4139,7 +4139,7 @@ external_link_win1(hid_t fapl, hbool_t new_format)
if(NULL == HDgetcwd(cwdpath, (size_t)NAME_BUF_SIZE))
TEST_ERROR
- /* set up name for target link: "/CWD/tmp/extlinks10" */
+ /* set up name for target link: "/CWD/tmp_links/extlinks10" */
HDstrcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it rel drive but absolute path */
HDstrcat(tmpname, "/");
HDstrcat(tmpname, FILENAME[30]);
@@ -4194,9 +4194,9 @@ error:
* Function: external_link_win2
*
* Purpose:
- * 1. target link: "/CWD/tmp/extlinks11"
+ * 1. target link: "/CWD/tmp_links/extlinks11"
* 2. main file: "extlinks0"
- * 3. target file: "tmp/extlinks11"
+ * 3. target file: "tmp_links/extlinks11"
* Should be able to access the target file directly (rel drive/abs path)
*
* Return: Success: 0
@@ -4222,17 +4222,17 @@ external_link_win2(hid_t fapl, hbool_t new_format)
/* set up name for main file: "extlinks0" */
h5_fixname(FILENAME[12], fapl, filename1, sizeof filename1);
- /* create tmp directory and get current working directory path */
+ /* create tmp_links directory and get current working directory path */
if((HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) || (NULL == HDgetcwd(cwdpath, (size_t)NAME_BUF_SIZE)))
TEST_ERROR
- /* set up name for target link: "/CWD/tmp/extlinks11" */
+ /* set up name for target link: "/CWD/tmp_links/extlinks11" */
HDstrcpy(tmpname, &cwdpath[2]); /* stripped the drive letter to make it relative drive but absolute path */
HDstrcat(tmpname, "/");
HDstrcat(tmpname, FILENAME[31]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
- /* set up name for target file: "tmp/extlinks11" */
+ /* set up name for target file: "tmp_links/extlinks11" */
h5_fixname(FILENAME[31], fapl, filename3, sizeof filename3);
/* Create the target file */
@@ -4258,7 +4258,7 @@ external_link_win2(hid_t fapl, hbool_t new_format)
/* should be able to find the target file directly */
if(gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp.");
+ HDputs(" Should have found the file in tmp_links.");
goto error;
}
@@ -4282,9 +4282,9 @@ error:
* Function: external_link_win3
*
* Purpose:
- * 1. target link: "<cur drive>:tmp/extlinks12"
+ * 1. target link: "<cur drive>:tmp_links/extlinks12"
* 2. main file: "extlinks0"
- * 3. target file: "tmp/extlinks12"
+ * 3. target file: "tmp_links/extlinks12"
* Should be able to access the target file directly (abs drive/rel path)
*
* Return: Success: 0
@@ -4310,16 +4310,16 @@ external_link_win3(hid_t fapl, hbool_t new_format)
/* set up name for main file: "extlinks0" */
h5_fixname(FILENAME[12], fapl, filename1, sizeof filename1);
- /* create tmp directory */
+ /* create tmp_links directory */
if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
TEST_ERROR
- /* set up name for target link: "<drive-letter>:tmp/extlinks12" */
+ /* set up name for target link: "<drive-letter>:tmp_links/extlinks12" */
drive = HDgetdrive();
HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive+'A'-1), FILENAME[32]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
- /* set up name for target file: "tmp/extlinks12" */
+ /* set up name for target file: "tmp_links/extlinks12" */
h5_fixname(FILENAME[32], fapl, filename3, sizeof filename3);
/* Create the target file */
@@ -4345,7 +4345,7 @@ external_link_win3(hid_t fapl, hbool_t new_format)
/* should be able to find the target file directly */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp.");
+ HDputs(" Should have found the file in tmp_links.");
goto error;
}
@@ -4369,8 +4369,8 @@ external_link_win3(hid_t fapl, hbool_t new_format)
*
* Purpose:
* 1. target link: "<cur drive>:extlinks13"
- * 2. main file: "<cur-drive>:tmp/extlinks0"
- * 3. target file: tmp/extlinks13
+ * 2. main file: "<cur-drive>:tmp_links/extlinks0"
+ * 3. target file: tmp_links/extlinks13
* Should be able to access the target file via main file's abs drive/rel path
*
* Return: Success: 0
@@ -4393,7 +4393,7 @@ external_link_win4(hid_t fapl, hbool_t new_format)
else
TESTING("external links via main file's abs drive/rel path (windows)")
- /* set up name for main file: "<drive-letter>:tmp/extlinks0" */
+ /* set up name for main file: "<drive-letter>:tmp_links/extlinks0" */
drive = HDgetdrive();
HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive+'A'-1), FILENAME[13]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
@@ -4402,7 +4402,7 @@ external_link_win4(hid_t fapl, hbool_t new_format)
HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive+'A'-1), FILENAME[33]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
- /* set up name for target file: "tmp/extlinks13" */
+ /* set up name for target file: "tmp_links/extlinks13" */
h5_fixname(FILENAME[34], fapl, filename3, sizeof filename3);
/* Create the target file */
@@ -4451,9 +4451,9 @@ error:
* Function: external_link_win5
*
* Purpose:
- * 1. target link: "<cur drive+1>:tmp/extlinks14"
+ * 1. target link: "<cur drive+1>:tmp_links/extlinks14"
* 2. main file: "/CWD/extlinks0"
- * 3. target file: "tmp/extlinks14"
+ * 3. target file: "tmp_links/extlinks14"
* Should be able to access the target file via main file's relative drive/absolute path
*
* Return: Success: 0
@@ -4491,11 +4491,11 @@ external_link_win5(hid_t fapl, hbool_t new_format)
HDstrcat(tmpname, FILENAME[12]);
h5_fixname(tmpname, fapl, filename1, sizeof filename1);
- /* set up name for target link: "<drive-letter+1>:tmp/extlinks14" */
+ /* set up name for target link: "<drive-letter+1>:tmp_links/extlinks14" */
HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive+'A'-1), FILENAME[35]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
- /* set up name for target file: "tmp/extlinks14" */
+ /* set up name for target file: "tmp_links/extlinks14" */
h5_fixname(FILENAME[35], fapl, filename3, sizeof filename3);
/* Create the target file */
@@ -4544,9 +4544,9 @@ error:
* Function: external_link_win6
*
* Purpose:
- * 1. target link: "<cur drive+1>:tmp/extlinks15"
+ * 1. target link: "<cur drive+1>:tmp_links/extlinks15"
* 2. main file: "extlinks0"
- * 3. target file: "tmp/extlinks15"
+ * 3. target file: "tmp_links/extlinks15"
* Should be able to access the target file via target's current drive/rel path
*
* Return: Success: 0
@@ -4569,7 +4569,7 @@ external_link_win6(hid_t fapl, hbool_t new_format)
else
TESTING("external links via target's current drive/rel path (windows)")
- /* create tmp directory */
+ /* create tmp_links directory */
if (HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
TEST_ERROR
drive = HDgetdrive();
@@ -4581,7 +4581,7 @@ external_link_win6(hid_t fapl, hbool_t new_format)
/* set up name for main file: "extlinks0" */
h5_fixname(FILENAME[12], fapl, filename1, sizeof filename1);
- /* set up name for target link: "<drive-letter+1>:tmp/extlinks15" */
+ /* set up name for target link: "<drive-letter+1>:tmp_links/extlinks15" */
HDsnprintf(tmpname, sizeof(tmpname), "%c:%s", (drive+'A'-1), FILENAME[36]);
h5_fixname(tmpname, fapl, filename2, sizeof filename2);
@@ -4610,7 +4610,7 @@ external_link_win6(hid_t fapl, hbool_t new_format)
/* should be able to find the target file via target file's rel path in current drive */
if (gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp.");
+ HDputs(" Should have found the file in tmp_links.");
goto error;
}
@@ -4634,7 +4634,7 @@ error:
* Function: external_link_win7
*
* Purpose:
- * 1. UNC target link: "\\127.0.01\c$/tmp/extlinks10"
+ * 1. UNC target link: "\\127.0.01\c$/tmp_links/extlinks10"
* 2. main file: "extlinks0"
* 3. target file: "extlinks15"
* Should be able to find the target file via main file's local host/main drive/rel path
@@ -4665,7 +4665,7 @@ external_link_win7(hid_t fapl, hbool_t new_format)
if(NULL == HDgetcwd(cwdpath, (size_t)NAME_BUF_SIZE))
TEST_ERROR
- /* set up name for target link: "\\127.0.0.1\c$/tmp/extlinks10" */
+ /* set up name for target link: "\\127.0.0.1\c$/tmp_links/extlinks10" */
HDstrcpy(tmpname, "\\\\127.0.0.1\\c$"); /* absolute path */
HDstrcat(tmpname, "/");
HDstrcat(tmpname, FILENAME[30]);
@@ -4752,7 +4752,7 @@ external_link_win8(hid_t fapl, hbool_t new_format)
if(NULL == HDgetcwd(cwdpath, (size_t)NAME_BUF_SIZE)) TEST_ERROR
- /* create tmp directory */
+ /* create tmp_links directory */
if(HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST) TEST_ERROR
/* set up name for target link: "<drive-letter>:\CWD\extlinks10" */
@@ -4785,7 +4785,7 @@ external_link_win8(hid_t fapl, hbool_t new_format)
/* should be able to find the target file directly */
if(gid < 0) {
H5_FAILED();
- HDputs(" Should have found the file in tmp.");
+ HDputs(" Should have found the file in tmp_links.");
goto error;
}
@@ -4809,7 +4809,7 @@ error:
* Function: external_link_win9
*
* Purpose:
- * 1. Long UNC target link: "\\?\UNC\127.0.01\c$/tmp/extlinks10"
+ * 1. Long UNC target link: "\\?\UNC\127.0.01\c$/tmp_links/extlinks10"
* 2. main file: "extlinks0"
* 3. target file: "extlinks15"
* Should be able to find the target file via main file's local host/main drive/rel path
@@ -4839,7 +4839,7 @@ external_link_win9(hid_t fapl, hbool_t new_format)
if(NULL == HDgetcwd(cwdpath, (size_t)NAME_BUF_SIZE)) TEST_ERROR
- /* set up name for target link: "\\?\UNC\127.0.0.1\c$/tmp/extlinks10" */
+ /* set up name for target link: "\\?\UNC\127.0.0.1\c$/tmp_links/extlinks10" */
HDstrcpy(tmpname, "\\\\?\\UNC\127.0.0.1\\c$"); /* absolute path */
HDstrcat(tmpname, "/");
HDstrcat(tmpname, FILENAME[30]);
@@ -6087,7 +6087,7 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* set up name for main file: "extlinks21A" */
h5_fixname(FILENAME[45], fapl, filename1, sizeof(filename1));
- /* create tmp directory and get current working directory path */
+ /* create tmp_links directory and get current working directory path */
if(HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
TEST_ERROR
if(HDmkdir(TMPDIR2, (mode_t)0755) < 0 && errno != EEXIST)
@@ -6097,29 +6097,29 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* Set up names for files in the subdirectories */
- /* set up names for file #2 in temporary directory #2: "tmp2/extlinks21B" */
+ /* set up names for file #2 in temporary directory #2: "tmp2_links/extlinks21B" */
h5_fixname(FILENAME[46], fapl, filename2a, sizeof(filename2a));
fix_ext_filename(tmpname, cwdpath, FILENAME[46]);
h5_fixname(tmpname, fapl, filename2b, sizeof(filename2b));
/* Create symbolic link #1 in temporary directory #1 to file #2 in temporary directory #2 */
- /* (i.e. tmp/sym1.h5 -> <full path to>/tmp2/extlinks21B.h5) */
+ /* (i.e. tmp_links/sym1.h5 -> <full path to>/tmp2_links/extlinks21B.h5) */
if(HDsymlink(filename2b, SYMLINK1) < 0 && errno != EEXIST) TEST_ERROR
- /* set up name for file #3 in temporary directory #2: "tmp2/extlinks21C" */
+ /* set up name for file #3 in temporary directory #2: "tmp2_links/extlinks21C" */
h5_fixname(FILENAME[47], fapl, filename3a, sizeof(filename3a));
h5_fixname(FILENAME[48], fapl, filename3b, sizeof(filename3b));
- /* set up name for file #4 in temporary directory #1: "tmp/extlinks21D" */
+ /* set up name for file #4 in temporary directory #1: "tmp_links/extlinks21D" */
h5_fixname(FILENAME[49], fapl, filename4a, sizeof(filename4a));
fix_ext_filename(tmpname, cwdpath, FILENAME[49]);
h5_fixname(tmpname, fapl, filename4b, sizeof(filename4b));
/* Create symbolic link #2 in temporary directory #2 to file #4 in temporary directory #1 */
- /* (i.e. tmp2/sym2.h5 -> <full path to>/tmp/extlinks21D.h5) */
+ /* (i.e. tmp2_links/sym2.h5 -> <full path to>/tmp_links/extlinks21D.h5) */
if(HDsymlink(filename4b, SYMLINK2) < 0 && errno != EEXIST) TEST_ERROR
- /* set up name for file #5 in temporary directory #1: "tmp/extlinks21E" */
+ /* set up name for file #5 in temporary directory #1: "tmp_links/extlinks21E" */
h5_fixname(FILENAME[50], fapl, filename5a, sizeof(filename5a));
h5_fixname(FILENAME[51], fapl, filename5b, sizeof(filename5b));
@@ -6132,11 +6132,11 @@ external_symlink(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
/* Close file #1 */
if(H5Fclose(file1) < 0) TEST_ERROR
- /* Create file #2 in tmp directory #2 */
+ /* Create file #2 in tmp_links directory #2 */
if((file2 = H5Fcreate(filename2a, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
if(H5Fclose(file2) < 0) TEST_ERROR
- /* Re-open file #2 in tmp directory through symlink */
+ /* Re-open file #2 in tmp_links directory through symlink */
if((file2 = H5Fopen(SYMLINK1, H5F_ACC_RDWR, fapl)) < 0) TEST_ERROR
/* Create group in file #2 in temporary directory */
@@ -9154,7 +9154,7 @@ static size_t link_filter_filter(unsigned int flags, size_t cd_nelmts,
if(flags & H5Z_FLAG_REVERSE) {
if(link_filter_state != LFS_ENCODED) return 0;
link_filter_state = LFS_DECODED;
- }
+ }
else {
if(link_filter_state < LFS_SET_LOCAL_CALLED) return 0;
link_filter_state = LFS_ENCODED;
@@ -13937,7 +13937,7 @@ main(void)
HDprintf("\n-Testing with minimzed dataset object headers-\n");
dcpl_g = H5Pcreate(H5P_DATASET_CREATE);
if (0 > dcpl_g) TEST_ERROR
- }
+ }
else {
HDprintf("\n-Testing with unminimzed dataset object headers-\n");
dcpl_g = H5P_DEFAULT;
@@ -13950,7 +13950,7 @@ main(void)
if(new_format) {
my_fapl = fapl2;
HDprintf("\n--Testing with 'new format'--\n");
- }
+ }
else {
my_fapl = fapl;
HDprintf("\n--Testing with 'old format'--\n");
@@ -13977,7 +13977,7 @@ main(void)
#endif /* H5_NO_DEPRECATED_SYMBOLS */
/* tests for external link */
- /* Test external file cache first, so it sees the default efc setting on the fapl
+ /* Test external file cache first, so it sees the default efc setting on the fapl
*/
nerrors += external_file_cache(my_fapl, new_format) < 0 ? 1 : 0;
@@ -13987,7 +13987,7 @@ main(void)
nerrors += external_link_mult(my_fapl, new_format) < 0 ? 1 : 0;
/* This test cannot run with the EFC because the EFC cannot currently
- * reopen a cached file with a different intent
+ * reopen a cached file with a different intent
*/
nerrors += external_set_elink_acc_flags(env_h5_drvr, my_fapl, new_format) < 0 ? 1 : 0;
@@ -14133,7 +14133,7 @@ main(void)
HDremove(SYMLINK1);
HDremove(SYMLINK2);
- /* clean up tmp directory created by external link tests */
+ /* clean up tmp_links and tmp2_links directory created by external link tests */
HDrmdir(TMPDIR);
HDrmdir(TMPDIR2);
diff --git a/test/links_env.c b/test/links_env.c
index cc31d92..dff185c 100644
--- a/test/links_env.c
+++ b/test/links_env.c
@@ -12,39 +12,39 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Purpose: Tests hard, soft (symbolic) & external links.
+ * Purpose: Tests hard, soft (symbolic) & external links.
*/
-#define H5G_FRIEND /*suppress error about including H5Gpkg */
+#define H5G_FRIEND /*suppress error about including H5Gpkg */
#define H5G_TESTING
#include "h5test.h"
-#include "H5Gpkg.h" /* Groups */
-#include "H5Iprivate.h" /* IDs */
+#include "H5Gpkg.h" /* Groups */
+#include "H5Iprivate.h" /* IDs */
#include "H5Lprivate.h" /* Links */
#define TMPDIR "tmp_links_env/"
#define NAME_BUF_SIZE 1024
const char *FILENAME[] = {
- "extlinks_env0", /* 0: main file */
- "extlinks_env1", /* 1: target file */
+ "extlinks_env0", /* 0: main file */
+ "extlinks_env1", /* 1: target file */
TMPDIR "extlinks_env1", /* 2 */
NULL
};
static int external_link_env(hid_t fapl, hbool_t new_format);
-
+
/*-------------------------------------------------------------------------
* Function: external_link_env (moved from links.c)
*
- * Purpose: Verify that the target file is found successfully in "tmp" directory
- * via searching the pathnames set in the environment variable HDF5_EXT_PREFIX.
- * 1. Target link: "extlinks_env1"
- * 2. Main file: "extlinks_env0"
- * 3. Target file is created in: "tmp/extlinks_env1"
- * 4. The environment variable "HDF5_EXT_PREFIX" is set to ".:tmp"
+ * Purpose: Verify that the target file is found successfully in "tmp_links_env" directory
+ * via searching the pathnames set in the environment variable HDF5_EXT_PREFIX.
+ * 1. Target link: "extlinks_env1"
+ * 2. Main file: "extlinks_env0"
+ * 3. Target file is created in: "tmp_links_env/extlinks_env1"
+ * 4. The environment variable "HDF5_EXT_PREFIX" is set to ".:tmp_links_env"
*
* Return: Success: 0
* Failure: -1
@@ -59,12 +59,12 @@ static int external_link_env(hid_t fapl, hbool_t new_format);
static int
external_link_env(hid_t fapl, hbool_t new_format)
{
- hid_t fid = (-1); /* File ID */
- hid_t gid = (-1); /* Group IDs */
- const char *envval = NULL; /* Pointer to environment variable */
- char filename1[NAME_BUF_SIZE],
- filename2[NAME_BUF_SIZE],
- filename3[NAME_BUF_SIZE]; /* Holders for filename */
+ hid_t fid = (-1); /* File ID */
+ hid_t gid = (-1); /* Group IDs */
+ const char *envval = NULL; /* Pointer to environment variable */
+ char filename1[NAME_BUF_SIZE],
+ filename2[NAME_BUF_SIZE],
+ filename3[NAME_BUF_SIZE]; /* Holders for filename */
if(new_format)
TESTING("external links via environment variable (w/new group format)")
@@ -73,7 +73,7 @@ external_link_env(hid_t fapl, hbool_t new_format)
if ((envval = HDgetenv("HDF5_EXT_PREFIX")) == NULL)
envval = "nomatch";
- if (HDstrcmp(envval, ".:tmp")) TEST_ERROR
+ if (HDstrcmp(envval, ".:tmp_links_env")) TEST_ERROR
/* Set up name for main file:"extlinks_env0" */
h5_fixname(FILENAME[0], fapl, filename1, sizeof filename1);
@@ -81,14 +81,14 @@ external_link_env(hid_t fapl, hbool_t new_format)
/* Set up name for external linked target file: "extlinks_env1" */
h5_fixname(FILENAME[1], fapl, filename2, sizeof filename2);
- /* Create "tmp" directory */
+ /* Create "tmp_links_env" directory */
if(HDmkdir(TMPDIR, (mode_t)0755) < 0 && errno != EEXIST)
- TEST_ERROR
+ TEST_ERROR
- /* Set up name (location) for the target file: "tmp/extlinks1" */
+ /* Set up name (location) for the target file: "tmp_links_env/extlinks1" */
h5_fixname(FILENAME[2], fapl, filename3, sizeof filename3);
- /* Create the target file in "tmp" directory */
+ /* Create the target file in "tmp_links_env" directory */
if((fid=H5Fcreate(filename3, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR
if((gid=H5Gcreate2(fid, "A", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
@@ -110,9 +110,9 @@ external_link_env(hid_t fapl, hbool_t new_format)
/* Should be able to find the target file from pathnames set via HDF5_EXT_PREFIX */
if (gid < 0) {
- H5_FAILED();
- puts(" Should have found the file in tmp directory.");
- goto error;
+ H5_FAILED();
+ puts(" Should have found the file in tmp_links_env directory.");
+ goto error;
}
/* closing for main file */
@@ -124,30 +124,30 @@ external_link_env(hid_t fapl, hbool_t new_format)
error:
H5E_BEGIN_TRY {
- H5Gclose (gid);
- H5Fclose (fid);
+ H5Gclose (gid);
+ H5Fclose (fid);
} H5E_END_TRY;
return -1;
} /* end external_link_env() */
-
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Test external link with environment variable HDF5_EXT_PREFIX
+ * Purpose: Test external link with environment variable HDF5_EXT_PREFIX
*
- * Return: Success: exit(EXIT_SUCCESS)
- * Failure: exit(EXIT_FAILURE)
+ * Return: Success: exit(EXIT_SUCCESS)
+ * Failure: exit(EXIT_FAILURE)
*
- * Programmer: Vailin Choi; Nov 2010
+ * Programmer: Vailin Choi; Nov 2010
*
*-------------------------------------------------------------------------
*/
int
main(void)
{
- hid_t fapl; /* File access property lists */
- int nerrors = 0; /* Error from tests */
+ hid_t fapl; /* File access property lists */
+ int nerrors = 0; /* Error from tests */
h5_reset();
fapl = h5_fileaccess();
@@ -172,7 +172,7 @@ main(void)
}
HDprintf("All external Link (HDF5_EXT_PREFIX) tests passed.\n");
- /* clean up tmp directory created by external link tests */
+ /* clean up tmp_links_env directory created by external link tests */
HDrmdir(TMPDIR);
return 0;
diff --git a/test/testlinks_env.sh.in b/test/testlinks_env.sh.in
index 94e6c7e..3d6b3ce 100644
--- a/test/testlinks_env.sh.in
+++ b/test/testlinks_env.sh.in
@@ -19,15 +19,15 @@ nerrors=0
##############################################################################
##############################################################################
-### T H E T E S T S ###
+### T H E T E S T S ###
##############################################################################
##############################################################################
# test for external links with HDF5_EXT_PREFIX
echo "Testing external link with HDF5_EXT_PREFIX"
-TEST_NAME=links_env # The test name
-TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary
-ENVCMD="env HDF5_EXT_PREFIX=.:tmp" # The environment variable & value
+TEST_NAME=links_env # The test name
+TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary
+ENVCMD="env HDF5_EXT_PREFIX=.:tmp_links_env" # The environment variable & value
#
# Run the test
echo "$ENVCMD $RUNSERIAL $TEST_BIN"
@@ -36,7 +36,7 @@ exitcode=$?
if [ $exitcode -eq 0 ]; then
echo "Test for HDF5_EXT_PREFIX PASSED"
else
- nerrors="`expr $nerrors + 1`"
- echo "***Error encountered for HDF5_EXT_PREFIX test***"
+ nerrors="`expr $nerrors + 1`"
+ echo "***Error encountered for HDF5_EXT_PREFIX test***"
fi
exit $nerrors
diff --git a/test/testvds_env.sh.in b/test/testvds_env.sh.in
index 894e52e..e9a27da 100644
--- a/test/testvds_env.sh.in
+++ b/test/testvds_env.sh.in
@@ -19,7 +19,7 @@ nerrors=0
##############################################################################
##############################################################################
-### T H E T E S T S ###
+### T H E T E S T S ###
##############################################################################
##############################################################################
@@ -27,7 +27,7 @@ nerrors=0
echo "Testing basic virtual dataset I/O via H5Pset_vds_prefix(): all selection with ENV prefix"
TEST_NAME=vds_env # The test name
TEST_BIN=`pwd`/$TEST_NAME # The path of the test binary
-ENVCMD="env HDF5_VDS_PREFIX=\${ORIGIN}/tmp" # Set the environment variable & value
+ENVCMD="env HDF5_VDS_PREFIX=\${ORIGIN}/tmp_vds_env" # Set the environment variable & value
UNENVCMD="unset HDF5_VDS_PREFIX" # Unset the environment variable & value
#
# Run the test
@@ -37,8 +37,8 @@ exitcode=$?
if [ $exitcode -eq 0 ]; then
echo "Test prefix for HDF5_VDS_PREFIX PASSED"
else
- nerrors="`expr $nerrors + 1`"
- echo "***Error encountered for HDF5_VDS_PREFIX test***"
+ nerrors="`expr $nerrors + 1`"
+ echo "***Error encountered for HDF5_VDS_PREFIX test***"
fi
$UNENVCMD
exit $nerrors
diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c
index 2340ae0..bfa0bfe 100644
--- a/testpar/t_chunk_alloc.c
+++ b/testpar/t_chunk_alloc.c
@@ -20,23 +20,23 @@
*/
#include "testphdf5.h"
-static int mpi_size, mpi_rank;
+static int mpi_size, mpi_rank;
#define DSET_NAME "ExtendibleArray"
-#define CHUNK_SIZE 1000 /* #elements per chunk */
-#define CHUNK_FACTOR 200 /* default dataset size in terms of chunks */
+#define CHUNK_SIZE 1000 /* #elements per chunk */
+#define CHUNK_FACTOR 200 /* default dataset size in terms of chunks */
#define CLOSE 1
#define NO_CLOSE 0
static MPI_Offset
get_filesize(const char *filename)
{
- int mpierr;
- MPI_File fd;
- MPI_Offset filesize;
+ int mpierr;
+ MPI_File fd;
+ MPI_Offset filesize;
mpierr = MPI_File_open(MPI_COMM_SELF, filename, MPI_MODE_RDONLY,
- MPI_INFO_NULL, &fd);
+ MPI_INFO_NULL, &fd);
VRFY((mpierr == MPI_SUCCESS), "");
mpierr = MPI_File_get_size(fd, &filesize);
@@ -85,8 +85,8 @@ create_chunked_dataset(const char *filename, int chunk_factor, write_type write_
long nchunks;
herr_t hrc;
- MPI_Offset filesize, /* actual file size */
- est_filesize; /* estimated file size */
+ MPI_Offset filesize, /* actual file size */
+ est_filesize; /* estimated file size */
/* set up MPI parameters */
MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
@@ -95,34 +95,33 @@ create_chunked_dataset(const char *filename, int chunk_factor, write_type write_
/* Only MAINPROCESS should create the file. Others just wait. */
if (MAINPROCESS){
nchunks=chunk_factor*mpi_size;
- dims[0]=nchunks*CHUNK_SIZE;
- /* Create the data space with unlimited dimensions. */
- dataspace = H5Screate_simple (1, dims, maxdims);
- VRFY((dataspace >= 0), "");
+ dims[0]=nchunks*CHUNK_SIZE;
+ /* Create the data space with unlimited dimensions. */
+ dataspace = H5Screate_simple (1, dims, maxdims);
+ VRFY((dataspace >= 0), "");
- memspace = H5Screate_simple(1, chunk_dims, NULL);
- VRFY((memspace >= 0), "");
+ memspace = H5Screate_simple(1, chunk_dims, NULL);
+ VRFY((memspace >= 0), "");
- /* Create a new file. If file exists its contents will be overwritten. */
- file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT,
- H5P_DEFAULT);
- VRFY((file_id >= 0), "H5Fcreate");
+ /* Create a new file. If file exists its contents will be overwritten. */
+ file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+ VRFY((file_id >= 0), "H5Fcreate");
- /* Modify dataset creation properties, i.e. enable chunking */
- cparms = H5Pcreate(H5P_DATASET_CREATE);
- VRFY((cparms >= 0), "");
+ /* Modify dataset creation properties, i.e. enable chunking */
+ cparms = H5Pcreate(H5P_DATASET_CREATE);
+ VRFY((cparms >= 0), "");
- hrc = H5Pset_alloc_time(cparms, H5D_ALLOC_TIME_EARLY);
- VRFY((hrc >= 0), "");
+ hrc = H5Pset_alloc_time(cparms, H5D_ALLOC_TIME_EARLY);
+ VRFY((hrc >= 0), "");
- hrc = H5Pset_chunk(cparms, 1, chunk_dims);
- VRFY((hrc >= 0), "");
+ hrc = H5Pset_chunk(cparms, 1, chunk_dims);
+ VRFY((hrc >= 0), "");
- /* Create a new dataset within the file using cparms creation properties. */
- dataset = H5Dcreate2(file_id, DSET_NAME, H5T_NATIVE_UCHAR, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT);
- VRFY((dataset >= 0), "");
+ /* Create a new dataset within the file using cparms creation properties. */
+ dataset = H5Dcreate2(file_id, DSET_NAME, H5T_NATIVE_UCHAR, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT);
+ VRFY((dataset >= 0), "");
- if(write_pattern == sec_last) {
+ if(write_pattern == sec_last) {
HDmemset(buffer, 100, CHUNK_SIZE);
count[0] = 1;
@@ -138,28 +137,28 @@ create_chunked_dataset(const char *filename, int chunk_factor, write_type write_
VRFY((hrc >= 0), "H5Dwrite");
} /* end if */
- /* Close resources */
- hrc = H5Dclose (dataset);
- VRFY((hrc >= 0), "");
- dataset = -1;
+ /* Close resources */
+ hrc = H5Dclose (dataset);
+ VRFY((hrc >= 0), "");
+ dataset = -1;
- hrc = H5Sclose (dataspace);
- VRFY((hrc >= 0), "");
+ hrc = H5Sclose (dataspace);
+ VRFY((hrc >= 0), "");
- hrc = H5Sclose (memspace);
- VRFY((hrc >= 0), "");
+ hrc = H5Sclose (memspace);
+ VRFY((hrc >= 0), "");
- hrc = H5Pclose (cparms);
- VRFY((hrc >= 0), "");
+ hrc = H5Pclose (cparms);
+ VRFY((hrc >= 0), "");
- hrc = H5Fclose (file_id);
- VRFY((hrc >= 0), "");
- file_id = -1;
+ hrc = H5Fclose (file_id);
+ VRFY((hrc >= 0), "");
+ file_id = -1;
- /* verify file size */
- filesize = get_filesize(filename);
- est_filesize = nchunks * CHUNK_SIZE * sizeof(unsigned char);
- VRFY((filesize >= est_filesize), "file size check");
+ /* verify file size */
+ filesize = get_filesize(filename);
+ est_filesize = nchunks * CHUNK_SIZE * sizeof(unsigned char);
+ VRFY((filesize >= est_filesize), "file size check");
}
@@ -200,8 +199,8 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti
int i;
long nchunks;
/* MPI Gubbins */
- MPI_Offset filesize, /* actual file size */
- est_filesize; /* estimated file size */
+ MPI_Offset filesize, /* actual file size */
+ est_filesize; /* estimated file size */
/* Initialize MPI */
MPI_Comm_size(MPI_COMM_WORLD,&mpi_size);
@@ -241,19 +240,19 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti
/* all chunks are written by all the processes in an interleaved way*/
case write_all:
- memset(buffer, mpi_rank+1, CHUNK_SIZE);
- count[0] = 1;
- stride[0] = 1;
- block[0] = chunk_dims[0];
- for (i=0; i<nchunks/mpi_size; i++){
- offset[0] = (i*mpi_size+mpi_rank)*chunk_dims[0];
+ HDmemset(buffer, mpi_rank+1, CHUNK_SIZE);
+ count[0] = 1;
+ stride[0] = 1;
+ block[0] = chunk_dims[0];
+ for (i=0; i<nchunks/mpi_size; i++) {
+ offset[0] = (i*mpi_size+mpi_rank)*chunk_dims[0];
- hrc = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, stride, count, block);
- VRFY((hrc >= 0), "");
+ hrc = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, stride, count, block);
+ VRFY((hrc >= 0), "");
- /* Write the buffer out */
- hrc = H5Dwrite(*dataset, H5T_NATIVE_UCHAR, memspace, dataspace, H5P_DEFAULT, buffer);
- VRFY((hrc >= 0), "H5Dwrite");
+ /* Write the buffer out */
+ hrc = H5Dwrite(*dataset, H5T_NATIVE_UCHAR, memspace, dataspace, H5P_DEFAULT, buffer);
+ VRFY((hrc >= 0), "H5Dwrite");
}
break;
@@ -318,7 +317,7 @@ parallel_access_dataset(const char *filename, int chunk_factor, access_type acti
* interleaved pattern.
*/
static void
-verify_data(const char *filename, int chunk_factor, write_type write_pattern, int vclose,
+verify_data(const char *filename, int chunk_factor, write_type write_pattern, int vclose,
hid_t *file_id, hid_t *dataset)
{
/* HDF5 gubbins */
@@ -372,8 +371,8 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in
stride[0] = 1;
block[0] = chunk_dims[0];
for (i=0; i<nchunks; i++){
- /* reset buffer values */
- memset(buffer, -1, CHUNK_SIZE);
+ /* reset buffer values */
+ HDmemset(buffer, -1, CHUNK_SIZE);
offset[0] = i*chunk_dims[0];
@@ -385,22 +384,22 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in
VRFY((hrc >= 0), "H5Dread");
/* set expected value according the write pattern */
- switch (write_pattern) {
- case all:
- value = i%mpi_size + 1;
- break;
- case none:
- value = 0;
- break;
- case sec_last:
- if (i==nchunks-2)
- value = 100;
- else
- value = 0;
+ switch (write_pattern) {
+ case all:
+ value = i%mpi_size + 1;
+ break;
+ case none:
+ value = 0;
+ break;
+ case sec_last:
+ if (i==nchunks-2)
+ value = 100;
+ else
+ value = 0;
break;
default:
HDassert(0);
- }
+ }
/* verify content of the chunk */
for (index_l = 0; index_l < CHUNK_SIZE; index_l++)
@@ -408,10 +407,10 @@ verify_data(const char *filename, int chunk_factor, write_type write_pattern, in
}
hrc = H5Sclose (dataspace);
- VRFY((hrc >= 0), "");
+ VRFY((hrc >= 0), "");
- hrc = H5Sclose (memspace);
- VRFY((hrc >= 0), "");
+ hrc = H5Sclose (memspace);
+ VRFY((hrc >= 0), "");
/* Can close some plists */
hrc = H5Pclose(access_plist);
@@ -469,7 +468,7 @@ test_chunk_alloc(void)
filename = (const char*)GetTestParameters();
if (VERBOSE_MED)
- printf("Extend Chunked allocation test on file %s\n", filename);
+ HDprintf("Extend Chunked allocation test on file %s\n", filename);
/* Case 1 */
/* Create chunked dataset without writing anything.*/
diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c
index e1ccbed..b89c790 100644
--- a/testpar/testphdf5.c
+++ b/testpar/testphdf5.c
@@ -29,7 +29,7 @@ int chunkdim1;
int nerrors = 0; /* errors count */
int ndatasets = 300; /* number of datasets to create*/
int ngroups = 512; /* number of groups to create in root
- * group. */
+ * group. */
int facc_type = FACC_MPIO; /*Test file access type */
int dxfer_coll_type = DXFER_COLLECTIVE_IO;
@@ -79,15 +79,15 @@ void pause_proc(void)
MPI_Get_processor_name(mpi_name, &mpi_namelen);
if (MAINPROCESS)
- while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop){
- if (!loops++){
- printf("Proc %d (%*s, %d): to debug, attach %d\n",
- mpi_rank, mpi_namelen, mpi_name, pid, pid);
- }
- printf("waiting(%ds) for file %s ...\n", time_int, greenlight);
- fflush(stdout);
+ while ((HDstat(greenlight, &statbuf) == -1) && loops < maxloop){
+ if (!loops++){
+ HDprintf("Proc %d (%*s, %d): to debug, attach %d\n",
+ mpi_rank, mpi_namelen, mpi_name, pid, pid);
+ }
+ HDprintf("waiting(%ds) for file %s ...\n", time_int, greenlight);
+ HDfflush(stdout);
HDsleep(time_int);
- }
+ }
MPI_Barrier(MPI_COMM_WORLD);
}
@@ -108,18 +108,18 @@ int MPI_Init(int *argc, char ***argv)
static void
usage(void)
{
- printf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
- "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
- printf("\t-m<n_datasets>"
- "\tset number of datasets for the multiple dataset test\n");
- printf("\t-n<n_groups>"
- "\tset number of groups for the multiple group test\n");
- printf("\t-f <prefix>\tfilename prefix\n");
- printf("\t-2\t\tuse Split-file together with MPIO\n");
- printf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n",
- ROW_FACTOR, COL_FACTOR);
- printf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
- printf("\n");
+ HDprintf(" [-r] [-w] [-m<n_datasets>] [-n<n_groups>] "
+ "[-o] [-f <prefix>] [-d <dim0> <dim1>]\n");
+ HDprintf("\t-m<n_datasets>"
+ "\tset number of datasets for the multiple dataset test\n");
+ HDprintf("\t-n<n_groups>"
+ "\tset number of groups for the multiple group test\n");
+ HDprintf("\t-f <prefix>\tfilename prefix\n");
+ HDprintf("\t-2\t\tuse Split-file together with MPIO\n");
+ HDprintf("\t-d <factor0> <factor1>\tdataset dimensions factors. Defaults (%d,%d)\n",
+ ROW_FACTOR, COL_FACTOR);
+ HDprintf("\t-c <dim0> <dim1>\tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n");
+ HDprintf("\n");
}
@@ -140,44 +140,44 @@ parse_options(int argc, char **argv)
chunkdim1 = (dim1+9)/10;
while (--argc){
- if (**(++argv) != '-'){
- break;
- }else{
- switch(*(*argv+1)){
- case 'm': ndatasets = atoi((*argv+1)+1);
- if (ndatasets < 0){
+ if (**(++argv) != '-'){
+ break;
+ }else{
+ switch(*(*argv+1)){
+ case 'm': ndatasets = atoi((*argv+1)+1);
+ if (ndatasets < 0){
nerrors++;
return(1);
- }
- break;
+ }
+ break;
case 'n': ngroups = atoi((*argv+1)+1);
- if (ngroups < 0){
- nerrors++;
- return(1);
- }
- break;
- case 'f': if (--argc < 1) {
+ if (ngroups < 0){
nerrors++;
return(1);
- }
- if (**(++argv) == '-') {
+ }
+ break;
+ case 'f': if (--argc < 1) {
nerrors++;
return(1);
- }
- paraprefix = *argv;
- break;
- case 'i': /* Collective MPI-IO access with independent IO */
+ }
+ if (**(++argv) == '-') {
+ nerrors++;
+ return(1);
+ }
+ paraprefix = *argv;
+ break;
+ case 'i': /* Collective MPI-IO access with independent IO */
dxfer_coll_type = DXFER_INDEPENDENT_IO;
break;
- case '2': /* Use the split-file driver with MPIO access */
+ case '2': /* Use the split-file driver with MPIO access */
/* Can use $HDF5_METAPREFIX to define the */
/* meta-file-prefix. */
facc_type = FACC_MPIO | FACC_SPLIT;
break;
- case 'd': /* dimensizes */
+ case 'd': /* dimensizes */
if (--argc < 2){
- nerrors++;
- return(1);
+ nerrors++;
+ return(1);
}
dim0 = atoi(*(++argv))*mpi_size;
argc--;
@@ -186,61 +186,61 @@ parse_options(int argc, char **argv)
chunkdim0 = (dim0+9)/10;
chunkdim1 = (dim1+9)/10;
break;
- case 'c': /* chunk dimensions */
+ case 'c': /* chunk dimensions */
if (--argc < 2){
- nerrors++;
- return(1);
+ nerrors++;
+ return(1);
}
chunkdim0 = atoi(*(++argv));
argc--;
chunkdim1 = atoi(*(++argv));
break;
- case 'h': /* print help message--return with nerrors set */
- return(1);
- default: printf("Illegal option(%s)\n", *argv);
- nerrors++;
+ case 'h': /* print help message--return with nerrors set */
return(1);
+ default: HDprintf("Illegal option(%s)\n", *argv);
+ nerrors++;
+ return(1);
+ }
}
- }
} /*while*/
/* check validity of dimension and chunk sizes */
if (dim0 <= 0 || dim1 <= 0){
- printf("Illegal dim sizes (%d, %d)\n", dim0, dim1);
- nerrors++;
- return(1);
+ HDprintf("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);
- nerrors++;
- return(1);
+ HDprintf("Illegal chunkdim sizes (%d, %d)\n", chunkdim0, chunkdim1);
+ nerrors++;
+ return(1);
}
/* Make sure datasets can be divided into equal portions by the processes */
if ((dim0 % mpi_size) || (dim1 % mpi_size)){
- if (MAINPROCESS)
- printf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n",
- dim0, dim1, mpi_size);
- nerrors++;
- return(1);
+ if (MAINPROCESS)
+ HDprintf("dim0(%d) and dim1(%d) must be multiples of processes(%d)\n",
+ dim0, dim1, mpi_size);
+ nerrors++;
+ return(1);
}
/* compose the test filenames */
{
- int i, n;
+ int i, n;
- n = sizeof(FILENAME)/sizeof(FILENAME[0]) - 1; /* exclude the NULL */
+ n = sizeof(FILENAME)/sizeof(FILENAME[0]) - 1; /* exclude the NULL */
- for (i=0; i < n; i++)
- if (h5_fixname(FILENAME[i],fapl,filenames[i],sizeof(filenames[i]))
- == NULL){
- printf("h5_fixname failed\n");
- nerrors++;
- return(1);
- }
- printf("Test filenames are:\n");
- for (i=0; i < n; i++)
- printf(" %s\n", filenames[i]);
+ for (i=0; i < n; i++)
+ if (h5_fixname(FILENAME[i],fapl,filenames[i],sizeof(filenames[i]))
+ == NULL){
+ HDprintf("h5_fixname failed\n");
+ nerrors++;
+ return(1);
+ }
+ HDprintf("Test filenames are:\n");
+ for (i=0; i < n; i++)
+ HDprintf(" %s\n", filenames[i]);
}
return(0);
@@ -264,36 +264,36 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type)
VRFY((ret_pl >= 0), "H5P_FILE_ACCESS");
if (l_facc_type == FACC_DEFAULT)
- return (ret_pl);
+ return (ret_pl);
if (l_facc_type == FACC_MPIO){
- /* set Parallel access with communicator */
- ret = H5Pset_fapl_mpio(ret_pl, comm, info);
- VRFY((ret >= 0), "");
+ /* set Parallel access with communicator */
+ ret = H5Pset_fapl_mpio(ret_pl, comm, info);
+ VRFY((ret >= 0), "");
ret = H5Pset_all_coll_metadata_ops(ret_pl, TRUE);
- VRFY((ret >= 0), "");
+ VRFY((ret >= 0), "");
ret = H5Pset_coll_metadata_write(ret_pl, TRUE);
- VRFY((ret >= 0), "");
- return(ret_pl);
+ VRFY((ret >= 0), "");
+ return(ret_pl);
}
if (l_facc_type == (FACC_MPIO | FACC_SPLIT)){
- hid_t mpio_pl;
-
- mpio_pl = H5Pcreate (H5P_FILE_ACCESS);
- VRFY((mpio_pl >= 0), "");
- /* set Parallel access with communicator */
- ret = H5Pset_fapl_mpio(mpio_pl, comm, info);
- VRFY((ret >= 0), "");
-
- /* setup file access template */
- ret_pl = H5Pcreate (H5P_FILE_ACCESS);
- VRFY((ret_pl >= 0), "");
- /* set Parallel access with communicator */
- ret = H5Pset_fapl_split(ret_pl, ".meta", mpio_pl, ".raw", mpio_pl);
- VRFY((ret >= 0), "H5Pset_fapl_split succeeded");
- H5Pclose(mpio_pl);
- return(ret_pl);
+ hid_t mpio_pl;
+
+ mpio_pl = H5Pcreate (H5P_FILE_ACCESS);
+ VRFY((mpio_pl >= 0), "");
+ /* set Parallel access with communicator */
+ ret = H5Pset_fapl_mpio(mpio_pl, comm, info);
+ VRFY((ret >= 0), "");
+
+ /* setup file access template */
+ ret_pl = H5Pcreate (H5P_FILE_ACCESS);
+ VRFY((ret_pl >= 0), "");
+ /* set Parallel access with communicator */
+ ret = H5Pset_fapl_split(ret_pl, ".meta", mpio_pl, ".raw", mpio_pl);
+ VRFY((ret >= 0), "H5Pset_fapl_split succeeded");
+ H5Pclose(mpio_pl);
+ return(ret_pl);
}
/* unknown file access types */
@@ -323,18 +323,18 @@ int main(int argc, char **argv)
dim1 = COL_FACTOR*mpi_size;
if (MAINPROCESS){
- printf("===================================\n");
- printf("PHDF5 TESTS START\n");
- printf("===================================\n");
+ HDprintf("===================================\n");
+ HDprintf("PHDF5 TESTS START\n");
+ HDprintf("===================================\n");
}
/* Attempt to turn off atexit post processing so that in case errors
- * happen during the test and the process is aborted, it will not get
- * hang in the atexit post processing in which it may try to make MPI
- * calls. By then, MPI calls may not work.
- */
+ * happen during the test and the process is aborted, it will not get
+ * hang in the atexit post processing in which it may try to make MPI
+ * calls. By then, MPI calls may not work.
+ */
if (H5dont_atexit() < 0){
- printf("Failed to turn off atexit processing. Continue.\n");
+ HDprintf("Failed to turn off atexit processing. Continue.\n");
};
H5open();
h5_show_hostname();
@@ -344,10 +344,10 @@ int main(int argc, char **argv)
/* Tests are generally arranged from least to most complexity... */
AddTest("mpiodup", test_fapl_mpio_dup, NULL,
- "fapl_mpio duplicate", NULL);
+ "fapl_mpio duplicate", NULL);
AddTest("split", test_split_comm_access, NULL,
- "dataset using split communicators", PARATESTFILE);
+ "dataset using split communicators", PARATESTFILE);
#ifdef PB_OUT /* temporary: disable page buffering when parallel */
AddTest("page_buffer", test_page_buffer_access, NULL,
@@ -355,57 +355,57 @@ int main(int argc, char **argv)
#endif
AddTest("props", test_file_properties, NULL,
- "Coll Metadata file property settings", PARATESTFILE);
+ "Coll Metadata file property settings", PARATESTFILE);
AddTest("idsetw", dataset_writeInd, NULL,
- "dataset independent write", PARATESTFILE);
+ "dataset independent write", PARATESTFILE);
AddTest("idsetr", dataset_readInd, NULL,
- "dataset independent read", PARATESTFILE);
+ "dataset independent read", PARATESTFILE);
AddTest("cdsetw", dataset_writeAll, NULL,
- "dataset collective write", PARATESTFILE);
+ "dataset collective write", PARATESTFILE);
AddTest("cdsetr", dataset_readAll, NULL,
- "dataset collective read", PARATESTFILE);
+ "dataset collective read", PARATESTFILE);
AddTest("eidsetw", extend_writeInd, NULL,
- "extendible dataset independent write", PARATESTFILE);
+ "extendible dataset independent write", PARATESTFILE);
AddTest("eidsetr", extend_readInd, NULL,
- "extendible dataset independent read", PARATESTFILE);
+ "extendible dataset independent read", PARATESTFILE);
AddTest("ecdsetw", extend_writeAll, NULL,
- "extendible dataset collective write", PARATESTFILE);
+ "extendible dataset collective write", PARATESTFILE);
AddTest("ecdsetr", extend_readAll, NULL,
- "extendible dataset collective read", PARATESTFILE);
+ "extendible dataset collective read", PARATESTFILE);
AddTest("eidsetw2", extend_writeInd2, NULL,
- "extendible dataset independent write #2", PARATESTFILE);
+ "extendible dataset independent write #2", PARATESTFILE);
AddTest("selnone", none_selection_chunk, NULL,
"chunked dataset with none-selection", PARATESTFILE);
AddTest("calloc", test_chunk_alloc, NULL,
"parallel extend Chunked allocation on serial file", PARATESTFILE);
AddTest("fltread", test_filter_read, NULL,
- "parallel read of dataset written serially with filters", PARATESTFILE);
+ "parallel read of dataset written serially with filters", PARATESTFILE);
#ifdef H5_HAVE_FILTER_DEFLATE
AddTest("cmpdsetr", compress_readAll, NULL,
- "compressed dataset collective read", PARATESTFILE);
+ "compressed dataset collective read", PARATESTFILE);
#endif /* H5_HAVE_FILTER_DEFLATE */
AddTest("zerodsetr", zero_dim_dset, NULL,
- "zero dim dset", PARATESTFILE);
+ "zero dim dset", PARATESTFILE);
ndsets_params.name = PARATESTFILE;
ndsets_params.count = ndatasets;
AddTest("ndsetw", multiple_dset_write, NULL,
- "multiple datasets write", &ndsets_params);
+ "multiple datasets write", &ndsets_params);
ngroups_params.name = PARATESTFILE;
ngroups_params.count = ngroups;
AddTest("ngrpw", multiple_group_write, NULL,
- "multiple groups write", &ngroups_params);
+ "multiple groups write", &ngroups_params);
AddTest("ngrpr", multiple_group_read, NULL,
- "multiple groups read", &ngroups_params);
+ "multiple groups read", &ngroups_params);
AddTest("compact", compact_dataset, NULL,
- "compact dataset test", PARATESTFILE);
+ "compact dataset test", PARATESTFILE);
collngroups_params.name = PARATESTFILE;
collngroups_params.count = ngroups;
@@ -417,79 +417,79 @@ int main(int argc, char **argv)
AddTest("bigdset", big_dataset, NULL,
"big dataset test", PARATESTFILE);
#else
- printf("big dataset test will be skipped on Windows (JIRA HDDFV-8064)\n");
+ HDprintf("big dataset test will be skipped on Windows (JIRA HDDFV-8064)\n");
#endif
AddTest("fill", dataset_fillvalue, NULL,
- "dataset fill value", PARATESTFILE);
+ "dataset fill value", PARATESTFILE);
AddTest("cchunk1",
- coll_chunk1,NULL, "simple collective chunk io",PARATESTFILE);
+ coll_chunk1,NULL, "simple collective chunk io",PARATESTFILE);
AddTest("cchunk2",
- coll_chunk2,NULL, "noncontiguous collective chunk io",PARATESTFILE);
+ coll_chunk2,NULL, "noncontiguous collective chunk io",PARATESTFILE);
AddTest("cchunk3",
- coll_chunk3,NULL, "multi-chunk collective chunk io",PARATESTFILE);
+ coll_chunk3,NULL, "multi-chunk collective chunk io",PARATESTFILE);
AddTest("cchunk4",
- coll_chunk4,NULL, "collective chunk io with partial non-selection ",PARATESTFILE);
+ coll_chunk4,NULL, "collective chunk io with partial non-selection ",PARATESTFILE);
if((mpi_size < 3)&& MAINPROCESS ) {
- printf("Collective chunk IO optimization APIs ");
- printf("needs at least 3 processes to participate\n");
- printf("Collective chunk IO API tests will be skipped \n");
+ HDprintf("Collective chunk IO optimization APIs ");
+ HDprintf("needs at least 3 processes to participate\n");
+ HDprintf("Collective chunk IO API tests will be skipped \n");
}
AddTest((mpi_size <3)? "-cchunk5":"cchunk5" ,
- coll_chunk5,NULL,
- "linked chunk collective IO without optimization",PARATESTFILE);
+ coll_chunk5,NULL,
+ "linked chunk collective IO without optimization",PARATESTFILE);
AddTest((mpi_size < 3)? "-cchunk6" : "cchunk6",
- coll_chunk6,NULL,
- "multi-chunk collective IO with direct request",PARATESTFILE);
+ coll_chunk6,NULL,
+ "multi-chunk collective IO with direct request",PARATESTFILE);
AddTest((mpi_size < 3)? "-cchunk7" : "cchunk7",
- coll_chunk7,NULL,
- "linked chunk collective IO with optimization",PARATESTFILE);
+ coll_chunk7,NULL,
+ "linked chunk collective IO with optimization",PARATESTFILE);
AddTest((mpi_size < 3)? "-cchunk8" : "cchunk8",
- coll_chunk8,NULL,
- "linked chunk collective IO transferring to multi-chunk",PARATESTFILE);
+ coll_chunk8,NULL,
+ "linked chunk collective IO transferring to multi-chunk",PARATESTFILE);
AddTest((mpi_size < 3)? "-cchunk9" : "cchunk9",
- coll_chunk9,NULL,
- "multiple chunk collective IO with optimization",PARATESTFILE);
+ coll_chunk9,NULL,
+ "multiple chunk collective IO with optimization",PARATESTFILE);
AddTest((mpi_size < 3)? "-cchunk10" : "cchunk10",
- coll_chunk10,NULL,
- "multiple chunk collective IO transferring to independent IO",PARATESTFILE);
+ coll_chunk10,NULL,
+ "multiple chunk collective IO transferring to independent IO",PARATESTFILE);
-/* irregular collective IO tests*/
+ /* irregular collective IO tests*/
AddTest("ccontw",
- coll_irregular_cont_write,NULL,
- "collective irregular contiguous write",PARATESTFILE);
+ coll_irregular_cont_write,NULL,
+ "collective irregular contiguous write",PARATESTFILE);
AddTest("ccontr",
- coll_irregular_cont_read,NULL,
- "collective irregular contiguous read",PARATESTFILE);
+ coll_irregular_cont_read,NULL,
+ "collective irregular contiguous read",PARATESTFILE);
AddTest("cschunkw",
- coll_irregular_simple_chunk_write,NULL,
- "collective irregular simple chunk write",PARATESTFILE);
+ coll_irregular_simple_chunk_write,NULL,
+ "collective irregular simple chunk write",PARATESTFILE);
AddTest("cschunkr",
- coll_irregular_simple_chunk_read,NULL,
- "collective irregular simple chunk read",PARATESTFILE);
+ coll_irregular_simple_chunk_read,NULL,
+ "collective irregular simple chunk read",PARATESTFILE);
AddTest("ccchunkw",
- coll_irregular_complex_chunk_write,NULL,
- "collective irregular complex chunk write",PARATESTFILE);
+ coll_irregular_complex_chunk_write,NULL,
+ "collective irregular complex chunk write",PARATESTFILE);
AddTest("ccchunkr",
- coll_irregular_complex_chunk_read,NULL,
- "collective irregular complex chunk read",PARATESTFILE);
+ coll_irregular_complex_chunk_read,NULL,
+ "collective irregular complex chunk read",PARATESTFILE);
AddTest("null", null_dataset, NULL,
- "null dataset test", PARATESTFILE);
+ "null dataset test", PARATESTFILE);
io_mode_confusion_params.name = PARATESTFILE;
io_mode_confusion_params.count = 0; /* value not used */
AddTest("I/Omodeconf", io_mode_confusion, NULL,
- "I/O mode confusion test -- hangs quickly on failure",
+ "I/O mode confusion test -- hangs quickly on failure",
&io_mode_confusion_params);
if((mpi_size < 3) && MAINPROCESS) {
- printf("rr_obj_hdr_flush_confusion test needs at least 3 processes.\n");
- printf("rr_obj_hdr_flush_confusion test will be skipped \n");
+ HDprintf("rr_obj_hdr_flush_confusion test needs at least 3 processes.\n");
+ HDprintf("rr_obj_hdr_flush_confusion test will be skipped \n");
}
if(mpi_size > 2) {
rr_obj_flush_confusion_params.name = PARATESTFILE;
@@ -523,21 +523,21 @@ int main(int argc, char **argv)
PARATESTFILE);
AddTest("edpl", test_plist_ed, NULL,
- "encode/decode Property Lists", NULL);
+ "encode/decode Property Lists", NULL);
if((mpi_size < 2) && MAINPROCESS) {
- printf("File Image Ops daisy chain test needs at least 2 processes.\n");
- printf("File Image Ops daisy chain test will be skipped \n");
+ HDprintf("File Image Ops daisy chain test needs at least 2 processes.\n");
+ HDprintf("File Image Ops daisy chain test will be skipped \n");
}
AddTest((mpi_size < 2)? "-fiodc" : "fiodc", file_image_daisy_chain_test, NULL,
"file image ops daisy chain", NULL);
if((mpi_size < 2)&& MAINPROCESS ) {
- printf("Atomicity tests need at least 2 processes to participate\n");
- printf("8 is more recommended.. Atomicity tests will be skipped \n");
+ HDprintf("Atomicity tests need at least 2 processes to participate\n");
+ HDprintf("8 is more recommended.. Atomicity tests will be skipped \n");
}
else if (facc_type != FACC_MPIO && MAINPROCESS) {
- printf("Atomicity tests will not work with a non MPIO VFD\n");
+ HDprintf("Atomicity tests will not work with a non MPIO VFD\n");
}
else if(mpi_size >= 2 && facc_type == FACC_MPIO){
AddTest("atomicity", dataset_atomicity, NULL,
@@ -545,7 +545,7 @@ int main(int argc, char **argv)
}
AddTest("denseattr", test_dense_attr, NULL,
- "Store Dense Attributes", PARATESTFILE);
+ "Store Dense Attributes", PARATESTFILE);
AddTest("noselcollmdread", test_partial_no_selection_coll_md_read, NULL,
"Collective Metadata read with some ranks having no selection", PARATESTFILE);
@@ -565,9 +565,9 @@ int main(int argc, char **argv)
TestParseCmdLine(argc, argv);
if (dxfer_coll_type == DXFER_INDEPENDENT_IO && MAINPROCESS){
- printf("===================================\n"
- " Using Independent I/O with file set view to replace collective I/O \n"
- "===================================\n");
+ HDprintf("===================================\n"
+ " Using Independent I/O with file set view to replace collective I/O \n"
+ "===================================\n");
}
@@ -575,8 +575,8 @@ int main(int argc, char **argv)
PerformTests();
/* make sure all processes are finished before final report, cleanup
- * and exit.
- */
+ * and exit.
+ */
MPI_Barrier(MPI_COMM_WORLD);
/* Display test summary, if requested */
@@ -592,16 +592,16 @@ int main(int argc, char **argv)
{
int temp;
MPI_Allreduce(&nerrors, &temp, 1, MPI_INT, MPI_MAX, MPI_COMM_WORLD);
- nerrors=temp;
+ nerrors=temp;
}
if (MAINPROCESS){ /* only process 0 reports */
- printf("===================================\n");
- if (nerrors)
- printf("***PHDF5 tests detected %d errors***\n", nerrors);
- else
- printf("PHDF5 tests finished with no errors\n");
- printf("===================================\n");
+ HDprintf("===================================\n");
+ if (nerrors)
+ HDprintf("***PHDF5 tests detected %d errors***\n", nerrors);
+ else
+ HDprintf("PHDF5 tests finished with no errors\n");
+ HDprintf("===================================\n");
}
/* close HDF5 library */
diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c
index 1d52471..34b8a2d 100644
--- a/tools/test/perform/perf.c
+++ b/tools/test/perform/perf.c
@@ -64,13 +64,13 @@
#define H5FATAL 1
#define VRFY(val, mesg, fatal) do { \
if (!val) { \
- printf("Proc %d: ", mynod); \
+ printf("Proc %d: ", mynod); \
printf("*** Assertion failed (%s) at line %4d in %s\n", \
- mesg, (int)__LINE__, __FILE__); \
- if (fatal){ \
- fflush(stdout); \
- goto die_jar_jar_die; \
- } \
+ mesg, (int)__LINE__, __FILE__); \
+ if (fatal){ \
+ fflush(stdout); \
+ goto die_jar_jar_die; \
+ } \
} \
} while(0)
#define RANK 1
diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c
index ed15fa5..aefd2b3 100644
--- a/tools/test/perform/sio_engine.c
+++ b/tools/test/perform/sio_engine.c
@@ -264,7 +264,7 @@ done:
case HDF5:
if (fd.h5fd != -1)
hrc = do_fclose(iot, &fd);
- break;
+ break;
default:
/* unknown request */
HDassert(0 && "Unknown IO type");
@@ -685,7 +685,7 @@ dset_write(int local_dim, file_descr *fd, parameters *parms, void *buffer)
VRFY((hrc >= 0), "H5Dwrite");
break;
-
+
default:
/* unknown request */
HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
@@ -863,7 +863,7 @@ do_read(results *res, file_descr *fd, parameters *parms, void *buffer)
GOTOERROR(FAIL);
}
break;
-
+
default:
/* unknown request */
HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
@@ -987,7 +987,7 @@ dset_read(int local_dim, file_descr *fd, parameters *parms, void *buffer,
h5dset_space_id, h5dxpl, buffer);
VRFY((hrc >= 0), "H5Dread");
break;
-
+
default:
/* unknown request */
HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)parms->io_type);
@@ -1114,7 +1114,7 @@ do_fopen(parameters *param, char *fname, file_descr *fd /*out*/, int flags)
GOTOERROR(FAIL);
}
break;
-
+
default:
/* unknown request */
HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)param->io_type);
@@ -1242,7 +1242,7 @@ do_fclose(iotype iot, file_descr *fd /*out*/)
fd->h5fd = -1;
break;
-
+
default:
/* unknown request */
HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot);
diff --git a/tools/test/perform/sio_perf.c b/tools/test/perform/sio_perf.c
index e77b99e..731be47 100644
--- a/tools/test/perform/sio_perf.c
+++ b/tools/test/perform/sio_perf.c
@@ -98,7 +98,7 @@ static const char *progname = "h5perf_serial";
* It seems that only the options that accept additional information
* such as dataset size (-e) require the colon next to it.
*/
-static const char *s_opts = "a:A:B:b:c:Cd:D:e:F:G:ghi:Imno:p:P:r:stT:v:wx:X:";
+static const char *s_opts = "a:A:B:c:Cd:D:e:F:ghi:Imno:p:P:r:stT:v:wx:X:";
static struct long_options l_opts[] = {
{ "align", require_arg, 'a' },
{ "alig", require_arg, 'a' },