-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests #96
Conversation
A Fortran `stop` is actually just normal termination, so checking return code wouldn't catch all errors.
Also allow for testing other cases by providing a `--case` argument to pytest
Nice! How about putting the instructions from here in a README.md in the tests/ directory? For only two cores on CI, mpirun has a flag |
Yes, will do that! You also had some interesting domain configurations in mind, right? |
Some test suggestions Domainsdo the following cases with both: ! itot not divisible by nprocy, jtot not divisible by nprocx ! ncely square and divisible ! odd size could repeat this test for different FFT choices (solver_id = ...) Advection schemesTry case 2 above for all advection schemes. Same scheme for all variables. Run once |
Domain and advection tests are in and they're still passing :-) Testing cuFFT is going to be difficult, since we don't have access to GPU-accelerated CI runners. I was also thinking that rico may be a more interesting test case than bomex, because it also include some scalar fields. What do you think @fjansson? |
rico is good, but the one in cases/rico is annoying because it has the case-specific moduser which needs to be compiled in. In cases/benchmarks is a rico which works without moduser. We could do a botany case, since that uses radiation also. |
Do we want to test both RRTMG and RRTMGP for botany? If so, how can I change namoptions to use the new scheme? |
Add symlink `namoptions.001`
That would be nice. The only other thing needed that I can think of is that RRTMGP needs other data files. They can probably be symlinks in the test case folder, pointing to the data files which are together with the source code. I did this:
At some point I also had to do |
Also decrease runtime and mark upwinding scheme as xfail (for non-uniform grids)
@fjansson here's a basic prototype for performing simple tests using Pytest as we discussed. I've set up the test such that any of the cases in
cases/
can be tested, as long as the case doesn't need amoduser.f90
.To perform tests locally:
f90nml
for patching namoptions):cases
directory:If a test fails, the output of dales will be printed.