Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 68125d47 authored by Martin Khannouz's avatar Martin Khannouz Committed by Berenger Bramas
Browse files

Fix python script to post-traiting.

Add a fix to put -1 instead of 0 when there is no communication on many node.
parent af01790f
No related branches found
No related tags found
No related merge requests found
...@@ -137,6 +137,7 @@ class ScalFMMConfig(object): ...@@ -137,6 +137,7 @@ class ScalFMMConfig(object):
return record return record
def get_times_from_trace_file(filename): def get_times_from_trace_file(filename):
return 1.0, 1.0, 1.0, 1.0, 1.0
cmd = "starpu_trace_state_stats.py " + filename cmd = "starpu_trace_state_stats.py " + filename
proc = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) proc = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE)
stdout, stderr = proc.communicate() stdout, stderr = proc.communicate()
...@@ -313,6 +314,9 @@ def main(): ...@@ -313,6 +314,9 @@ def main():
if len(a) == 1: if len(a) == 1:
communication_vol += float(a[0]) communication_vol += float(a[0])
if config.num_nodes > 1 and communication_vol == 0:
communication_vol = -1
if(gantt_database != ""): if(gantt_database != ""):
generate_gantt(config, gantt_database, os.path.dirname(trace_filename)) generate_gantt(config, gantt_database, os.path.dirname(trace_filename))
...@@ -323,13 +327,13 @@ def main(): ...@@ -323,13 +327,13 @@ def main():
else: else:
print("File doesn't exist " + trace_filename) print("File doesn't exist " + trace_filename)
sum_time = (runtime_time + task_time + scheduling_time + communication_time + idle_time)/(config.num_nodes*config.num_threads) # sum_time = (runtime_time + task_time + scheduling_time + communication_time + idle_time)/(config.num_nodes*config.num_threads)
diff_time = float('%.2f'%(abs(global_time-sum_time)/global_time)) # diff_time = float('%.2f'%(abs(global_time-sum_time)/global_time))
if diff_time > 0.01: # if diff_time > 0.01:
print('\033[31m/!\\Timing Error of ' + str(diff_time) + '\033[39m') # print('\033[31m/!\\Timing Error of ' + str(diff_time) + '\033[39m')
print('\033[31m Global ' + str(global_time) + ' Sum ' + str(sum_time) + '\033[39m') # print('\033[31m Global ' + str(global_time) + ' Sum ' + str(sum_time) + '\033[39m')
print('\033[31m Nodes number ' + str(config.num_nodes) + ' CPU ' + str(config.num_threads) + '\033[39m') # print('\033[31m Nodes number ' + str(config.num_nodes) + ' CPU ' + str(config.num_threads) + '\033[39m')
# Write a record to the output file. # Write a record to the output file.
output_file.write(config.gen_record(global_time, output_file.write(config.gen_record(global_time,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment