-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3072 from pnorbert/deactivate-script
make adios2_deactivate_bp work with bp4 and bp5 formats.
- Loading branch information
Showing
3 changed files
with
33 additions
and
23 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
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,32 @@ | ||
#!/bin/bash | ||
|
||
FNAME=$1 | ||
if [ "x$FNAME" == "x" ]; then | ||
echo "Missing BP data set name" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -d $FNAME ]; then | ||
echo "Not a valid BP output: $FNAME" | ||
echo "BP data set should be a directory" | ||
exit 2 | ||
fi | ||
|
||
if [ ! -f $FNAME/md.idx ]; then | ||
echo "Not a valid BP output: $FNAME" | ||
echo "Missing $FNAME/md.idx file" | ||
exit 3 | ||
fi | ||
|
||
# Get BP version | ||
v=`od -An -j 37 -N 1 -tu1 $FNAME/md.idx` | ||
|
||
if (( v == 4 )); then | ||
printf '\x00' | dd of=$FNAME/md.idx bs=1 seek=38 conv=notrunc | ||
elif (( v == 5 )); then | ||
printf '\x00' | dd of=$FNAME/md.idx bs=1 seek=39 conv=notrunc | ||
else | ||
echo "This BP version is not supported by this script. Version found: $v" | ||
fi | ||
|
||
|
This file was deleted.
Oops, something went wrong.