provide updated reference and update command line
This commit is contained in:
6
.github/workflows/full-regression.yml
vendored
6
.github/workflows/full-regression.yml
vendored
@ -3,10 +3,8 @@ name: "Full Regression Test"
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
# branches:
|
branches:
|
||||||
# - develop
|
- develop
|
||||||
pull_request:
|
|
||||||
- develop
|
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|||||||
4
.github/workflows/quick-regression.yml
vendored
4
.github/workflows/quick-regression.yml
vendored
@ -78,7 +78,9 @@ jobs:
|
|||||||
python3 tools/regression-tests/run_tests.py \
|
python3 tools/regression-tests/run_tests.py \
|
||||||
--lmp-bin=build/lmp \
|
--lmp-bin=build/lmp \
|
||||||
--config-file=tools/regression-tests/config_quick.yaml \
|
--config-file=tools/regression-tests/config_quick.yaml \
|
||||||
--examples-top-level=examples --quick --quick-branch=origin/develop --quick-max=100 --num-workers=4
|
--examples-top-level=examples \
|
||||||
|
--quick-reference=tools/regression-tests/reference.yaml \
|
||||||
|
--quick --quick-branch=origin/develop --quick-max=100 --num-workers=4
|
||||||
|
|
||||||
if [ -f input-list-${{ matrix.idx }}.txt ]
|
if [ -f input-list-${{ matrix.idx }}.txt ]
|
||||||
then \
|
then \
|
||||||
|
|||||||
@ -1036,6 +1036,7 @@ if __name__ == "__main__":
|
|||||||
quick = False
|
quick = False
|
||||||
quick_branch = "origin/develop"
|
quick_branch = "origin/develop"
|
||||||
quick_max = 50
|
quick_max = 50
|
||||||
|
quick_reference = os.path.join(LAMMPS_DIR, 'tools', 'regression-tests', 'reference.yaml')
|
||||||
|
|
||||||
# distribute the total number of input scripts over the workers
|
# distribute the total number of input scripts over the workers
|
||||||
num_workers = 1
|
num_workers = 1
|
||||||
@ -1062,6 +1063,8 @@ if __name__ == "__main__":
|
|||||||
help="Branch to which compare the current head to for changed styles")
|
help="Branch to which compare the current head to for changed styles")
|
||||||
parser.add_argument("--quick-max", dest="quick_max", default=50,
|
parser.add_argument("--quick-max", dest="quick_max", default=50,
|
||||||
help="Maximum number of inputs to randomly select")
|
help="Maximum number of inputs to randomly select")
|
||||||
|
parser.add_argument("--quick-reference", dest="quick_reference", default=quick_reference,
|
||||||
|
help="Reference YAML file with progress data from full regression test run")
|
||||||
parser.add_argument("--skip-numerical-check",dest="skip_numerical_check", action='store_true', default=False,
|
parser.add_argument("--skip-numerical-check",dest="skip_numerical_check", action='store_true', default=False,
|
||||||
help="Skip numerical checks")
|
help="Skip numerical checks")
|
||||||
parser.add_argument("--gen-ref",dest="genref", action='store_true', default=False,
|
parser.add_argument("--gen-ref",dest="genref", action='store_true', default=False,
|
||||||
@ -1098,6 +1101,7 @@ if __name__ == "__main__":
|
|||||||
quick = args.quick
|
quick = args.quick
|
||||||
quick_branch = args.quick_branch
|
quick_branch = args.quick_branch
|
||||||
quick_max = int(args.quick_max)
|
quick_max = int(args.quick_max)
|
||||||
|
quick_reference = args.quick_reference
|
||||||
skip_numerical_check = args.skip_numerical_check
|
skip_numerical_check = args.skip_numerical_check
|
||||||
resume = args.resume
|
resume = args.resume
|
||||||
progress_file = args.progress_file
|
progress_file = args.progress_file
|
||||||
@ -1132,13 +1136,38 @@ if __name__ == "__main__":
|
|||||||
msg = f"\nThere are {len(input_list)} input scripts with changed styles relative to branch {quick_branch}."
|
msg = f"\nThere are {len(input_list)} input scripts with changed styles relative to branch {quick_branch}."
|
||||||
msg += "\nChanged styles: " + str(styles)
|
msg += "\nChanged styles: " + str(styles)
|
||||||
|
|
||||||
|
# read in refrence data from a previous test run
|
||||||
|
with open(quick_reference, 'r') as f:
|
||||||
|
reference = yaml.load(f, Loader=Loader)
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
# trim previously failing run and runs that would take too long
|
||||||
|
new_list = []
|
||||||
|
keys = reference.keys()
|
||||||
|
msg += "\nTrimming inputs using reference data from " + str(len(keys)) + " previous runs: "
|
||||||
|
for infile in input_list:
|
||||||
|
input = os.path.split(infile)[1]
|
||||||
|
if input in keys:
|
||||||
|
if (reference[input]['walltime'] < 0.0):
|
||||||
|
# print("Skipping ", input, " for previous failure")
|
||||||
|
pass
|
||||||
|
elif (reference[input]['walltime'] > 29.0):
|
||||||
|
# print("Skipping ", input, " for wall time limit")
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
new_list.append(infile)
|
||||||
|
else:
|
||||||
|
new_list.append(infile)
|
||||||
|
input_list = new_list
|
||||||
|
msg += "trimmed list has " + str(len(input_list)) + " entries"
|
||||||
|
|
||||||
if len(input_list) > quick_max:
|
if len(input_list) > quick_max:
|
||||||
input_list = random.sample(input_list, quick_max)
|
input_list = random.sample(input_list, quick_max)
|
||||||
msg += "\nTesting " + str(quick_max) + " randomly selected inputs"
|
msg += "\nTesting " + str(quick_max) + " randomly selected inputs"
|
||||||
|
|
||||||
print(msg)
|
print(msg)
|
||||||
logger.info(msg)
|
logger.info(msg)
|
||||||
|
quit()
|
||||||
# divide the list of input scripts into num_workers chunks
|
# divide the list of input scripts into num_workers chunks
|
||||||
sublists = divide_into_N(input_list, num_workers)
|
sublists = divide_into_N(input_list, num_workers)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user