Commit 70ee4f6d authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Use configurable output file name in convergence tests

parent 67c0b0af
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ dielec_real="2.6015926E+00" # real part of dielectric function
dielec_imag="3.8710688E-04" # imaginary part of dielectric function
radius=$1 # radius is read from command line
ompthreads="" # OMP threads to use (default is "1,NPROC")
outputfile="convergence.csv"

# Script execution starts here
if [ "x${ompthreads}" = "x" ]; then
@@ -15,7 +16,7 @@ if [ "x${ompthreads}" = "x" ]; then
    ompthreads="1,${NPROC}" # OMP threads settings
fi
li=${l_start}
echo "#Wavelength,ScaSec,AbsSec,ExtSec,LI" > convergence.csv
echo "#Wavelength,ScaSec,AbsSec,ExtSec,LM" > ${outputfile}
while [ $((li)) -le ${l_end} ]
do
    fold_index=$(python -c "print('{0:02d}'.format($li))")
@@ -46,7 +47,7 @@ EOF
    /home/lamura/Programming/gits/np_tmcode/src/scripts/parse_output.py --app=SPH --in c_OSPH --out convergence
    cd ..
    str_line=$(tail -1 ${folder}/convergence_ics.csv)
    echo "${str_line},${fold_index}" >> convergence.csv
    echo "${str_line},${fold_index}" >> ${outputfile}
    rm -rf ${folder}
    li=$((li+1))
done