Skip to content

Commit 70c2717

Browse files
committed
Added support for DXT issues and recommendations
1 parent 233fb16 commit 70c2717

File tree

1 file changed

+70
-1
lines changed

1 file changed

+70
-1
lines changed

drishti/main.py

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
insights_operation = []
4444
insights_metadata = []
45+
insights_dxt = []
4546

4647
insights_total = dict()
4748

@@ -95,6 +96,8 @@
9596
INSIGHTS_MPI_IO_AGGREGATORS_INTRA = 'M08'
9697
INSIGHTS_MPI_IO_AGGREGATORS_INTER = 'M09'
9798
INSIGHTS_MPI_IO_AGGREGATORS_OK = 'M10'
99+
INSIGHTS_DXT_RANK_ZERO_IMBALANCE = 'D01'
100+
INSIGHTS_DXT_RANK_IMBALANCE = 'D02'
98101

99102
# TODO: need to verify the threashold to be between 0 and 1
100103
# TODO: read thresholds from file
@@ -179,6 +182,20 @@
179182
help='Export a CSV with the code of all issues that were triggered'
180183
)
181184

185+
parser.add_argument(
186+
'--rank_zero_imbalance',
187+
default=False,
188+
action='store_true',
189+
dest='rank_zero_imbalance',
190+
help=argparse.SUPPRESS)
191+
192+
parser.add_argument(
193+
'--unbalanced_workload',
194+
default=False,
195+
action='store_true',
196+
dest='unbalanced_workload',
197+
help=argparse.SUPPRESS)
198+
182199
args = parser.parse_args()
183200

184201
if args.export_size:
@@ -1437,7 +1454,43 @@ def main():
14371454
pass
14381455
except FileNotFoundError:
14391456
pass
1457+
1458+
#########################################################################################################################################################################
1459+
1460+
if args.rank_zero_imbalance:
1461+
issue = 'Rank 0 is issuing a lot of I/O requests'
1462+
1463+
recommendation = [
1464+
{
1465+
'message': 'Consider using MPI-IO collective'
1466+
}
1467+
]
1468+
1469+
insights_dxt.append(
1470+
message(INSIGHTS_DXT_RANK_ZERO_IMBALANCE, TARGET_DEVELOPER, HIGH, issue, recommendation)
1471+
)
1472+
1473+
#########################################################################################################################################################################
1474+
1475+
if args.unbalanced_workload:
1476+
issue = 'Detected unbalanced workload between the ranks'
1477+
1478+
recommendation = [
1479+
{
1480+
'message': 'Consider better balancing the data transfer between the application ranks'
1481+
},
1482+
{
1483+
'message': 'Consider tuning the stripe size and count to better distribute the data'
1484+
},
1485+
{
1486+
'message': 'If the application uses netCDF and HDF5, double check the need to set NO_FILL values'
1487+
}
1488+
]
14401489

1490+
insights_dxt.append(
1491+
message(INSIGHTS_DXT_RANK_IMBALANCE, TARGET_DEVELOPER, HIGH, issue, recommendation)
1492+
)
1493+
14411494
#########################################################################################################################################################################
14421495

14431496
insights_end_time = time.time()
@@ -1527,6 +1580,20 @@ def main():
15271580
)
15281581
)
15291582

1583+
if insights_dxt:
1584+
console.print(
1585+
Panel(
1586+
Padding(
1587+
Group(
1588+
*insights_dxt
1589+
),
1590+
(1, 1)
1591+
),
1592+
title='DXT',
1593+
title_align='left'
1594+
)
1595+
)
1596+
15301597
console.print(
15311598
Panel(
15321599
' {} | [white]LBNL[/white] | [white]Drishti report generated at {} in[/white] {:.3f} seconds'.format(
@@ -1615,7 +1682,9 @@ def main():
16151682
INSIGHTS_MPI_IO_BLOCKING_WRITE_USAGE,
16161683
INSIGHTS_MPI_IO_AGGREGATORS_INTRA,
16171684
INSIGHTS_MPI_IO_AGGREGATORS_INTER,
1618-
INSIGHTS_MPI_IO_AGGREGATORS_OK
1685+
INSIGHTS_MPI_IO_AGGREGATORS_OK,
1686+
INSIGHTS_DXT_RANK_ZERO_IMBALANCE,
1687+
INSIGHTS_DXT_RANK_IMBALANCE
16191688
]
16201689

16211690
detected_issues = dict.fromkeys(issues, False)

0 commit comments

Comments
 (0)