Skip to content

Commit

Permalink
add new reproducer scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking committed Oct 27, 2024
1 parent f9b1e31 commit 6790d00
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
30 changes: 30 additions & 0 deletions reproducer0.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh

set -x

# compile
mkdir build
cd build
cmake .. -DPARTHENON_ENABLE_PYTHON_MODULE_CHECK=OFF
cmake --build .
cd ..

# first run
mpirun -np 8 ./build/bin/athenaPK -i inputs/precipitator_restart_reproducer.in

# move outputs to avoid being overwritten
mkdir first_run
mv parthenon.* first_run
rm *.csv

# restart run from time zero
mpirun -np 8 ./build/bin/athenaPK -r first_run/parthenon.restart.00000.rhdf

# clean up
rm *.csv

# compare SECOND restart outputs
h5diff first_run/parthenon.restart.00002.rhdf parthenon.restart.00002.rhdf

# compare with phdf_diff
uv run external/parthenon/scripts/python/packages/parthenon_tools/parthenon_tools/phdf_diff.py -one parthenon.restart.00002.rhdf first_run/parthenon.restart.00002.rhdf
7 changes: 2 additions & 5 deletions reproducer.sh → reproducer1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mkdir first_run
mv parthenon.* first_run
rm *.csv

# restart run
# restart run from SECOND restart file
mpirun -np 8 ./build/bin/athenaPK -r first_run/parthenon.restart.00001.rhdf

# clean up
Expand All @@ -26,8 +26,5 @@ rm *.csv
# compare restart outputs
h5diff first_run/parthenon.restart.00002.rhdf parthenon.restart.00002.rhdf

# compare snapshot outputs
h5diff first_run/parthenon.prim.00002.phdf parthenon.prim.00002.phdf

# compare with phdf_diff
python3 external/parthenon/scripts/python/packages/parthenon_tools/parthenon_tools/phdf_diff.py -brief parthenon.restart.00002.rhdf first_run/parthenon.restart.00002.rhdf
uv run external/parthenon/scripts/python/packages/parthenon_tools/parthenon_tools/phdf_diff.py -one parthenon.restart.00002.rhdf first_run/parthenon.restart.00002.rhdf

0 comments on commit 6790d00

Please sign in to comment.