-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: added script to the CI step for comparing parallel run results
- Loading branch information
1 parent
fbad594
commit 864a176
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#! /bin/bash | ||
|
||
for processes in 2 4 8; do | ||
if [ -s "diffs" ]; then | ||
rm diffs | ||
fi | ||
|
||
for file in $(ls bin_1/fromfile_sol.zarr/); do | ||
filename=$(ls bin_1/fromfile_sol.zarr/$file) | ||
hexdump bin_1/fromfile_sol.zarr/$file/$filename > original | ||
hexdump bin_${processes}/fromfile_sol.zarr/$file/$filename > new | ||
diff original new >> diffs | ||
done; | ||
rm new original | ||
|
||
diff bin_1/fromfile_sol.zarr/.zattrs bin_${processes}/fromfile_sol.zarr/.zattrs >> diffs | ||
diff bin_1/fromfile_sol.zarr/.zgroup bin_${processes}/fromfile_sol.zarr/.zgroup >> diffs | ||
for file in $(ls bin_1/fromfile_sol.zarr/); do | ||
filename=$(ls -la bin_1/fromfile_sol.zarr/$file) | ||
diff bin_1/fromfile_sol.zarr/$file/.zattrs bin_${processes}/fromfile_sol.zarr/$file/.zattrs >> diffs | ||
diff bin_1/fromfile_sol.zarr/$file/.zarray bin_${processes}/fromfile_sol.zarr/$file/.zarray >> diffs | ||
done; | ||
|
||
if [ -s "diffs" ]; then | ||
echo "Run with ${processes} processes has different results than sequential run" | ||
exit 1; | ||
fi | ||
done; | ||
exit 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters