Made progress status as a whole string
This commit is contained in:
@ -152,7 +152,7 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
|||||||
msg = " + " + input + f" ({test_id+1}/{num_tests}): skipped as specified in {configFileName}"
|
msg = " + " + input + f" ({test_id+1}/{num_tests}): skipped as specified in {configFileName}"
|
||||||
print(msg)
|
print(msg)
|
||||||
logger.info(msg)
|
logger.info(msg)
|
||||||
progress.write(f"{input}: {{ folder: {input_folder}, status: skipped }}\n")
|
progress.write(f"{input}: {{ folder: {input_folder}, status: \"skipped\" }}\n")
|
||||||
progress.close()
|
progress.close()
|
||||||
num_skipped = num_skipped + 1
|
num_skipped = num_skipped + 1
|
||||||
test_id = test_id + 1
|
test_id = test_id + 1
|
||||||
@ -169,7 +169,7 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
|||||||
msg = " + " + input + f" ({test_id+1}/{num_tests}): skipped as specified in {configFileName}"
|
msg = " + " + input + f" ({test_id+1}/{num_tests}): skipped as specified in {configFileName}"
|
||||||
print(msg)
|
print(msg)
|
||||||
logger.info(msg)
|
logger.info(msg)
|
||||||
progress.write(f"{input}: {{ folder: {input_folder}, status: skipped }}\n")
|
progress.write(f"{input}: {{ folder: {input_folder}, status: \"skipped\" }}\n")
|
||||||
progress.close()
|
progress.close()
|
||||||
num_skipped = num_skipped + 1
|
num_skipped = num_skipped + 1
|
||||||
test_id = test_id + 1
|
test_id = test_id + 1
|
||||||
@ -267,7 +267,7 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
|||||||
logger.info(f" ERROR: No log.lammps generated with {input_test} with return code {returncode}. Check the {log_file} for the run output.\n")
|
logger.info(f" ERROR: No log.lammps generated with {input_test} with return code {returncode}. Check the {log_file} for the run output.\n")
|
||||||
logger.info(f"\n{input_test}:")
|
logger.info(f"\n{input_test}:")
|
||||||
logger.info(f"\n{error}")
|
logger.info(f"\n{error}")
|
||||||
progress.write(f"{input}: {{ folder: {input_folder}, status: error, no log.lammps }}\n")
|
progress.write(f"{input}: {{ folder: {input_folder}, status: \"error, no log.lammps\" }}\n")
|
||||||
progress.close()
|
progress.close()
|
||||||
num_error = num_error + 1
|
num_error = num_error + 1
|
||||||
test_id = test_id + 1
|
test_id = test_id + 1
|
||||||
@ -292,7 +292,7 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
|||||||
num_error = num_error + 1
|
num_error = num_error + 1
|
||||||
|
|
||||||
results.append(result)
|
results.append(result)
|
||||||
progress.write(f"{input}: {{ folder: {input_folder}, status: {result.status} }}\n")
|
progress.write(f"{input}: {{ folder: {input_folder}, status: \"{result.status}\" }}\n")
|
||||||
progress.close()
|
progress.close()
|
||||||
|
|
||||||
test_id = test_id + 1
|
test_id = test_id + 1
|
||||||
@ -308,7 +308,7 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
|||||||
logger.info(f" {output}")
|
logger.info(f" {output}")
|
||||||
result.status = "completed, error parsing log.lammps into YAML"
|
result.status = "completed, error parsing log.lammps into YAML"
|
||||||
results.append(result)
|
results.append(result)
|
||||||
progress.write(f"{input}: {{ folder: {input_folder}, status: {result.status} }}\n")
|
progress.write(f"{input}: {{ folder: {input_folder}, status: \"{result.status}\" }}\n")
|
||||||
progress.close()
|
progress.close()
|
||||||
|
|
||||||
num_completed = num_completed + 1
|
num_completed = num_completed + 1
|
||||||
@ -325,7 +325,7 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
|||||||
logger.info(f" ERROR: Error parsing {thermo_ref_file}.")
|
logger.info(f" ERROR: Error parsing {thermo_ref_file}.")
|
||||||
result.status = "skipped numerical checks due to parsing the log file"
|
result.status = "skipped numerical checks due to parsing the log file"
|
||||||
results.append(result)
|
results.append(result)
|
||||||
progress.write(f"{input}: {{ folder: {input_folder}, status: completed, numerical checks skipped, unsupported log file format}}\n")
|
progress.write(f"{input}: {{ folder: {input_folder}, status: \"completed, numerical checks skipped, unsupported log file format\" }}\n")
|
||||||
progress.close()
|
progress.close()
|
||||||
num_error = num_error + 1
|
num_error = num_error + 1
|
||||||
test_id = test_id + 1
|
test_id = test_id + 1
|
||||||
@ -344,7 +344,7 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
|||||||
logger.info(f" {thermo_ref_file} also does not exist in the working directory.")
|
logger.info(f" {thermo_ref_file} also does not exist in the working directory.")
|
||||||
result.status = "skipped due to missing the reference log file"
|
result.status = "skipped due to missing the reference log file"
|
||||||
results.append(result)
|
results.append(result)
|
||||||
progress.write(f"{input}: {{ folder: {input_folder}, status: completed, numerical checks skipped, missing the reference log file }}\n")
|
progress.write(f"{input}: {{ folder: {input_folder}, status: \"completed, numerical checks skipped, missing the reference log file\" }}\n")
|
||||||
progress.close()
|
progress.close()
|
||||||
num_error = num_error + 1
|
num_error = num_error + 1
|
||||||
test_id = test_id + 1
|
test_id = test_id + 1
|
||||||
@ -358,7 +358,7 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
|||||||
"Check README in the folder, possibly due to the mpirun command.")
|
"Check README in the folder, possibly due to the mpirun command.")
|
||||||
result.status = "error, incomplete runs"
|
result.status = "error, incomplete runs"
|
||||||
results.append(result)
|
results.append(result)
|
||||||
progress.write(f"{input}: {{ folder: {input_folder}, status: {result.status} }}\n")
|
progress.write(f"{input}: {{ folder: {input_folder}, status: \"{result.status}\" }}\n")
|
||||||
progress.close()
|
progress.close()
|
||||||
num_error = num_error + 1
|
num_error = num_error + 1
|
||||||
test_id = test_id + 1
|
test_id = test_id + 1
|
||||||
@ -372,7 +372,7 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
|||||||
logger.info(f" Check both log files for more details.")
|
logger.info(f" Check both log files for more details.")
|
||||||
result.status = "error, mismatched columns in the log files"
|
result.status = "error, mismatched columns in the log files"
|
||||||
results.append(result)
|
results.append(result)
|
||||||
progress.write(f"{input}: {{ folder: {input_folder}, status: {result.status} }}\n")
|
progress.write(f"{input}: {{ folder: {input_folder}, status: \"{result.status}\" }}\n")
|
||||||
progress.close()
|
progress.close()
|
||||||
num_error = num_error + 1
|
num_error = num_error + 1
|
||||||
test_id = test_id + 1
|
test_id = test_id + 1
|
||||||
@ -501,7 +501,7 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
|
|||||||
msg += ", memory leaks detected"
|
msg += ", memory leaks detected"
|
||||||
num_memleak = num_memleak + 1
|
num_memleak = num_memleak + 1
|
||||||
|
|
||||||
progress.write(f"{input}: {{ folder: {input_folder}, status: {msg} }}\n")
|
progress.write(f"{input}: {{ folder: {input_folder}, status: \"{msg}\" }}\n")
|
||||||
progress.close()
|
progress.close()
|
||||||
|
|
||||||
# count the number of completed runs
|
# count the number of completed runs
|
||||||
|
|||||||
Reference in New Issue
Block a user