added a verify command to our makefile. so for future variants we can just use...
This commit is contained in:
@@ -108,6 +108,16 @@ make test
|
||||
|
||||
Compiles and runs all unit tests.
|
||||
|
||||
```bash
|
||||
make verify
|
||||
```
|
||||
|
||||
Runs the simulation with the reference parameters and compares the output to `reference/baseline_n60_i4000.csv` using `verify.py`. Useful to check that a variant gives the same result as the baseline:
|
||||
|
||||
```bash
|
||||
make verify VARIANT=v1_cutoff
|
||||
```
|
||||
|
||||
```bash
|
||||
make asm
|
||||
```
|
||||
@@ -356,12 +366,12 @@ make test VARIANT=v1_cutoff
|
||||
make run-bench VARIANT=v1_cutoff N_P=100 N_ITER=10000
|
||||
```
|
||||
### Verifying correctness
|
||||
A reference CSV is stored in reference/baseline_n60_i4000.csv. To verify that a variant produces the same simulation output:
|
||||
A reference CSV is stored in `reference/baseline_n60_i4000.csv`. To check that a variant produces the same simulation output, run:
|
||||
|
||||
```bash
|
||||
make run VARIANT=v1_cutoff N_P=60 N_ITER=4000 CSV=test_output.csv
|
||||
diff reference/baseline_n60_i4000.csv test_output.csv
|
||||
make verify VARIANT=v1_cutoff
|
||||
```
|
||||
If the variant changes numerical results (e.g., distance cutoff skipping negligible forces), use a tolerance-based comparison instead of exact diff and justify the deviation.
|
||||
If the variant changes numerical results (e.g., distance cutoff skipping negligible forces), use a tolerance-based comparison (use the python script with a third argument (tolerance)) instead of exact diff and justify the deviation.
|
||||
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user