Skip to content

Commit

Permalink
update of the echo messages
Browse files Browse the repository at this point in the history
  • Loading branch information
kbat committed Nov 28, 2024
1 parent fa3df85 commit 5dd213b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mctools/phits/phits-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ else
fi

if ! grep -Eq "^\s*rseed\s*=\s*0" broomstick.inp; then
echo "ERROR: The 'rseed = 0' string is not found in $inp"
echo "[phits-run] ERROR: The 'rseed = 0' string is not found in $inp"
usage
fi

for ((i=1; i<=$njobs; i++)); do
d=$prefix$i
if [ -d $d ]; then
echo "ERROR: $d folder already exists"
if [ -e $d ]; then
echo "[phits-run] ERROR: $d folder already exists"
exit 2
else
mkdir -p $d
Expand All @@ -48,11 +48,11 @@ for ((i=1; i<=$njobs; i++)); do
done

if which parallel > /dev/null; then
echo parallel "cd {} && phits.sh phits.inp" ::: $prefix*
parallel "cd {} && phits.sh phits.inp" ::: $prefix*
else
echo "[phits-run] INFO: Consider using the GNU Parallel script to optimise scheduling PHITS runs to the cores"
h=$(pwd)
for d in $prefix*; do
echo $d
cd $d
phits.sh phits.inp &
cd $h
Expand Down

0 comments on commit 5dd213b

Please sign in to comment.