ex7: add diff and compare target

- simplifies the `check` target
- plots the differences or prints the differences of arbitrary data
  points
This commit is contained in:
2025-11-03 11:17:58 +01:00
parent 82a2b6c46f
commit 9fd64db349
2 changed files with 8 additions and 4 deletions

View File

@@ -18,13 +18,16 @@ images/%.png: data/%.dat
./plot_image.sh $<
movie: ${IMAGES}
ffmpeg -y -an -i images/%5d.png -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3 -r 12 wave.mp4
check: dirs sequential parallel
data: dirs sequential parallel
mkdir -p data_sequential
./sequential
cp -rf ./data/* ./data_sequential
./parallel
python3 compare.py data_sequential/00000.dat data/00000.dat
python3 compare.py data_sequential/00075.dat data/00075.dat
rm -rf data_sequential
compare/%: data
python3 compare.py data_sequential/$(shell printf "%05d" $*).dat data/$(shell printf "%05d" $*).dat
diff/%: data
python3 plot_differences.py data_sequential/$(shell printf "%05d" $*).dat data/$(shell printf "%05d" $*).dat
check: compare/0 compare/75
clean:
-rm -fr sequential parallel data images wave.mp4
rm -rf data_sequential

View File

@@ -53,6 +53,7 @@
binutils
uv
python3Packages.numpy
python3Packages.matplotlib
];
shellHook = ''
echo welcome!