Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
German Leon
Carol-fi
Commits
97b1c215
Commit
97b1c215
authored
May 13, 2021
by
German Leon
Browse files
Muchos cambios
parent
8621c3da
Changes
30
Show whitespace changes
Inline
Side-by-side
flip_value.py
View file @
97b1c215
...
@@ -28,28 +28,74 @@ signal
...
@@ -28,28 +28,74 @@ signal
"""
"""
def
set_event
(
event
):
def
set_event_normal
(
event
):
# Accessing global vars
# Accessing global vars
global
global_logging
,
was_hit
,
bit_flip
,
bp
,
t
,
primero
global
global_logging
,
was_hit
,
bit_flip
,
bp
,
t
,
primero
if
(
isinstance
(
event
,
gdb
.
BreakpointEvent
)):
global_logging
.
info
(
"Before breakpoint"
+
str
(
time
.
clock
()
-
t
))
if
(
isinstance
(
event
,
gdb
.
SignalEvent
)):
global_logging
.
info
(
"Enviado senal a "
+
str
(
pid
))
gdb
.
events
.
stop
.
disconnect
(
set_event_normal
)
sendsignal
(
cp
.
SIGNAL_STOP
)
try
:
bp
.
enabled
=
False
# Just checking if it was hit
gdb
.
execute
(
'c'
)
if
bit_flip
.
fault_injected
is
False
:
# #os.system ("killall -2 python3")
bit_flip
.
single_event
()
elif
(
isinstance
(
event
,
gdb
.
SignalEvent
)):
global_logging
.
info
(
"BIT FLIP SET ON SIGNAL {}"
.
format
(
event
.
stop_signal
))
#global_logging.info ("Enviado senal a "+ str(pid))
#sendsignal(cp.SIGNAL_STOP)
gdb
.
events
.
stop
.
connect
(
set_event_normal
)
except
Exception
as
err
:
global_logging
.
exception
(
"EVENT DIFFERENT FROM STOP SIGNAL: {}"
.
format
(
str
(
err
)))
else
:
global_logging
.
exception
(
"EVENT DIFFERENT SignalEvent FROM STOP SIGNAL: {}"
.
format
(
isinstance
(
event
,
gdb
.
BreakpointEvent
)))
def
set_event_inst_adr
(
event
):
# Accessing global vars
global
global_logging
,
was_hit
,
bit_flip
,
bpia
,
t
,
primero
,
data_kernels
if
(
isinstance
(
event
,
gdb
.
SignalEvent
)):
try
:
try
:
# Just checking if it was hit
#Generar una direccion aleatoria a un kernel y almacenarlo en checkpointkernel
#checkpointkernel=" *0x555555c71ed0 "
gdb
.
events
.
stop
.
disconnect
(
set_event_inst_adr
)
BitFlip
.
update_data_kernels
(
data_kernels
)
# global_logging.info(BitFlip.principiokernel("lud_diagonal"))
#global_logging.info(BitFlip.principiokernel("lud_internal"))
# global_logging.info(BitFlip.principiokernel("lud_perimeter"))
# global_logging.info(BitFlip.principio2kernel("lud_diagonal"))
# global_logging.info(BitFlip.principio2kernel("lud_internal"))
# global_logging.info(BitFlip.principio2kernel("lud_perimeter"))
checkpointkernel
=
BitFlip
.
address_random
(
data_kernels
)
global_logging
.
info
(
"BREAK {}
\n
"
.
format
(
checkpointkernel
))
bpia
=
gdb
.
Breakpoint
(
checkpointkernel
)
gdb
.
events
.
stop
.
connect
(
set_event_break_instr_adr
)
except
Exception
as
err
:
global_logging
.
exception
(
"EVENT DIFFERENT FROM STOP SIGNAL: {} IN set_event_inst_adr "
.
format
(
str
(
err
)))
def
set_event_break_instr_adr
(
event
):
# Accessing global vars
global
global_logging
,
was_hit
,
bit_flip
,
bpia
,
t
,
primero
if
(
isinstance
(
event
,
gdb
.
BreakpointEvent
)):
try
:
gdb
.
events
.
stop
.
disconnect
(
set_event_break_instr_adr
)
global_logging
.
info
(
"RUN BREAK {}
\n
"
)
bpia
.
delete
()
# Just checking if it was hit
# Just checking if it was hit
if
bit_flip
.
fault_injected
is
False
:
if
bit_flip
.
fault_injected
is
False
:
bit_flip
.
single_event
()
bit_flip
.
single_event
()
global_logging
.
info
(
"BIT FLIP SET ON SIGNAL {}"
.
format
(
event
.
stop_signal
))
global_logging
.
info
(
"BIT FLIP SET ON SIGNAL {}"
.
format
(
event
.
stop_signal
))
#global_logging.info ("Enviado senal a "+ str(pid))
#global_logging.info ("Enviado senal a "+ str(pid))
sendsignal
(
cp
.
SIGNAL_STOP
)
#bpia.enabled=False
gdb
.
events
.
stop
.
connect
(
set_event_inst_adr
)
#sendsignal(cp.SIGNAL_STOP)
gdb
.
execute
(
'c'
)
except
Exception
as
err
:
except
Exception
as
err
:
global_logging
.
exception
(
"EVENT DIFFERENT FROM STOP SIGNAL: {}"
.
format
(
str
(
err
)))
global_logging
.
exception
(
"EVENT DIFFERENT FROM STOP SIGNAL: {} IN set_event_break_instr_adr"
.
format
(
str
(
err
)))
#De esta forma, si llega un event por nexti (event.stop), no realiza nada.
#De esta forma, si llega un event por nexti (event.stop), no realiza nada.
"""
"""
...
@@ -58,10 +104,11 @@ Main function
...
@@ -58,10 +104,11 @@ Main function
def
main
():
def
main
():
global
global_logging
,
register
,
injection_site
,
bits_to_flip
,
fault_model
,
was_hit
,
bit_flip
,
arg0
,
t
,
kernel
,
pid
,
bp
global
global_logging
,
register
,
injection_site
,
bits_to_flip
,
fault_model
,
was_hit
,
bit_flip
,
arg0
,
t
,
kernel
,
pid
,
bp
,
data_kernels
,
rsi
,
traza
was_hit
=
False
was_hit
=
False
indirect
=
cp
.
INDIRECT_KERNEL
pruebaDebug
=
True
# Initialize GDB to run the app
# Initialize GDB to run the app
gdb
.
execute
(
"set confirm off"
)
gdb
.
execute
(
"set confirm off"
)
gdb
.
execute
(
"set pagination off"
)
gdb
.
execute
(
"set pagination off"
)
...
@@ -79,10 +126,10 @@ def main():
...
@@ -79,10 +126,10 @@ def main():
gdb_init_strings
,
injection_site
]
=
arg0
.
split
(
'|'
)
gdb_init_strings
,
injection_site
]
=
arg0
.
split
(
'|'
)
pruebaDebug
=
(
cp
.
INJECTION_SITES
[
injection_site
]
==
cp
.
INST_OUT_V1
)
# Logging
# Logging
global_logging
=
Logging
(
log_file
=
flip_log_file
)
global_logging
=
Logging
(
log_file
=
flip_log_file
)
global_logging
.
info
(
"Starting flip_value script "
+
" called by "
+
str
(
pid
)
+
" for stop kernel "
+
str
(
kernel
));
global_logging
.
info
(
"Starting flip_value script "
+
" called by "
+
str
(
pid
)
+
" for stop kernel "
+
str
(
kernel
)
+
". This kernel has"
+
str
(
max_regs
)
+
"."
);
try
:
try
:
for
init_str
in
gdb_init_strings
.
split
(
";"
):
for
init_str
in
gdb_init_strings
.
split
(
";"
):
gdb
.
execute
(
init_str
)
gdb
.
execute
(
init_str
)
...
@@ -96,13 +143,18 @@ def main():
...
@@ -96,13 +143,18 @@ def main():
fault_model
=
int
(
fault_model
)
fault_model
=
int
(
fault_model
)
bit_flip
=
BitFlip
(
bits_to_flip
=
bits_to_flip
,
fault_model
=
fault_model
,
max_regs
=
max_regs
,
bit_flip
=
BitFlip
(
bits_to_flip
=
bits_to_flip
,
fault_model
=
fault_model
,
max_regs
=
max_regs
,
logging
=
global_logging
,
injection_site
=
cp
.
INJECTION_SITES
[
injection_site
])
logging
=
global_logging
,
injection_site
=
cp
.
INJECTION_SITES
[
injection_site
])
data_kernels
=
bit_flip
.
read_data_kernels
(
pruebaDebug
)
# Start app execution
# Start app execution
t
=
time
.
clock
();
t
=
time
.
clock
();
gdb
.
Breakpoint
(
'main'
)
gdb
.
Breakpoint
(
'main'
)
#gdb.execute("break "+kernel)
#gdb.execute("break "+kernel)
bp
=
gdb
.
Breakpoint
(
kernel
)
global_logging
.
info
(
"Put Break "
+
str
(
time
.
clock
()
-
t
))
global_logging
.
info
(
"Put Break "
+
kernel
+
" "
+
str
(
time
.
clock
()
-
t
))
gdb
.
execute
(
"r"
)
gdb
.
execute
(
"r"
)
try
:
try
:
...
@@ -116,8 +168,26 @@ def main():
...
@@ -116,8 +168,26 @@ def main():
fp
.
write
(
pid_bench
)
fp
.
write
(
pid_bench
)
fp
.
close
()
fp
.
close
()
# Connecting to a stop signal event
# Connecting to a stop signal event
if
indirect
:
print
(
"Indirecto"
)
gdb
.
execute
(
"set cuda break_on_launch application"
)
else
:
bp
=
gdb
.
Breakpoint
(
kernel
)
gdb
.
execute
(
'c'
)
#bp.enabled=False
if
indirect
:
gdb
.
execute
(
"set cuda break_on_launch none"
)
gdb
.
events
.
stop
.
connect
(
set_event_inst_adr
)
else
:
bp
.
delete
()
gdb
.
events
.
stop
.
connect
(
set_event_normal
)
global_logging
.
info
(
"Before breakpoint"
+
str
(
time
.
clock
()
-
t
))
global_logging
.
info
(
"Enviado senal a "
+
str
(
pid
))
sendsignal
(
cp
.
SIGNAL_STOP
)
gdb
.
execute
(
'c'
)
gdb
.
events
.
stop
.
connect
(
set_event
)
print
(
"4"
)
print
(
"4"
)
i
=
0
i
=
0
try
:
try
:
...
...
pr
ueba
.py
→
pr
ofile_trace_deep
.py
100644 → 100755
View file @
97b1c215
...
@@ -2,8 +2,11 @@ import os
...
@@ -2,8 +2,11 @@ import os
import
re
import
re
import
gdb
import
gdb
import
time
import
time
import
signal
import
common_functions
as
cf
import
common_functions
as
cf
from
classes.BitFlip
import
BitFlip
from
classes.Logging
import
Logging
import
common_parameters
as
cp
def
exit_handler
(
event
):
def
exit_handler
(
event
):
global
nosalir
global
nosalir
nosalir
=
False
nosalir
=
False
...
@@ -20,26 +23,6 @@ def exit_handler(event):
...
@@ -20,26 +23,6 @@ def exit_handler(event):
Handler that will put a breakpoint on the kernel after
Handler that will put a breakpoint on the kernel after
signal
signal
"""
"""
def
handler
(
signum
,
frame
):
global
pid
,
pillo
,
t0
print
(
"handler:+++++++++++========================++++++++++++"
)
#print ("+++++++++++========================++++++++++++")
#gdb.execute("nexti")
settimeslice
()
pillo
=
time
.
time
()
-
t0
os
.
kill
(
os
.
getpid
(),
signal
.
SIGINT
)
#print ("+++++++++++========================++++++++++++")
def
setalarm
():
signal
.
signal
(
signal
.
SIGALRM
,
handler
)
#print ("No disponible")
def
settimeslice
():
#signal.alarm(1)
signal
.
setitimer
(
signal
.
ITIMER_REAL
,
1.0
,
1.0
)
#print ("No disponible")
def
pausealarm
():
signal
.
setitimer
(
signal
.
ITIMER_REAL
,
0
)
#print ("No disponible")
def
selectrd
():
def
selectrd
():
linea
=
cf
.
execute_command
(
gdb
=
gdb
,
to_execute
=
"x/1i $pc"
)
linea
=
cf
.
execute_command
(
gdb
=
gdb
,
to_execute
=
"x/1i $pc"
)
...
@@ -78,85 +61,66 @@ def selectrd():
...
@@ -78,85 +61,66 @@ def selectrd():
print
(
type
(
lista
))
print
(
type
(
lista
))
print
(
lista
)
print
(
lista
)
def
set_event
(
event
):
def
set_event
(
event
):
global
trun
,
ocurrencias
,
t
,
pillo
,
t0
,
bp
global
trun
,
ocurrencias
,
t
#pausealarm()
print
(
"===,casi,casi,casi,============="
)
if
(
isinstance
(
event
,
gdb
.
BreakpointEvent
)):
if
(
isinstance
(
event
,
gdb
.
BreakpointEvent
)):
print
(
"Bp"
)
print
(
"===,si,si,si,============="
)
t0
=
time
.
clock
()
t
=
time
.
clock
()
bp
.
enabled
=
False
ocurrencias
=
ocurrencias
+
1
ocurrencias
=
ocurrencias
+
1
#signal.setitimer(signal.ITIMER_REAL,3)
else
:
else
:
print
(
"set_event"
)
trun
=
(
time
.
clock
()
-
t
)
#signal.setitimer(signal.ITIMER_REAL,0)
trun
=
(
time
.
clock
()
-
t0
)
def
kernels
():
#signal.setitimer(signal.ITIMER_REAL,2)
data_kernels
=
BitFlip
.
read_data_kernels
()
#signal.setitimer(signal.ITIMER_REAL,0.1)
print
(
"DIct {}"
.
format
(
data_kernels
))
t
=
time
.
time
()
-
t0
BitFlip
.
update_data_kernels
(
data_kernels
)
print
(
"
\n
Pongo: "
+
str
(
t
)
+
" Pillo;"
+
str
(
pillo
)
+
"
\n
"
)
print
(
"DIct {}"
.
format
(
data_kernels
))
#settimeslice()
BitFlip
.
principiokernel
(
"lud_diagonal"
)
#gdb.execute("c")
BitFlip
.
principiokernel
(
"lud_internal"
)
BitFlip
.
principiokernel
(
"lud_perimeter"
)
BitFlip
.
principio2kernel
(
"lud_diagonal"
)
BitFlip
.
principio2kernel
(
"lud_internal"
)
BitFlip
.
principio2kernel
(
"lud_perimeter"
)
r
=
BitFlip
.
kernelnow
()
print
(
r
)
#[p,f]=BitFlip.rangekernel("lud_diagonal")
#print (p,f)
gdb
.
execute
(
'disas lud_diagonal'
)
gdb
.
execute
(
'disas lud_internal'
)
gdb
.
execute
(
'disas lud_perimeter'
)
def
main
():
def
main
():
global
ocurrencias
,
t
,
nosalir
,
trun
,
pid
,
t0
,
pillo
,
bp
global
ocurrencias
,
t
,
nosalir
,
trun
,
bf
was_hit
=
False
was_hit
=
False
#pid=os.getpid()
ocurrencias
=
0
ocurrencias
=
0
# Initialize GDB to run the appset pagination off
# Initialize GDB to run the appset pagination off
gdb
.
execute
(
'catch signal SIGALRM'
)
gdb
.
execute
(
"set confirm off"
)
gdb
.
execute
(
"set confirm off"
)
gdb
.
execute
(
"set pagination off"
)
gdb
.
execute
(
"set pagination off"
)
gdb
.
execute
(
"set target-async off"
)
gdb
.
execute
(
"set target-async off"
)
gdb
.
execute
(
"set non-stop off"
)
gdb
.
execute
(
"set non-stop off"
)
setalarm
()
settimeslice
()
# Connecting to a exit handler event
# Connecting to a exit handler event
gdb
.
events
.
exited
.
connect
(
exit_handler
)
gdb
.
events
.
exited
.
connect
(
exit_handler
)
# Connecting to a stop signal event
# Connecting to a stop signal event
gdb
.
events
.
stop
.
connect
(
set_event
)
gdb
.
events
.
stop
.
connect
(
set_event
)
#gdb.events.cont.connect(set_event_cont)
#gdb.execute("file ~/rodinia_3.1/cuda/lud/cuda/lud_cuda")
gdb
.
execute
(
"file codes/lud/cuda/lud_cuda"
)
#gdb.execute("set arg -s 10000")
gdb
.
execute
(
"set arg -s 10000"
)
#gdb.execute("break lud_cuda")
gdb
.
execute
(
"set cuda break_on_launch application"
)
t0
=
time
.
time
()
print
(
t0
)
pillo
=
t0
gdb
.
execute
(
"file codes/mmElem/matrixMul"
)
gdb
.
execute
(
"set arg -wA=16384 -hA=16384 -hB=16384 -wB=16384"
)
#gdb.execute("set cuda break_on_launch application")
bm
=
gdb
.
Breakpoint
(
'main'
)
bp
=
gdb
.
Breakpoint
(
'matrixMulCUDA'
)
#gdb.execute('handle SIGALRM stop')
#gdb.execute('handle SIGALRM ignore')
#gdb.execute('handle SIGALRM')
#gdb.execute('catch signal SIGALRM')
gdb
.
execute
(
'r'
)
gdb
.
execute
(
'r'
)
#selectrd()
a
=
gdb
.
execute
(
"info proc"
,
to_string
=
True
).
splitlines
()[
0
].
split
(
' '
)[
1
]
nosalir
=
True
print
(
"Process:{}"
.
format
(
a
))
gdb
.
events
.
stop
.
disconnect
(
set_event
)
print
(
"1"
)
g
=
Logging
(
log_file
=
"ludv2.conf"
)
gdb
.
execute
(
"c"
)
# Force a create un object, don't care arguments
print
(
"1"
)
bf
=
BitFlip
(
bits_to_flip
=
27
,
fault_model
=
0
,
max_regs
=
18
,
gdb
.
execute
(
"c"
)
logging
=
g
,
injection_site
=
cp
.
INJECTION_SITES
[
"INST_OUT"
])
gdb
.
execute
(
"c"
)
gdb
.
execute
(
"c"
)
bf
.
analisis
([
"lud_diagonal"
,
"lud_perimeter"
,
"lud_internal"
])
pausealarm
()
gdb
.
execute
(
"c"
)
gdb
.
execute
(
"c"
)
#nosalir=True
# while nosalir:
# gdb.execute("finish")
# gdb.execute("c")"
print
(
" Ocurrencias "
+
str
(
ocurrencias
)
+
" Tiempo acumulado de ejecucciones "
+
str
(
trun
))
f
=
open
(
"tmpxxx_return_profiler.conf"
,
"w"
)
f
.
write
(
"Ocurrencias ="
+
str
(
ocurrencias
)
+
"
\n
Tiempo "
+
str
(
trun
)
+
"
\n
"
)
f
.
close
()
main
()
main
()
...
...
profiler.py
View file @
97b1c215
import
gdb
import
gdb
import
os
import
time
import
time
import
re
import
re
import
sys
import
sys
import
copy
import
common_functions
as
cf
import
common_functions
as
cf
from
classes.BitFlip
import
BitFlip
from
classes.BitFlip
import
BitFlip
...
@@ -60,35 +61,56 @@ def main():
...
@@ -60,35 +61,56 @@ def main():
# gdb_init_strings = str(os.environ["CAROL_FI_INFO"])
# gdb_init_strings = str(os.environ["CAROL_FI_INFO"])
gdb_init_strings
=
arg0
gdb_init_strings
=
arg0
cadena
=
gdb_init_strings
.
split
(
";"
,
3
)
cadena
=
gdb_init_strings
.
split
(
";"
,
4
)
print
>>
sys
.
stderr
,
(
cadena
[
0
])
#,"-",
cadena[
0
],"
-
",cadena[
1
],"
-
", cadena[
2
],"
#".
cadena[
3
])
print
>>
sys
.
stderr
,
(
gdb_init_strings
+
"---0:"
+
cadena
[
0
]
+
"
\n
-1:"
+
cadena
[
1
],
"
\n
-2:
"
,
cadena
[
2
],
"
\n
-3:
"
,
cadena
[
3
],
"
\n
-4:"
,
cadena
[
4
])
section
=
cadena
[
0
]
==
"True"
section
=
cadena
[
0
]
==
"True"
onlycount
=
cadena
[
1
]
==
"True"
onlycount
=
cadena
[
1
]
==
"True"
#print ("B "+section+"ke "+kernel_end+" ....")
#print ("B "+section+"ke "+kernel_end+" ....")
#print (cadena[2].split(";"))
print
(
cadena
[
3
].
split
(
";"
))
for
init_str
in
cadena
[
3
].
split
(
";"
):
print
(
"INIT_str {}"
.
format
(
cadena
[
4
].
split
(
";"
)))
for
init_str
in
cadena
[
4
].
split
(
";"
):
gdb
.
execute
(
init_str
)
gdb
.
execute
(
init_str
)
maxi
=
0.
maxi
=
0.
gdb
.
execute
(
"r"
)
gdb
.
execute
(
"r"
)
if
(
onlycount
):
if
(
onlycount
):
ks
=
cadena
[
2
].
split
(
","
)
ks
=
cadena
[
2
].
split
(
","
)
print
(
ks
)
#print >>sys.stderr, ("=====================Kernels ")
#print ("=====================Kernels {}".format(cadena[2]))
listreg
=
set
()
listreg
=
set
()
f
=
open
(
"tmpxxx/kernels.conf"
,
"w"
)
f
.
write
(
"[Kernels]
\n
"
)
print
(
cadena
[
2
])
f
.
write
(
"Nombres={}
\n
"
.
format
(
cadena
[
2
]))
f
.
write
(
"trace={}
\n
"
.
format
(
cadena
[
3
]))
for
x
in
ks
:
for
x
in
ks
:
listreg
.
update
(
BitFlip
.
numreg
(
x
)
)
f
.
write
(
"[{}]
\n
"
.
format
(
x
))
nm
=
BitFlip
.
numreg
(
x
)
listreg
.
update
(
nm
)
f
.
write
(
"Registro={}
\n
"
.
format
(
len
(
nm
)))
f
.
write
(
"Principio={}
\n
"
.
format
(
BitFlip
.
principiokernel
(
x
)))
f
.
write
(
"Tamano={}
\n
"
.
format
(
BitFlip
.
lenkernel
(
x
)))
f
.
close
()
print
(
listreg
)
print
(
listreg
)
maxi
=
len
(
listreg
)
maxi
=
len
(
listreg
)
print
(
"Maximo..."
+
str
(
maxi
)
+
" o "
+
str
(
max
([
int
(
x
)
for
x
in
listreg
]
)
))
print
(
"Maximo..."
+
str
(
maxi
)
+
" o "
+
str
(
max
([
int
(
x
)
for
x
in
listreg
]
)
))
#os.system("chmod 444 tmpxxx/kernels.conf")
else
:
else
:
if
(
section
):
if
(
section
):
print
(
"Break & continue"
);
gdb
.
execute
(
"c"
)
gdb
.
execute
(
"c"
)
else
:
print
(
"Finish........."
);
if
(
len
(
cadena
[
2
])
==
0
):
gdb
.
execute
(
"quit"
)
else
:
else
:
gdb
.
execute
(
"finish"
)
gdb
.
execute
(
"finish"
)
f
=
open
(
"tmpxxx
_
return_profiler.conf"
,
"w"
)
f
=
open
(
"tmpxxx
/
return_profiler.conf"
,
"w"
)
f
.
write
(
"[DEFAULT]
\n
Ocurrencias = "
+
str
(
ocurrencias
)
+
"
\n
Tiempo = "
+
str
(
trun
)
+
"
\n
"
)
f
.
write
(
"[DEFAULT]
\n
Ocurrencias = "
+
str
(
ocurrencias
)
+
"
\n
Tiempo = "
+
str
(
trun
)
+
"
\n
"
)
f
.
close
()
f
.
close
()
sys
.
exit
(
maxi
)
sys
.
exit
(
maxi
)
...
...
res-ind-simple.sh
View file @
97b1c215
...
@@ -6,17 +6,30 @@ hang=$[$fi_field + 1]
...
@@ -6,17 +6,30 @@ hang=$[$fi_field + 1]
crash
=
$[$hang
+ 1]
crash
=
$[$hang
+ 1]
masked
=
$[$crash
+1
]
masked
=
$[$crash
+1
]
sdc
=
$[$masked
+1
]
sdc
=
$[$masked
+1
]
for
i
in
$fi_field
$hang
$crash
$masked
$sdc
for
i
in
$fi_field
$crash
$sdc
do
do
cab
=
$(
cut
-d
,
-f
$i
$1
|head
-1
)
cab
=
$(
cut
-d
,
-f
$i
$1
|head
-1
)
trues
=
$(
cut
-d
,
-f
$i
$1
|grep
"True"
|wc
-l
)
trues
=
$(
cut
-d
,
-f
$i
$1
|grep
"True"
|wc
-l
)
campos[
$i
]=
$trues
echo
$cab
"="
${
campos
[
$i
]
}
done
for
i
in
$masked
do
cab
=
$(
cut
-d
,
-f
$i
$1
|head
-1
)
trues
=
$(
cut
-d
,
-f
$hang
,
$i
$1
|grep
"False,True"
|wc
-l
)
echo
$cab
"="
$trues
echo
$cab
"="
$trues
campos[
$i
]=
$trues
campos[
$i
]=
$trues
done
done
campos[
$masked
]=
$[
campos[
$masked
]
-campos
[
$hang
]]
cab
=
$(
cut
-d
,
-f
$hang
$1
|head
-1
)
trues
=
$(
cut
-d
,
-f
$hang
,
$crash
$1
|grep
"True,False"
|wc
-l
)
echo
$cab
"="
$trues
campos[
$hang
]=
$trues
for
i
in
$hang
$crash
$masked
$sdc
for
i
in
$hang
$crash
$masked
$sdc
do
do
tantoporcien
=
$(
printf
%.3f
"
$((
campos[
$i
]
*
10
**
5
/
campos[
$fi_field
]
))
e-3"
)
tantoporcien
=
$(
printf
%.3f
"
$((
campos[
$i
]
*
10
**
5
/
${
campos
[
$fi_field
]
}
))
e-3"
)
cab
=
$(
cut
-d
,
-f
$i
$1
|head
-1
)
cab
=
$(
cut
-d
,
-f
$i
$1
|head
-1
)
echo
$cab
"(%)="
$tantoporcien
echo
$cab
"(%)="
$tantoporcien
done
done
...
...
test.sh
View file @
97b1c215
...
@@ -18,9 +18,9 @@ date >> tiempos
...
@@ -18,9 +18,9 @@ date >> tiempos
echo
"Step 2 - Running
${
FAULTS
}
on
${
CONFFILE
}
"
echo
"Step 2 - Running
${
FAULTS
}
on
${
CONFFILE
}
"
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
while
test
-f
"tmpxxx
_
num_rounds.conf"
while
test
-f
"tmpxxx
/
num_rounds.conf"
do
do
cat
tmpxxx
_
num_rounds.conf
>>
tandas
cat
tmpxxx
/
num_rounds.conf
>>
tmpxxx/
tandas
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
echo
"==============================="
echo
"==============================="
done
done
...
...
test_hotspot.sh
View file @
97b1c215
...
@@ -19,9 +19,9 @@ date >> tiempos
...
@@ -19,9 +19,9 @@ date >> tiempos
echo
"Step 2 - Running
${
FAULTS
}
on
${
CONFFILE
}
"
echo
"Step 2 - Running
${
FAULTS
}
on
${
CONFFILE
}
"
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
while
test
-f
"tmpxxx
_
num_rounds.conf"
while
test
-f
"tmpxxx
/
num_rounds.conf"
do
do
cat
tmpxxx
_
num_rounds.conf
>>
tandas
cat
tmpxxx
/
num_rounds.conf
>>
tmpxxx/
tandas
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
echo
"==============================="
echo
"==============================="
done
done
...
...
test_mult.sh
View file @
97b1c215
...
@@ -20,9 +20,9 @@ echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
...
@@ -20,9 +20,9 @@ echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
echo
$?
echo
$?
while
test
-f
"tmpxxx
_
num_rounds.conf"
while
test
-f
"tmpxxx
/
num_rounds.conf"
do
do
cat
tmpxxx
_
num_rounds.conf
>>
tandas
cat
tmpxxx
/
num_rounds.conf
>>
tmpxxx/
tandas
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
echo
"==============================="
echo
"==============================="
done
done
...
...
test_mult_mBlock.sh
View file @
97b1c215
...
@@ -18,9 +18,9 @@ echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
...
@@ -18,9 +18,9 @@ echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
echo
$?
echo
$?
while
test
-f
"tmpxxx
_
num_rounds.conf"
while
test
-f
"tmpxxx
/
num_rounds.conf"
do
do
cat
tmpxxx
_
num_rounds.conf
>>
tandas
cat
tmpxxx
/
num_rounds.conf
>>
tmpxxx/
tandas
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
echo
"==============================="
echo
"==============================="
done
done
...
...
test_nw.sh
View file @
97b1c215
...
@@ -20,9 +20,9 @@ echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
...
@@ -20,9 +20,9 @@ echo "Step 2 - Running ${FAULTS} on ${CONFFILE}"
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
while
test
-f
"tmpxxx
_
num_rounds.conf"
while
test
-f
"tmpxxx
/
num_rounds.conf"
do
do
cat
tmpxxx
_
num_rounds.conf
>>
tandas
cat
tmpxxx
/
num_rounds.conf
>>
tmpxxx/
tandas
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
echo
"==============================="
echo
"==============================="
done
done
...
...
test_rodinia.sh
View file @
97b1c215
...
@@ -5,21 +5,21 @@ set -e
...
@@ -5,21 +5,21 @@ set -e
#uncomment to a more verbose script
#uncomment to a more verbose script
#set -x
#set -x
DIR_RODINIA
=
codes
DIR_RODINIA
=
codes
FAULTS
=
1
000
FAULTS
=
3
000
#CONFFILE=codes/matrixMul/matrixmul_16K.conf
#CONFFILE=codes/matrixMul/matrixmul_16K.conf
#CONFFILE=codes/mmElem/matrixmul_16K.conf
#CONFFILE=codes/mmElem/matrixmul_16K.conf
#CONFFILE=codes/lavaMD/lavaMD.conf
#CONFFILE=codes/lavaMD/lavaMD.conf
CONFFILE
=
$DIR_RODINIA
/lud/lud.conf
CONFFILE
=
$DIR_RODINIA
/lud/lud
2k
.conf
echo
"Step 1 - Profiling the application for fault injection"
echo
"Step 1 - Profiling the application for fault injection"
./app_profiler.py
-c
${
CONFFILE
}
$*
./app_profiler.py
-c
${
CONFFILE
}
$*
echo
"Step 2 - Running
${
FAULTS
}
on
${
CONFFILE
}
"
echo
"Step 2 - Running
${
FAULTS
}
on
${
CONFFILE
}
"
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
while
test
-f
"tmpxxx
_
num_rounds.conf"
while
test
-f
"
./
tmpxxx
/
num_rounds.conf"
do
do
cat
tmpxxx
_
num_rounds.conf
>>
tandas
cat
tmpxxx
/
num_rounds.conf
>>
tmpxxx/
tandas
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
./fault_injector.py
-i
${
FAULTS
}
-c
${
CONFFILE
}
-n
1
$*
echo
"==============================="
echo
"==============================="
done
done
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment