Skip to content

Commit

Permalink
added HPM data
Browse files Browse the repository at this point in the history
  • Loading branch information
raptox committed Mar 30, 2019
1 parent e6b3245 commit cca7cf0
Show file tree
Hide file tree
Showing 8 changed files with 236 additions and 98 deletions.
3 changes: 2 additions & 1 deletion app/components/Basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@

.pieCharts {
width: 100%;
overflow: auto;
overflow-y: auto;
overflow-x: hidden;
}

.tableInfo {
Expand Down
36 changes: 36 additions & 0 deletions app/components/ViewParsed.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,42 @@ export default class ViewParsed extends Component {
className="-striped -highlight"
/>
</div>
<div className={styles.tableInfo}>
<ReactTable
data={content.hpmData}
columns={[
{
Header: 'HPM Counter Statistics',
columns: [
{
Header: 'Event',
accessor: 'name'
},
{
Header: 'Total Count',
accessor: 'counter'
},
{
Header: 'Avg',
accessor: d => (d.counter / d.ncalls).toFixed(2),
id: 'avg'
},
{
Header: 'Min',
accessor: 'min'
},
{
Header: 'Max',
accessor: 'max'
}
]
}
]}
pageSizeOptions={[2, 5, 10, 20, 25, 50, 100]}
defaultPageSize={10}
className="-striped -highlight"
/>
</div>
<div className={styles.tableInfo}>
<ReactTable
data={content.hosts}
Expand Down
38 changes: 38 additions & 0 deletions app/utils/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const parseData = (filename, callback) => {
data.hosts = getHosts(taskdata);
data.mpiData = getMpiData(taskdata);
data.mpiPies = getMpiPieCharts(data.mpiData, data.metadata.totalWallTime);
data.hpmData = getHpmData(taskdata);
// save raw parsed JSON to file
//
// fs.writeFile('log.json', JSON.stringify(result, null, 2), err => {
Expand All @@ -46,6 +47,43 @@ export const parseData = (filename, callback) => {
});
};

const getHpmData = taskdata => {
let hpmData = [];
for (let taskKey in taskdata) {
let task = taskdata[taskKey];
let hpm = task.regions[0].region[0].hpm[0].counter;
for (let index in hpm) {
let name = hpm[index].$.name;
let counter = parseInt(hpm[index]._);
let hpmFound = hpmData.find(data => data.name === name);
if (hpmFound) {
hpmFound.counter += counter;
hpmFound.ncalls += 1;
// get min
if (counter < hpmFound.min) {
hpmFound.min = counter;
}
// get max
if (counter > hpmFound.max) {
hpmFound.max = counter;
}
} else {
let newHpmData = {
name: name,
counter: counter,
min: counter,
max: counter,
ncalls: 1
};
hpmData.push(newHpmData);
}
}
}

hpmData.sort((a, b) => b.counter - a.counter);
return hpmData;
};

const getMpiPieCharts = (mpiData, totalWallTime) => {
let mpiPieCharts = {
mpiPercent: {
Expand Down
39 changes: 20 additions & 19 deletions ipm_raw/MDFT_03.ipm_parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -1871,20 +1871,20 @@
{
"data": ["52.83", "35.51", "5.80", "2.60", "1.22", "2.04"],
"backgroundColor": [
"rgb(114, 147, 203)",
"rgb(225, 151, 76)",
"rgb(132, 186, 91)",
"rgb(211, 94, 96)",
"rgb(128, 133, 133)",
"rgb(144, 103, 167)"
"rgb(144, 103, 167)",
"rgb(171, 104, 87)",
"rgb(204, 194, 16)",
"rgb(57, 106, 177)",
"rgb(218, 124, 48)",
"rgb(62, 150, 81)"
],
"hoverBackgroundColor": [
"rgb(134, 167, 223)",
"rgb(245, 171, 96)",
"rgb(152, 206, 111)",
"rgb(231, 114, 116)",
"rgb(148, 153, 153)",
"rgb(164, 123, 187)"
"rgb(164, 123, 187)",
"rgb(191, 124, 107)",
"rgb(224, 214, 36)",
"rgb(77, 126, 197)",
"rgb(238, 144, 68)",
"rgb(82, 170, 101)"
]
}
],
Expand All @@ -1902,20 +1902,21 @@
{
"data": ["2.71", "1.82", "0.58", "94.86"],
"backgroundColor": [
"rgb(114, 147, 203)",
"rgb(225, 151, 76)",
"rgb(144, 103, 167)",
"rgb(171, 104, 87)"
"rgb(171, 104, 87)",
"rgb(62, 150, 81)",
"rgb(204, 37, 41)"
],
"hoverBackgroundColor": [
"rgb(134, 167, 223)",
"rgb(245, 171, 96)",
"rgb(164, 123, 187)",
"rgb(191, 124, 107)"
"rgb(191, 124, 107)",
"rgb(82, 170, 101)",
"rgb(224, 57, 61)"
]
}
],
"labels": ["MPI_Alltoallv", "MPI_Barrier", "others", "Apllication"]
}
}
},
"hpmData": []
}
39 changes: 20 additions & 19 deletions ipm_raw/MDFT_04.ipm_parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2152,20 +2152,20 @@
{
"data": ["51.02", "39.14", "4.72", "1.98", "1.01", "2.12"],
"backgroundColor": [
"rgb(204, 194, 16)",
"rgb(57, 106, 177)",
"rgb(218, 124, 48)",
"rgb(62, 150, 81)",
"rgb(204, 37, 41)",
"rgb(83, 81, 84)"
"rgb(83, 81, 84)",
"rgb(107, 76, 154)",
"rgb(146, 36, 40)",
"rgb(148, 139, 61)",
"rgb(114, 147, 203)",
"rgb(225, 151, 76)"
],
"hoverBackgroundColor": [
"rgb(224, 214, 36)",
"rgb(77, 126, 197)",
"rgb(238, 144, 68)",
"rgb(82, 170, 101)",
"rgb(224, 57, 61)",
"rgb(103, 101, 104)"
"rgb(103, 101, 104)",
"rgb(127, 96, 174)",
"rgb(166, 56, 60)",
"rgb(168, 159, 81)",
"rgb(134, 167, 223)",
"rgb(245, 171, 96)"
]
}
],
Expand All @@ -2183,20 +2183,21 @@
{
"data": ["7.04", "5.40", "1.34", "86.21"],
"backgroundColor": [
"rgb(204, 194, 16)",
"rgb(57, 106, 177)",
"rgb(83, 81, 84)",
"rgb(107, 76, 154)"
"rgb(107, 76, 154)",
"rgb(225, 151, 76)",
"rgb(132, 186, 91)"
],
"hoverBackgroundColor": [
"rgb(224, 214, 36)",
"rgb(77, 126, 197)",
"rgb(103, 101, 104)",
"rgb(127, 96, 174)"
"rgb(127, 96, 174)",
"rgb(245, 171, 96)",
"rgb(152, 206, 111)"
]
}
],
"labels": ["MPI_Barrier", "MPI_Alltoallv", "others", "Apllication"]
}
}
},
"hpmData": []
}
43 changes: 22 additions & 21 deletions ipm_raw/MDFT_05.ipm_parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2294,20 +2294,20 @@
{
"data": ["55.76", "27.84", "9.82", "3.52", "1.12", "1.92"],
"backgroundColor": [
"rgb(146, 36, 40)",
"rgb(148, 139, 61)",
"rgb(114, 147, 203)",
"rgb(225, 151, 76)",
"rgb(132, 186, 91)",
"rgb(211, 94, 96)"
"rgb(211, 94, 96)",
"rgb(128, 133, 133)",
"rgb(144, 103, 167)",
"rgb(171, 104, 87)",
"rgb(204, 194, 16)",
"rgb(57, 106, 177)"
],
"hoverBackgroundColor": [
"rgb(166, 56, 60)",
"rgb(168, 159, 81)",
"rgb(134, 167, 223)",
"rgb(245, 171, 96)",
"rgb(152, 206, 111)",
"rgb(231, 114, 116)"
"rgb(231, 114, 116)",
"rgb(148, 153, 153)",
"rgb(164, 123, 187)",
"rgb(191, 124, 107)",
"rgb(224, 214, 36)",
"rgb(77, 126, 197)"
]
}
],
Expand All @@ -2325,18 +2325,18 @@
{
"data": ["12.66", "6.32", "2.23", "1.50", "77.29"],
"backgroundColor": [
"rgb(146, 36, 40)",
"rgb(148, 139, 61)",
"rgb(114, 147, 203)",
"rgb(211, 94, 96)",
"rgb(128, 133, 133)"
"rgb(128, 133, 133)",
"rgb(144, 103, 167)",
"rgb(57, 106, 177)",
"rgb(218, 124, 48)"
],
"hoverBackgroundColor": [
"rgb(166, 56, 60)",
"rgb(168, 159, 81)",
"rgb(134, 167, 223)",
"rgb(231, 114, 116)",
"rgb(148, 153, 153)"
"rgb(148, 153, 153)",
"rgb(164, 123, 187)",
"rgb(77, 126, 197)",
"rgb(238, 144, 68)"
]
}
],
Expand All @@ -2348,5 +2348,6 @@
"Apllication"
]
}
}
},
"hpmData": []
}
68 changes: 49 additions & 19 deletions ipm_raw/pin1008_parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -809,16 +809,16 @@
{
"data": ["55.44", "21.94", "13.90", "8.71"],
"backgroundColor": [
"rgb(144, 103, 167)",
"rgb(171, 104, 87)",
"rgb(204, 194, 16)",
"rgb(57, 106, 177)"
"rgb(62, 150, 81)",
"rgb(204, 37, 41)",
"rgb(83, 81, 84)",
"rgb(107, 76, 154)"
],
"hoverBackgroundColor": [
"rgb(164, 123, 187)",
"rgb(191, 124, 107)",
"rgb(224, 214, 36)",
"rgb(77, 126, 197)"
"rgb(82, 170, 101)",
"rgb(224, 57, 61)",
"rgb(103, 101, 104)",
"rgb(127, 96, 174)"
]
}
],
Expand All @@ -829,18 +829,18 @@
{
"data": ["29.73", "11.77", "7.46", "4.67", "46.37"],
"backgroundColor": [
"rgb(144, 103, 167)",
"rgb(171, 104, 87)",
"rgb(204, 194, 16)",
"rgb(57, 106, 177)",
"rgb(218, 124, 48)"
"rgb(62, 150, 81)",
"rgb(204, 37, 41)",
"rgb(83, 81, 84)",
"rgb(107, 76, 154)",
"rgb(146, 36, 40)"
],
"hoverBackgroundColor": [
"rgb(164, 123, 187)",
"rgb(191, 124, 107)",
"rgb(224, 214, 36)",
"rgb(77, 126, 197)",
"rgb(238, 144, 68)"
"rgb(82, 170, 101)",
"rgb(224, 57, 61)",
"rgb(103, 101, 104)",
"rgb(127, 96, 174)",
"rgb(166, 56, 60)"
]
}
],
Expand All @@ -852,5 +852,35 @@
"Apllication"
]
}
}
},
"hpmData": [
{
"name": "PAPI_TOT_INS",
"counter": 13954324000707,
"min": 71111664206,
"max": 94659353391,
"ncalls": 168
},
{
"name": "PAPI_FP_OPS",
"counter": 1862675165534,
"min": 11018463401,
"max": 11188400383,
"ncalls": 168
},
{
"name": "PAPI_L2_TCM",
"counter": 9207135413,
"min": 44676600,
"max": 111693292,
"ncalls": 168
},
{
"name": "(null)",
"counter": 0,
"min": 0,
"max": 0,
"ncalls": 168
}
]
}
Loading

0 comments on commit cca7cf0

Please sign in to comment.