Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 26 additions & 18 deletions src/mdtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1796,29 +1796,13 @@ void summarize_results(int iterations, mdtest_results_t * results) {
}

/* Checks to see if the test setup is valid. If it isn't, fail. */
void md_validate_tests() {

void md_validate_tests_rank0() {
if (((o.stone_wall_timer_seconds > 0) && (o.branch_factor > 1)) || ! o.barriers) {
FAIL( "Error, stone wall timer does only work with a branch factor <= 1 (current is %d) and with barriers\n", o.branch_factor);
}

if (!o.create_only && ! o.stat_only && ! o.read_only && !o.remove_only && !o.rename_dirs) {
o.create_only = o.stat_only = o.read_only = o.remove_only = o.rename_dirs = 1;
VERBOSE(1,-1,"main: Setting create/stat/read/remove_only to True" );
}

VERBOSE(1,-1,"Entering md_validate_tests..." );

/* if dirs_only and files_only were both left unset, set both now */
if (!o.dirs_only && !o.files_only) {
o.dirs_only = o.files_only = 1;
}

/* if shared file 'S' access, no directory tests */
if (o.shared_file) {
o.dirs_only = 0;
}

/* check for no barriers with shifting processes for different phases.
that is, one may not specify both -B and -N as it will introduce
race conditions that may cause errors stat'ing or deleting after
Expand Down Expand Up @@ -1892,7 +1876,7 @@ void md_validate_tests() {
if(o.create_only && o.read_only && o.read_bytes > o.write_bytes)
FAIL("When writing and reading files, read bytes must be smaller than write bytes");

if (rank == 0 && o.saveRankDetailsCSV){
if (o.saveRankDetailsCSV){
// check that the file is writeable, truncate it and add header
FILE* fd = fopen(o.saveRankDetailsCSV, "w");
if (fd == NULL){
Expand All @@ -1915,6 +1899,30 @@ void md_validate_tests() {
}
}

void md_validate_tests() {
if (!o.create_only && ! o.stat_only && ! o.read_only && !o.remove_only && !o.rename_dirs) {
o.create_only = o.stat_only = o.read_only = o.remove_only = o.rename_dirs = 1;
VERBOSE(1,-1,"main: Setting create/stat/read/remove_only to True" );
}

/* if dirs_only and files_only were both left unset, set both now */
if (!o.dirs_only && !o.files_only) {
o.dirs_only = o.files_only = 1;
}

/* if shared file 'S' access, no directory tests */
if (o.shared_file) {
o.dirs_only = 0;
}

/* In order to avoid printing warning output duplicated N times (by N ranks),
* only have rank 0 perform further validation.
*/
if (rank == 0) {
md_validate_tests_rank0();
}
}

void show_file_system_size(char *file_system) {
char real_path[MAX_PATHLEN];
char file_system_unit_str[MAX_PATHLEN] = "GiB";
Expand Down