Version 57 (modified by 12 years ago) ( diff ) | ,
---|
AstroBEAR Test Suite
The basic design philosophy has been simplified from the old version of the test suite. The test suite is essentially a group of problem modules that are automatically compiled and run in alphabetical order. Each problem tests a different part of the astrobear code.
Current Testing
At the moment we do post-processing tests of AstroBEAR 2.0. Basically, tests consist on comparing the flow variables in a chombo file produced by the test modules, against a reference chombo file (see below). All test related files are located in modules/tests/ within the astrobear code. Each test has its own directory which contains:
- the problem's data files: global.data, modules.data, problem.data, profile.data, solver.data, communication.data, io.data and physics.data
- the problem's module: problem.f90
- two data files used by bear2fix to produce test reports: bear2fix.data.test and bear2fix.data.img
All of the post-processing is done with bear2fix on Clover. Similar to the modules/tests directory in astrobear, Clover has a data/tests directory. Each tests has its own directory which contains:
- bear2fix.data.test and bear2fix.data.img
- a "ref" directory which contains the reference chombo file
- an "images" directory which contains the reference image and the new simulation image
- a "logs" directory (see below)
The reference chombo file (CHref). This file, chombo00001.hdf, has been produced with the code and verified by someone in our research group using well documented quantitative analytical or numerical studies. Reference chombos are included with the current distribution of the code, and information about them can be found in their corresponding test wiki pages.
Running tests. This is done using two shell scripts:
- postprocess.s, that iterates over each of the test problem and calls the go.s script,
- go.s, which basically cd's into the current test directory and executes bear2fix (see below), converts the images from ps to png and copies them back into the image directory. These images will then be linked to the corresponding test report wiki pages.
Tests report. Once test runs are finished, bear2fix will be executed. It will do the error computations and produce a png image showing the current result of the run. bear2fix is executed twice; the 1st time it reads bear2fix.data.img to set the color tables for the test report image, whereas the 2nd time it reads bear2fix.data.test to perform the error computation and produce the test report errors.
Tests error calculations. These are done in bear2fix via comparing the fluid variable information contained in the chombos. See the section below the list of tests for a more detailed description.
If the test fails, The test will fail if one of the relative errors calculated is greater than 5%. Inspection of the text report wiki page should show why the test failed.
The logs directory is located in each tests' directory. It contains the new simulation chombo, the abs_erros.data and rel_errors.data files, and a testlog file which contains the runtime output.
*Wiki Integration Coming Soon*
List of tests
Name | Description | Variations | Est. time | Status |
---|---|---|---|---|
Compile Flags | checks that compilation completes for different combinations of compile flags | 8 possible combinations | ??? | In Development (Matt) |
2D Field Loop Advection TestSuite/FieldLoop2D | Advects a loop of magnetic field diagonally across the grid | Includes a restart test | Approx 30 minutes (2-proc, grass) | Implemented |
Uniform Collapse TestSuite/UniformCollapse | The uniform collapse of a sphere. | None | Approx 5 minutes (4-proc, alfalfa) | Implemented |
Analytic Cooling TestSuite/RadiativeShocks | The position of a strong shock oscillates depending on gas cooling rate. Cooling is prescribed analytically. | 3 different sets of parameters | Approx 6 minutes (2-proc, grass) | Implemented |
1D Sod Shock Tube TestSuite/SodShockTube | Runs 1D Sod shock tube with all combinations of integration schemes | None | 60 sec. (single-proc, grass) | In Development (Eddie) |
2D Rayleigh-Taylor Instability TestSuite/RayleighTaylor2D | A heavy fluid above a light fluid with uniform gravity is perturbed. | None | Approx 11 minutes (4-proc, alfalfa) | Implemented |
Bondi-Hoyle Accretion TestSuite/Bondi | Spherically symmetric accretion of gas | None | ??? | Implemented |
Orbiting Particles TestSuite/OrbitingParticles | 2 particles orbiting each other | None | ??? | Implemented |
Filling Fractions TestSuite/FillingFraction | Creates nested grids based on filling fractions | None | < 1 min | Implemented |
The results for every test (apart from the Compile Flags Test) are of the same form:
Two postprocessing error files are produced which contain absolute errors and relative errors:
absolute errors (vector): MAX( |CHnew(q,x) - CHref(q,x)| ) relative errors (vector): MAX( |CHnew(q,x) - CHref(q,x)|/|CHref(q,x)| )
where CHnew is the final chombo file that was produced by the new simulations (the one that's been tested), CHref is the reference chombo file (the one that was verified to be accurate), q=(density, x-momentum, y-momentum, …) and x is the cell position vector. The error vectors are computed by checking all cell positions x and taking the maximum value of the above expressions, so the error vectors are the same size as q.
Certain simulations may have a momentum component of zero, which would make CHref(q,x) = 0 thereby producing a divide by zero error. To avoid this, the relative error is calculated differently. See this blog post for more details.
CASTRO tests
- Scalability
- 643 weak scaling test
- No gravity
- Multipole gravity
- Poisson gravity
- 643 weak scaling test
- hydrodynamic solver
- Sod Shock Tube (Sod, 1978)
- Double rarefaction (Toro, 1997)
- Strong shock (Toro, 1997)
- hydrodynamics, geometry
- 1D Sedov-Taylor blast wave (Sedov, 1959)
- 2D cylindrical Sedov-Taylor blast wave (Sedov, 1959)
- 3D Cartesian Sedov-Taylor blast wave, 1D (Sedov, 1959)
- hydrodynamics, gravity
- Split piecewise linear, Rayleigh-Taylor (Taylor, 1950)
- Unsplit piecewise linear, Rayleigh-Taylor (Taylor, 1950)
- Split PPM (old limiter), Rayleigh-Taylor (Taylor, 1950)
- Unsplit PPM old limiter), Rayleigh-Taylor (Taylor, 1950)
- Split PPM (new limiter), Rayleigh-Taylor (Taylor, 1950)
- Unsplit PPM (new limiter), Rayleigh-Taylor (Taylor, 1950)