Commit d0ade3dd authored by Sudheer Chunduri's avatar Sudheer Chunduri
Browse files

APXC analysis scipts

parent 22bb8840
#!/usr/bin/env python
import argparse
import darshan
# base counter names
cnames = ['MPI_SEND',
'MPI_RECV',
'MPI_ALLREDUCE']
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--quiet', dest='quiet', action='store_true', default=False, help='Surpress zero count calls')
parser.add_argument('logname', metavar="logname", type=str, nargs=1, help='Logname to parse')
args = parser.parse_args()
report = darshan.DarshanReport(args.logname[0], read_all=False)
report.info()
if ('APXC' not in report.modules):
print ("This log does not contain AutoPerf XC data")
return
hdr = darshan.backend.cffi_backend.log_get_apxc_record(report.log)
#print("{:<8}{:<16}{:<10}{:<15}{:<18}{:<10}{:<10}{:<10}{:<10}{:<10}{:<10}\n{}".format(
# "Rank","Call", "Count", "Total Bytes", "Total Time", "0-256", "256-1K", "1K-8K", "8K-256K", "256K-1M", "1M+", "="*120))
r = darshan.backend.cffi_backend.log_get_apxc_record(report.log)
print(r)
return
'''
while (r):
for c in cnames:
# counter fields for each base type
ncall = c
ncount = c + '_CALL_COUNT'
nsize = c + '_TOTAL_BYTES'
ntime = c + '_TOTAL_TIME'
h0 = c + '_MSG_SIZE_AGG_0_256'
h1 = c + '_MSG_SIZE_AGG_256_1K'
h2 = c + '_MSG_SIZE_AGG_1K_8K'
h3 = c + '_MSG_SIZE_AGG_8K_256K'
h4 = c + '_MSG_SIZE_AGG_256K_1M'
h5 = c + '_MSG_SIZE_AGG_1M_PLUS'
if (r['counters'][ncount] > 0 or not args.quiet):
print("{rank:<8}{call:<16}{count:<10}{size:<15}{time:<18.6f}{h0:<10}{h1:<10}{h2:<10}{h3:<10}{h4:<10}{h5:<10}".format(
rank=r['rank'],
call=ncall,
count=r['counters'][ncount],
size=r['counters'][nsize],
time=r['fcounters'][ntime],
h0=r['counters'][h0],
h1=r['counters'][h1],
h2=r['counters'][h2],
h3=r['counters'][h3],
h4=r['counters'][h4],
h5=r['counters'][h5]))
r = darshan.backend.cffi_backend.log_get_apmpi_record(report.log)
'''
if __name__ == '__main__':
main()
......@@ -14,7 +14,7 @@ struct darshan_apxc_perf_record
int blade;
int node;
int marked;
uint64_t counters[396];
uint64_t counters[392];
};
struct darshan_apxc_header_record
{
......@@ -40,7 +40,7 @@ def get_apxc_defs():
def log_get_apxc_record(log, dtype='dict'):
from darshan.backend.cffi_backend import ffi, libdutil, log_get_modules, counter_names
mod_name = 'apxc'
mod_name = 'APXC'
modules = log_get_modules(log)
......
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