-
-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add expedited testing support to t_filters_parallel #3665
Merged
lrknox
merged 1 commit into
HDFGroup:develop
from
jhendersonHDF:parallel_filters_testing
Oct 12, 2023
+68
−26
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,8 @@ static MPI_Info info = MPI_INFO_NULL; | |
static int mpi_rank = 0; | ||
static int mpi_size = 0; | ||
|
||
static int test_express_level_g; | ||
|
||
int nerrors = 0; | ||
|
||
/* Arrays of filter ID values and filter names (should match each other) */ | ||
|
@@ -9705,14 +9707,15 @@ int | |
main(int argc, char **argv) | ||
{ | ||
unsigned seed; | ||
size_t cur_filter_idx = 0; | ||
size_t num_filters = 0; | ||
hid_t file_id = H5I_INVALID_HID; | ||
hid_t fcpl_id = H5I_INVALID_HID; | ||
hid_t group_id = H5I_INVALID_HID; | ||
hid_t fapl_id = H5I_INVALID_HID; | ||
hid_t dxpl_id = H5I_INVALID_HID; | ||
hid_t dcpl_id = H5I_INVALID_HID; | ||
size_t cur_filter_idx = 0; | ||
size_t num_filters = 0; | ||
hid_t file_id = H5I_INVALID_HID; | ||
hid_t fcpl_id = H5I_INVALID_HID; | ||
hid_t group_id = H5I_INVALID_HID; | ||
hid_t fapl_id = H5I_INVALID_HID; | ||
hid_t dxpl_id = H5I_INVALID_HID; | ||
hid_t dcpl_id = H5I_INVALID_HID; | ||
bool expedite_testing = false; | ||
int mpi_code; | ||
|
||
/* Initialize MPI */ | ||
|
@@ -9763,6 +9766,17 @@ main(int argc, char **argv) | |
|
||
TestAlarmOn(); | ||
|
||
/* | ||
* Get the TestExpress level setting | ||
*/ | ||
test_express_level_g = GetTestExpress(); | ||
if ((test_express_level_g >= 1) && MAINPROCESS) { | ||
printf("** Some tests will be skipped due to TestExpress setting.\n"); | ||
printf("** Exhaustive tests will only be performed for the first available filter.\n"); | ||
printf("** Set the HDF5TestExpress environment variable to 0 to perform exhaustive testing for all " | ||
"available filters.\n\n"); | ||
} | ||
|
||
/* | ||
* Obtain and broadcast seed value since ranks | ||
* aren't guaranteed to arrive here at exactly | ||
|
@@ -9829,9 +9843,26 @@ main(int argc, char **argv) | |
dcpl_id = H5Pcreate(H5P_DATASET_CREATE); | ||
VRFY((dcpl_id >= 0), "DCPL creation succeeded"); | ||
|
||
/* Add a space after the HDF5_PARAPREFIX notice from h5_fixname */ | ||
if (MAINPROCESS) | ||
puts(""); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see any space. |
||
|
||
/* Run tests with all available filters */ | ||
for (cur_filter_idx = 0; cur_filter_idx < num_filters; cur_filter_idx++) { | ||
H5D_selection_io_mode_t sel_io_mode; | ||
H5Z_filter_t cur_filter = filterIDs[cur_filter_idx]; | ||
htri_t filter_avail; | ||
|
||
/* Make sure current filter is available before testing with it */ | ||
filter_avail = H5Zfilter_avail(cur_filter); | ||
VRFY((filter_avail >= 0), "H5Zfilter_avail succeeded"); | ||
|
||
if (!filter_avail) { | ||
if (MAINPROCESS) | ||
printf("== SKIPPED tests with filter '%s' - filter unavailable ==\n\n", | ||
filterNames[cur_filter_idx]); | ||
continue; | ||
} | ||
|
||
/* Run tests with different selection I/O modes */ | ||
for (sel_io_mode = H5D_SELECTION_IO_MODE_DEFAULT; sel_io_mode <= H5D_SELECTION_IO_MODE_ON; | ||
|
@@ -9849,13 +9880,11 @@ main(int argc, char **argv) | |
|
||
/* Run with each of the test modes (single dataset, multiple datasets, etc.) */ | ||
for (test_mode = USE_SINGLE_DATASET; test_mode < TEST_MODE_SENTINEL; test_mode++) { | ||
H5Z_filter_t cur_filter = filterIDs[cur_filter_idx]; | ||
const char *sel_io_str; | ||
const char *alloc_time; | ||
const char *mode; | ||
unsigned filter_config; | ||
htri_t filter_avail; | ||
char group_name[512]; | ||
const char *sel_io_str; | ||
const char *alloc_time; | ||
const char *mode; | ||
unsigned filter_config; | ||
char group_name[512]; | ||
|
||
switch (sel_io_mode) { | ||
case H5D_SELECTION_IO_MODE_DEFAULT: | ||
|
@@ -9902,6 +9931,23 @@ main(int argc, char **argv) | |
mode = "unknown"; | ||
} | ||
|
||
/* | ||
* If expediting the remaining tests, just run with a single | ||
* configuration that is interesting enough. In this case, | ||
* run with: | ||
* | ||
* - A single dataset | ||
* - Incremental file space allocation timing | ||
* - Linked-chunk (single) I/O | ||
* - The default setting for selection I/O | ||
*/ | ||
if (expedite_testing) { | ||
if (test_mode != USE_SINGLE_DATASET || space_alloc_time != H5D_ALLOC_TIME_INCR || | ||
chunk_opt != H5FD_MPIO_CHUNK_ONE_IO || | ||
sel_io_mode != H5D_SELECTION_IO_MODE_DEFAULT) | ||
continue; | ||
} | ||
|
||
if (MAINPROCESS) | ||
printf("== Running tests in mode '%s' with filter '%s' using selection I/O mode " | ||
"'%s', '%s' and '%s' allocation time ==\n\n", | ||
|
@@ -9910,17 +9956,6 @@ main(int argc, char **argv) | |
: "Multi-Chunk I/O", | ||
alloc_time); | ||
|
||
/* Make sure current filter is available before testing with it */ | ||
filter_avail = H5Zfilter_avail(cur_filter); | ||
VRFY((filter_avail >= 0), "H5Zfilter_avail succeeded"); | ||
|
||
if (!filter_avail) { | ||
if (MAINPROCESS) | ||
printf(" ** SKIPPED tests with filter '%s' - filter unavailable **\n\n", | ||
filterNames[cur_filter_idx]); | ||
continue; | ||
} | ||
|
||
/* Get the current filter's info */ | ||
VRFY((H5Zget_filter_info(cur_filter, &filter_config) >= 0), | ||
"H5Zget_filter_info succeeded"); | ||
|
@@ -9987,6 +10022,13 @@ main(int argc, char **argv) | |
} | ||
} | ||
} | ||
|
||
/* | ||
* If the TestExpress level setting isn't set for exhaustive | ||
* testing, run smoke checks for the other filters | ||
*/ | ||
if (!expedite_testing && (test_express_level_g >= 1)) | ||
expedite_testing = true; | ||
} | ||
|
||
VRFY((H5Pclose(dcpl_id) >= 0), "DCPL close succeeded"); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space -> newline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A vertical space, though, to be completely correct, a blank line since a newline isn't entirely accurate either.