Commit e4ae2422 authored by German Leon's avatar German Leon
Browse files

Initial commit

parents
#cut -d, -f 3,4,9,10,11,12,13,14,15 fi_lavaMD_single_bit_RF.csv
fi_field=10
hang=$[$fi_field + 1]
crash=$[$hang + 1]
masked=$[$crash +1 ]
sdc=$[$masked +1 ]
for i in $fi_field $hang $crash $masked $sdc
do
cab=$(cut -d, -f$i $1|head -1)
trues=$(cut -d, -f$i $1|grep "True"|wc -l)
echo $cab "=" $trues
done
excep=$[$sdc +1]
for i in $(seq 1 1 15)
do
ib=$(echo "_"$i$)
n=$(cut -f $excep -d, $1 | sed "s/CUDA_EXCEPTION_1 CUDA_EXCEPTION_1/CUDA_EXCEPTION_1/"| sed "s/SIGKILL CUDA_EXCEPTION//"|grep $ib | wc -l )
echo "CUDA_EXCEPTION_"$i"="$n
done
for i in $(ls $1 | grep -v -E resumen_* )
do
echo "res-new-ind.sh" $1/$i ">" $1"/resumen_"$i
./res-new-ind.sh $1/$i > $1/resumen_$i
done
cd $1
fi=$(find failed-injection -name "carol_fi_inj_bench_output*"| wc -l)
crash=$(find masked -name "carol_fi_inj_bench_output*"| wc -l)
hangs=$(find hangs -name "carol_fi_inj_bench_output*"| wc -l)
noexcep=$(find sdcs -name "carol_fi_inj_bench_output*"| wc -l)
cd sdcs
masked=$(grep -R PASS| grep carol| wc -l)
sdcs=$(grep -R FAIL| grep carol| wc -l)
crash_nodoc=$[ $noexcep - $masked - $sdcs]
crash=$[ $crash + $crash_nodoc ]
echo "Program;fallos-injeccion;Crash;(Crash especiales);Hang; Sin excepciones;SDC; Masked"> ../results.csv
echo $1";"$fi";"$crash";"$crash_nodoc";"$hangs";"$noexcep";"$sdcs";"$masked >> ../results.csv
echo "Program="$1
echo "Fallos-injeccion="$fi
echo "Crash="$crash
echo "Noexcep="$noexec" No ha habido ningun excepcion, incluido masked y sdc"
echo "Crash especiales="$crash_nodoc" noexcep-masked-sdcs, estan incluidos en crash"
echo "Hangs="$hangs
echo "SDC="$sdcs
echo "Masked="$masked
cd $1
fi=$(find failed-injection -name "carol_fi_inj_bench_output*"| wc -l)
crash=$(find masked -name "carol_fi_inj_bench_output*"| wc -l)
hangs=$(find hangs -name "carol_fi_inj_bench_output*"| wc -l)
noexcep=$(find sdcs -name "carol_fi_inj_bench_output*"| wc -l)
cd sdcs
masked=$(grep -R PASS| grep carol| wc -l)
sdcs=$(grep -R FAIL| grep carol| wc -l)
crash_nodoc=$[ $noexcep - $masked - $sdcs]
crash=$[ $crash + $crash_nodoc ]
echo $1";"$fi";"$crash";"$crash_nodoc";"$hangs";"$noexcep";"$masked";"$sdcs
#!/bin/bash
set -e
#uncomment to a more verbose script
#set -x
FAULTS=1000
#CONFFILE=codes/matrixMul/matrixmul_16K.conf
#CONFFILE=codes/mmElem/matrixmul_16K.conf
CONFFILE=codes/lavaMD/lavaMD.conf
echo "Step 1 - Profiling the application for fault injection"
./app_profiler.py -c ${CONFFILE} $*
echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
./fault_injector.py -i ${FAULTS} -c ${CONFFILE} -n 1 $*
echo "Fault injection finished"
exit 0
#!/bin/bash
set -e
#uncomment to a more verbose script
#set -x
DIR_RODINIA=$HOME/rodinia_3.1/cuda
FAULTS=1000
#CONFFILE=codes/matrixMul/matrixmul_16K.conf
#CONFFILE=codes/mmElem/matrixmul_16K.conf
#CONFFILE=codes/lavaMD/lavaMD.conf
CONFFILE=$DIR_RODINIA/hotspot/hotspot.conf
echo "Step 1 - Profiling the application for fault injection"
./app_profiler.py -c ${CONFFILE} $*
echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
./fault_injector.py -i ${FAULTS} -c ${CONFFILE} -n 1 $*
echo "Fault injection finished"
exit 0
#!/bin/bash
set -e
#uncomment to a more verbose script
#set -x
FAULTS=1000
#CONFFILE=codes/matrixMul/matrixmul_16K.conf
CONFFILE=codes/mmElem/matrixmul_16K.conf
#CONFFILE=codes/lavaMD/lavaMD.conf
echo "Step 1 - Profiling the application for fault injection"
./app_profiler.py -c ${CONFFILE} $*
echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
./fault_injector.py -i ${FAULTS} -c ${CONFFILE} -n 1 $*
echo "Fault injection finished"
exit 0
#!/bin/bash
set -e
#uncomment to a more verbose script
#set -x
FAULTS=1000
CONFFILE=codes/matrixMul/matrixmul_16K.conf
#CONFFILE=codes/mmElem/matrixmul_16K.conf
#CONFFILE=codes/lavaMD/lavaMD.conf
echo "Step 1 - Profiling the application for fault injection"
./app_profiler.py -c ${CONFFILE} $*
echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
./fault_injector.py -i ${FAULTS} -c ${CONFFILE} -n 1 $*
echo "Fault injection finished"
exit 0
#!/bin/bash
set -e
#uncomment to a more verbose script
#set -x
DIR_RODINIA=$HOME/rodinia_3.1/cuda
FAULTS=1000
#CONFFILE=codes/matrixMul/matrixmul_16K.conf
#CONFFILE=codes/mmElem/matrixmul_16K.conf
#CONFFILE=codes/lavaMD/lavaMD.conf
CONFFILE=$DIR_RODINIA/nw/nw.conf
echo "Step 1 - Profiling the application for fault injection"
./app_profiler.py -c ${CONFFILE} $*
echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
./fault_injector.py -i ${FAULTS} -c ${CONFFILE} -n 1 $*
echo "Fault injection finished"
exit 0
#!/bin/bash
set -e
#uncomment to a more verbose script
#set -x
DIR_RODINIA=$HOME/rodinia_3.1/cuda
FAULTS=1000
#CONFFILE=codes/matrixMul/matrixmul_16K.conf
#CONFFILE=codes/mmElem/matrixmul_16K.conf
#CONFFILE=codes/lavaMD/lavaMD.conf
CONFFILE=$DIR_RODINIA/lud/lud.conf
echo "Step 1 - Profiling the application for fault injection"
./app_profiler.py -c ${CONFFILE} $*
echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
./fault_injector.py -i ${FAULTS} -c ${CONFFILE} -n 1 $*
echo "Fault injection finished"
exit 0
"""
[THIS FUNCTION CAN BE EDITED IF DESIRED]
User defined function
this function must return an empty or not.
The string will be appended in the last column of summary CSV file
the column will have 'user_defined' as header
if there isn't a return value the column will be None,
otherwise it will contain the returned values for each injection
"""
import re
def user_defined_function(injection_output_path):
# This is a temporary example for carol-fi-codes suite
# it will search for a LOGFILENAME int the benchmark output if it finds
# then the desired pattern will be returned
with open(injection_output_path, "r") as fp:
for line in fp.readlines():
m = re.match(r'LOGFILENAME:.*/(\S+).*', line)
if m:
return m.group(1)
Supports Markdown
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