Commit 43146375 authored by Sergey Kireev's avatar Sergey Kireev
Browse files

gst script added

parent c7e5faaa
#!/bin/bash
source ./do_parameters.sh
min_group_size=10
fromdir="dat_${nt}"
target="gst.txt"
# Check if executable is present
[ -x $executable ] || { echo "Error: executable file '${executable}' not found!"; exit; }
# Check if source directory is present
[ ! -d ${fromdir} ] && { echo "Directory ${fromdir} does not exist!" ; exit ; }
# Check if target is present
[ -f ${target} ] && { echo "Terget file ${target} already exist!" ; exit ; }
init_iteration
while next_iteration; do
name=$(get_name)
source=$fromdir/${name}${suffix}
tmpfile=`mktemp -u -p.`
#echo ${name}
# Run simulation
${executable} -$cell -nsize $nsize -nx $nx -ny $ny -it $nt -nt 0 -load $source \
-en $en -enl $enl -el $el -kt $kt -mu $mu -g $pgroup \
-evap $evap -cond $cond -ipn $ipn -ipl $ipl -ipe $ipe \
-gstlog $tmpfile -gstmin $min_group_size \
-short ${nle_args} | tee ${name}.txt
# check exit code
[ ${PIPESTATUS[0]} -eq 0 ] || { rm -r $name ; exit ; }
post_run $name
line=`grep "^$nt" $tmpfile`
echo "$en $enl $el $line" >> $target
rm ${name}.txt
rm $tmpfile
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment