[Darshan-commits] [Git][darshan/darshan][autoperf-mod-update] 2 commits: remove the extraneous statement
Sudheer Chunduri
xgitlab at cels.anl.gov
Fri Feb 19 15:06:04 CST 2021
Sudheer Chunduri pushed to branch autoperf-mod-update at darshan / darshan
Commits:
2ea09bf1 by Sudheer Chunduri at 2021-02-19T21:05:07+00:00
remove the extraneous statement
- - - - -
f665e5e5 by Sudheer Chunduri at 2021-02-19T21:05:51+00:00
apmpi analysis script
- - - - -
3 changed files:
- darshan-util/pydarshan/Makefile
- darshan-util/pydarshan/darshan/discover_darshan.py
- darshan-util/pydarshan/examples/01_darshan-apmpi.py → darshan-util/pydarshan/examples/apmpi_analysis.py
Changes:
=====================================
darshan-util/pydarshan/Makefile
=====================================
@@ -99,4 +99,4 @@ dist: clean # builds source and wheel package
install: clean # install the package to the active Python's site-packages
- python setup.py install
+ python setup.py install
=====================================
darshan-util/pydarshan/darshan/discover_darshan.py
=====================================
@@ -146,7 +146,6 @@ def find_utils(ffi, libdutil):
libdutil: reference to libdutil to populate
"""
- libdutil = ffi.dlopen("/projects/Performance/chunduri/Software/Temp/build/darshan-util/install/lib/libdarshan-util.so")
if libdutil is None:
try:
libdutil = ffi.dlopen("libdarshan-util.so")
=====================================
darshan-util/pydarshan/examples/01_darshan-apmpi.py → darshan-util/pydarshan/examples/apmpi_analysis.py
=====================================
@@ -13,7 +13,7 @@ import cffi
import numpy
import pandas
import matplotlib
-import pprint
+#import pprint
import pandas as pd
import logging
@@ -25,6 +25,7 @@ import darshan.backend.cffi_backend as backend
import darshan
import pandas as pd
import time
+'''
from rich import print as rprint
from rich import pretty
from rich.panel import Panel
@@ -32,9 +33,12 @@ from rich import inspect
from rich.color import Color
from rich.console import Console
console = Console()
+'''
+from matplotlib.backends.backend_pdf import FigureCanvasPdf, PdfPages
+from matplotlib.figure import Figure
-pp = pprint.PrettyPrinter()
-pretty.install()
+#pp = pprint.PrettyPrinter()
+#pretty.install()
#color = Color.parse("blue")
#inspect(color, methods=True)
@@ -56,14 +60,16 @@ def main():
report = darshan.DarshanReport(args.logname[0], read_all=False)
report.info()
-
+
if "APMPI" not in report.modules:
print("This log does not contain AutoPerf MPI data")
return
r = report.mod_read_all_apmpi_records("APMPI")
-
+
report.update_name_records()
report.info()
+
+ pdf = matplotlib.backends.backend_pdf.PdfPages("apmpi_output.pdf")
header_rec = report.records["APMPI"][0]
print("# darshan log version: ", header_rec["version"])
@@ -145,14 +151,38 @@ def main():
list_combined = list_mpiop + list_rank
df_apmpi = pd.DataFrame(list_combined)
df_apmpi = df_apmpi.sort_values(by=["Rank", "Total_Time"], ascending=[True, False])
- Panel.fit("[bold green] MPI stats for rank with maximum MPI time", border_style="blue")
- console.print("[bold green] MPI stats for rank with maximum MPI time\n", df_apmpi.loc[df_apmpi["Rank"] == max_rank])
- Panel.fit("[bold green] MPI stats for rank with minimum MPI time", border_style="blue")
+ print("[bold green] MPI stats for rank with maximum MPI time")#, border_style="blue")
+ print("[bold green] MPI stats for rank with maximum MPI time\n", df_apmpi.loc[df_apmpi["Rank"] == max_rank])
+ print("[bold green] MPI stats for rank with minimum MPI time")# border_style="blue")
print(df_apmpi.loc[df_apmpi["Rank"] == min_rank])
- Panel.fit("[bold green] MPI stats for rank with mean MPI time", border_style="blue")
+ print("[bold green] MPI stats for rank with mean MPI time")#, border_style="blue")
print(df_apmpi.loc[df_apmpi["Rank"] == mean_rank])
# print(df_apmpi)
- # df_apmpi.to_csv('apmpi.csv', index=False)
+ df_apmpi.to_csv('apmpi.csv', index=False)
+ fig = Figure()
+ ax = fig.gca()
+ ax.plot(df_rank["Rank"], df_rank["Total_Time"])
+ ax.set_xlabel("Rank")
+ ax.set_ylabel("MPI Total time(s)")
+ canvas = FigureCanvasPdf(fig)
+ canvas.print_figure(pdf)
+ fig = Figure()
+ ax = fig.gca()
+ #fig2.plot(df_apmpi.loc[df_apmpi["Rank"] == max_rank])
+ ax.plot(df_apmpi.loc[df_apmpi["Rank"] == max_rank]["Call"], df_apmpi.loc[df_apmpi["Rank"] == max_rank]["Total_Time"])
+ ax.set_xlabel("MPI OP")
+ ax.set_ylabel("Total time(s)")
+ canvas = FigureCanvasPdf(fig)
+ #canvas.print_figure(pdf)
+ fig = Figure()
+ ax = fig.gca()
+ ax.plot(df_apmpi.loc[df_apmpi["Rank"] == min_rank]["Call"], df_apmpi.loc[df_apmpi["Rank"] == min_rank]["Total_Time"])
+ ax.set_xlabel("MPI OP")
+ ax.set_ylabel("Total time(s)")
+ ax.set_title("Min rank MPI times")
+ canvas = FigureCanvasPdf(fig)
+ #canvas.print_figure(pdf)
+ #fig3.plot(df_apmpi.loc[df_apmpi["Rank"] == min_rank])
return
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/25e7e0dacd3df7fa38d0a40c082c87564f07f6d7...f665e5e53fb6b2d5e5e8447d814622bfcaf9af4b
--
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/-/compare/25e7e0dacd3df7fa38d0a40c082c87564f07f6d7...f665e5e53fb6b2d5e5e8447d814622bfcaf9af4b
You're receiving this email because of your account on xgitlab.cels.anl.gov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20210219/06bc8f2a/attachment-0001.html>
More information about the Darshan-commits
mailing list