Skip to content

Commit

Permalink
turned on verbose to check tolerances and also print that info out to…
Browse files Browse the repository at this point in the history
… the run.log file
  • Loading branch information
ndtrung81 committed Oct 8, 2024
1 parent 900f472 commit 0e3a6a7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/kokkos-regression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,12 @@ jobs:
--lmp-bin=build/lmp \
--config-file=tools/regression-tests/config_kokkos_openmp.yaml \
--example-folders="examples/colloid;examples/melt;examples/micelle;examples/threebody" \
--output-file=output.xml \
--progress-file=progress.yaml \
--log-file=run.log
tar -cvf kokkos-regression-test.tar run.log progress.yaml output.xml
--output-file=output_kokkos.xml --progress-file=progress_kokkos.yaml --log-file=run_kokkos.log \
--verbose
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: kokkos-regression-test-artifact
path: kokkos-regression-test.tar
path: *_kokkos.*

20 changes: 14 additions & 6 deletions tools/regression-tests/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,9 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
msg = f" {num_abs_failed} abs diff checks failed."
print(msg)
logger.info(msg)
for out in failed_abs_output:
logger.info(f" - {out}")

if verbose == True:
for out in failed_abs_output:
print(f" - {out}")
Expand All @@ -667,6 +670,9 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
msg = f" {num_rel_failed} rel diff checks failed."
print(msg)
logger.info(msg)
for out in failed_rel_output:
logger.info(f" - {out}")

if verbose == True:
for out in failed_rel_output:
print(f" - {out}")
Expand All @@ -675,11 +681,15 @@ def iterate(lmp_binary, input_folder, input_list, config, results, progress_file
msg = f" all {num_checks} checks passed."
print(msg)
logger.info(msg)

result.status = f" 'status': 'passed', 'abs_diff_failed': '{num_abs_failed}', 'rel_diff_failed': '{num_rel_failed}' "

num_passed = num_passed + 1
else:
result.status = f" 'status': 'failed', 'abs_diff_failed': '{num_abs_failed}', 'rel_diff_failed': '{num_rel_failed}' "
num_error = num_error + 1

result.status = f" 'abs_diff_failed': '{num_abs_failed}', 'rel_diff_failed': '{num_rel_failed}' "

results.append(result)

# check if memleak detects from valgrind run (need to replace "mpirun" -> valgrind --leak-check=yes mpirun")
Expand Down Expand Up @@ -1556,12 +1566,10 @@ def has_markers(inputFileName):
for result in all_results:
#print(f"{result.name}: {result.status}")
case = TestCase(name=result.name, classname=result.name)
if result.status == "failed":
case.add_failure_info(message="Actual values did not match expected ones.")
if result.status == "skipped":
if "passed" not in result.status:
case.add_failure_info(message=result.status)
if "skipped" in result.status:
case.add_skipped_info(message="Test was skipped.")
if result.status == "error":
case.add_skipped_info(message="Test run had errors.")
test_cases.append(case)

current_timestamp = datetime.datetime.now()
Expand Down

0 comments on commit 0e3a6a7

Please sign in to comment.