diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index db631315a..0dddeffc3 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -33,7 +33,7 @@ jobs: pip3 install --user numpy netcdf4 # Configure and build without MPI - - name: Configure and build (no MPI) + - name: Configure and build DP + CPU run: | mkdir build_dp_cpu cd build_dp_cpu @@ -41,14 +41,14 @@ jobs: make -j 4 cd .. - ## Configure and build without MPI, in SP - #- name: Configure and build (no MPI) - # run: | - # mkdir build_dp_cpu - # cd build_dp_cpu - # cmake -DSYST=ubuntu_20lts -DUSESP=true .. - # make -j 4 - # cd .. + # Configure and build without MPI, in SP + - name: Configure and build SP + CPU + run: | + mkdir build_sp_cpu + cd build_sp_cpu + cmake -DSYST=ubuntu_20lts -DUSESP=true .. + make -j 4 + cd .. ## Configure and build with MPI #- name: Configure and build (with MPI) @@ -60,8 +60,8 @@ jobs: # cd .. # Run tests - #- name: Run tests - # run: | - # cd cases - # python3 run_travis.py + - name: Run tests + run: | + cd cases + python3 run_ci_tests.py diff --git a/cases/run_travis.py b/cases/run_ci_tests.py similarity index 68% rename from cases/run_travis.py rename to cases/run_ci_tests.py index d4532289b..7d51178c2 100644 --- a/cases/run_travis.py +++ b/cases/run_ci_tests.py @@ -4,12 +4,10 @@ sys.path.append('../python/') import microhh_tools as mht -modes = ['cpu', 'cpumpi'] -precs = ['dp'] # ['dp', 'sp'] +modes = ['cpu'] +precs = ['dp', 'sp'] -# # Link executables to working directory -# for prec in precs: for mode in modes: src = '../build_{}_{}/microhh'.format(prec, mode) @@ -17,10 +15,8 @@ if not os.path.exists(dst): os.symlink(src, dst) -# # Short tests of init + run phase, to test if cases start -# -les_cases = ['arm', 'bomex', 'drycblles', 'eady', 'gabls1', 'rico', 'sullivan2011'] # dycoms+lasso+rcemip missing +les_cases = ['arm', 'bomex', 'drycblles', 'gabls1', 'rico', 'sullivan2011'] # dycoms+lasso+rcemip missing dns_cases = ['drycbl', 'ekman', 'drycblslope', 'moser180', 'moser600'] # prandtlslope missing les_options = { @@ -55,9 +51,8 @@ dns_options, mpi_options, microhh_exec, mode, case, experiment) -# + # Restart tests for a DNS + LES case -# no_stats = { 'stats': {'swstats': 0}, 'cross': {'swcross': 0}, 'column': {'swcolumn': 0}} @@ -70,29 +65,27 @@ les_perturbations = { 'default': {}, - 'vapor': {'thermo': {'swthermo': 'vapor'}}, 'fixed_basestate': {'thermo': {'swupdatebasestate': 0}}, - 'advec_2i3': {'advec': {'swadvec': '2i3'}}, - 'advec_2i4': {'advec': {'swadvec': '2i4'}}} + 'advec_2i5': {'advec': {'swadvec': '2i5'}}} les_options.update(no_stats) -#print('---------------------') -#print('Running restart tests') -#print('---------------------') -# -#for prec in precs: -# for mode in modes: -# 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('bomex', -# les_options, mpi_options, les_perturbations, -# microhh_exec, mode, 'bomex', experiment) +print('---------------------') +print('Running restart tests') +print('---------------------') + +for prec in precs: + for mode in modes: + 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('bomex', + les_options, mpi_options, les_perturbations, + microhh_exec, mode, 'bomex', experiment) if err > 0: sys.exit('One of more travis case tests failed!')