-
Notifications
You must be signed in to change notification settings - Fork 1
/
hatchet.diff
102 lines (95 loc) · 4.16 KB
/
hatchet.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
diff --git a/hatchet/readers/hpctoolkit_reader.py b/hatchet/readers/hpctoolkit_reader.py
index 0bae47b..d4533a8 100644
--- a/hatchet/readers/hpctoolkit_reader.py
+++ b/hatchet/readers/hpctoolkit_reader.py
@@ -212,9 +212,9 @@ class HPCToolkitReader:
]
for idx, name in enumerate(metric_names):
if name == "CPUTIME (usec) (E)" or name == "CPUTIME (sec) (E)":
- metric_names[idx] = "time"
+ metric_names[idx] = "time (E)"
if name == "CPUTIME (usec) (I)" or name == "CPUTIME (sec) (I)":
- metric_names[idx] = "time (inc)"
+ metric_names[idx] = "time (I)"
self.metric_columns = metric_names
df_columns = self.metric_columns + ["nid", "rank", "thread"]
@@ -268,8 +268,8 @@ class HPCToolkitReader:
node_dict = self.create_node_dict(
nid,
graph_root,
- self.procedure_names[root.get("n")],
- "PF",
+ "0+:+" + self.procedure_names[root.get("n")],
+ "PFR",
self.src_files[src_file],
int(root.get("l")),
self.load_modules[root.get("lm")],
@@ -336,8 +336,9 @@ class HPCToolkitReader:
if xml_tag == "PF" or xml_tag == "Pr":
# procedure
name = self.procedure_names[xml_node.get("n")]
- if parent_line != 0:
- name = str(parent_line) + ":" + name
+ # if parent_line != 0:
+ # name = str(parent_line) + ":" + name
+ name = str(parent_line) + "+:+" + name
src_file = xml_node.get("f")
line = int(xml_node.get("l"))
diff --git a/hatchet/readers/tau_reader.py b/hatchet/readers/tau_reader.py
index 97c54c6..48e8669 100644
--- a/hatchet/readers/tau_reader.py
+++ b/hatchet/readers/tau_reader.py
@@ -201,6 +201,25 @@ class TAUReader:
parent_node.add_child(child_node)
child_node.add_parent(parent_node)
+ if len(grand_parent_callpath) == 0:
+ metric_values = []
+ for value in root_values:
+ metric_values.append(0.0)
+ node_dict = self.create_node_dict(
+ parent_node,
+ self.columns,
+ metric_values,
+ parent_name,
+ None,
+ None,
+ 0,
+ 0,
+ rank,
+ thread,
+ )
+ self.node_dicts.append(node_dict)
+ list_roots.append(parent_node)
+ return
_create_parent(parent_node, grand_parent_callpath)
def _construct_column_list(first_rank_filenames):
@@ -232,9 +251,9 @@ class TAUReader:
metric_name = "time"
elif metric_name == "Name":
metric_name == "name"
- columns.extend([metric_name, metric_name + " (inc)"])
- self.exc_metrics.append(metric_name)
- self.inc_metrics.append(metric_name + " (inc)")
+ columns.extend([metric_name + " (E)", metric_name + " (I)"])
+ self.exc_metrics.append(metric_name + " (E)")
+ self.inc_metrics.append(metric_name + " (I)")
return columns
# dirpath -> returns path of a directory, string
@@ -508,7 +527,7 @@ class TAUReader:
elif num_of_indices == 3:
dataframe = dataframe.stack().stack()
- default_metric = "time (inc)"
+ default_metric = "time (I)"
dataframe = dataframe.astype({"line": int, "end_line": int})
return hatchet.graphframe.GraphFrame(
graph, dataframe, self.exc_metrics, self.inc_metrics, default_metric
diff --git a/install.sh b/install.sh
index 6029367..7f85b8f 100755
--- a/install.sh
+++ b/install.sh
@@ -9,4 +9,5 @@ case "$PYTHONPATH" in
;;
esac
-python setup.py build_ext --inplace
+PYTHON_BIN=$(which python3)
+${PYTHON_BIN} setup.py build_ext --inplace