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

Cambiando res.sh

parent 07b436fd
#cut -d, -f 3,4,9,10,11,12,13,14,15 fi_lavaMD_single_bit_RF.csv
fi_field=10
model=$[$fi_field - 1]
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
campos[$i]=$trues
done
campos[$masked]=$[campos[$masked]-campos[$hang]]
for i in $hang $crash $masked $sdc
do
tantoporcien=$(printf %.3f "$(( campos[$i] * 10**5/campos[$fi_field] ))e-3")
cab=$(cut -d, -f$i $1|head -1)
echo $cab"(%)="$tantoporcien
done
interrupciones=$(grep unique $1| wc -l)
interrupciones=$[ $interrupciones -1]
echo "Hang-restart-fi="$interrupciones
echo "Model="$(cut -d, -f$model $1|head -2|tail -1)
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 )
if [ "$n" -gt 0 ];
then
echo "CUDA_EXCEPTION_"$i"="$n
fi
done
#cut -d, -f 3,4,9,10,11,12,13,14,15 fi_lavaMD_single_bit_RF.csv
./res-ind-simple.sh $1
reg=2
num_reg=0;
for i in $(seq 0 1 255)
do
ib=$(echo "R"$i)
sib=$(echo "R"$i",")
n=$(cut -f $reg -d, $1|grep -w $ib|wc -l)
if [ "$n" -gt 0 ];
then
echo $ib"="$n
num_reg=$[$num_reg + 1]
fi
done
echo "Registros usados="$num_reg
for i in $(seq 0 1 255)
do
ib=$(echo "R"$i)
sib=$(echo "R"$i",")
n=$(cut -f $reg -d, $1|grep -w $ib|wc -l)
if [ "$n" -gt 0 ];
then
echo "============"$ib"========="
head -1 $1 >filetempreg.csv
grep $sib $1 >> filetempreg.csv
./res-ind-simple.sh filetempreg.csv
fi
done
cab="Experimento"
for j in "fault_successful" "Model" "hang(%)" "crash(%)" "masked(%)" "sdc(%)" "Hang-restart-fi" "Registros"
do
cab=$(echo $cab";"$j)
done
echo $cab > $1/resumen_total.csv
for i in $(ls $1 | grep -v -E resumen_* )
do
echo "res-new-ind.sh" $1/$i ">" $1"/resumen_"$i
./res-ind.sh $1/$i > $1/resumen_$i
row=$(echo $i)
for j in "fault_successful" "Model" "hang(%)" "crash(%)" "masked(%)" "sdc(%)" "Hang-restart-fi" "Registros"
do
campo=$(grep $j $1/resumen_$i|cut -d= -f2|head -1)
row=$(echo $row";"$campo)
done
echo $row >> $1/resumen_total.csv
done
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