Skip to content

Commit

Permalink
Don't test too many combinations in CI tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartvstratum committed Oct 25, 2024
1 parent 0632789 commit b01f1a7
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions cases/run_ci_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
modes = ['cpu', 'cpumpi']
precs = ['dp', 'sp']

# Blacklist combinations.
blacklist = (
['dp', 'cpumpi']
)

# Link executables to working directory
for prec in precs:
for mode in modes:
Expand Down Expand Up @@ -38,18 +43,20 @@

for prec in precs:
for mode in modes:
microhh_exec = 'microhh_{}_{}'.format(prec, mode)
experiment = '{}_{}'.format(prec, mode)
if [prec, mode] not in blacklist:

microhh_exec = 'microhh_{}_{}'.format(prec, mode)
experiment = '{}_{}'.format(prec, mode)

for case in les_cases:
err += mht.run_case(case,
les_options, mpi_options,
microhh_exec, mode, case, experiment)
for case in les_cases:
err += mht.run_case(case,
les_options, mpi_options,
microhh_exec, mode, case, experiment)

for case in dns_cases:
err += mht.run_case(case,
dns_options, mpi_options,
microhh_exec, mode, case, experiment)
for case in dns_cases:
err += mht.run_case(case,
dns_options, mpi_options,
microhh_exec, mode, case, experiment)


# Restart tests for a DNS + LES case
Expand All @@ -76,16 +83,18 @@

for prec in precs:
for mode in modes:
microhh_exec = 'microhh_{}_{}'.format(prec, mode)
experiment = '{}_{}'.format(prec, mode)
if [prec, mode] not in blacklist:

microhh_exec = 'microhh_{}_{}'.format(prec, mode)
experiment = '{}_{}'.format(prec, mode)

err += mht.run_restart('drycbl',
dns_options, mpi_options, dns_perturbations,
microhh_exec, mode, 'drycbl', experiment)
err += mht.run_restart('drycbl',
dns_options, mpi_options, dns_perturbations,
microhh_exec, mode, 'drycbl', experiment)

err += mht.run_restart('bomex',
les_options, mpi_options, les_perturbations,
microhh_exec, mode, 'bomex', experiment)
err += mht.run_restart('bomex',
les_options, mpi_options, les_perturbations,
microhh_exec, mode, 'bomex', experiment)

if err > 0:
sys.exit('One of more travis case tests failed!')

0 comments on commit b01f1a7

Please sign in to comment.