Commit 839b7e95 authored by Sudheer Chunduri's avatar Sudheer Chunduri
Browse files

apxc: apxc analysis script

parent 474c59b9
#!/usr/bin/env python #!/usr/bin/env python
# DarshanUtils for Python for processing APXC records
# This script gives an overview of features provided by the Python bindings for DarshanUtils.
# By default all APXC module records, metadata, and the name records are loaded when opening a Darshan log:
import argparse import argparse
import darshan import darshan
import cffi
import numpy
import pandas
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
# base counter names #import pprint
cnames = ['MPI_SEND', import pandas as pd
'MPI_RECV', import numpy as np
'MPI_ALLREDUCE'] import jinja2
import logging
def main(): from darshan.backend.cffi_backend import ffi
logger = logging.getLogger(__name__)
from import DarshanReport
import darshan.backend.cffi_backend as backend
import darshan
import time
from matplotlib.backends.backend_pdf import FigureCanvasPdf, PdfPages
from matplotlib.figure import Figure
def main():
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--quiet', dest='quiet', action='store_true', default=False, help='Surpress zero count calls') parser.add_argument(
parser.add_argument('logname', metavar="logname", type=str, nargs=1, help='Logname to parse') "--quiet",
help="Surpress zero count calls",
"logname", metavar="logname", type=str, nargs=1, help="Logname to parse"
args = parser.parse_args() args = parser.parse_args()
report = darshan.DarshanReport(args.logname[0], read_all=False) report = darshan.DarshanReport(args.logname[0], read_all=False)
if ('APXC' not in report.modules): if "APXC" not in report.modules:
print ("This log does not contain AutoPerf XC data") print("This log does not contain AutoPerf XC data")
return return
r = report.mod_read_all_apxc_records("APXC")
#pdf = matplotlib.backends.backend_pdf.PdfPages("apxc_output.pdf")
hdr = darshan.backend.cffi_backend.log_get_apxc_record(report.log) header_rec = report.records["APXC"][0]
#print("{:<8}{:<16}{:<10}{:<15}{:<18}{:<10}{:<10}{:<10}{:<10}{:<10}{:<10}\n{}".format( for rec in report.records["APXC"][1:]:
# "Rank","Call", "Count", "Total Bytes", "Total Time", "0-256", "256-1K", "1K-8K", "8K-256K", "256K-1M", "1M+", "="*120)) # skip the first record which is header record
r = darshan.backend.cffi_backend.log_get_apxc_record(report.log)
return return
if __name__ == '__main__': if __name__ == '__main__':
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment