Commit 98c42f6a authored by Sudheer Chunduri's avatar Sudheer Chunduri
Browse files

apmpi fixes to work well pydarshan changes and apxc cleanup

parent 66da41f2
......@@ -36,16 +36,16 @@ def get_apmpi_defs():
# load header record
def log_get_apmpi_record(log, mod_type, dtype='dict'):
from darshan.backend.cffi_backend import ffi, libdutil, log_get_modules, counter_names
def log_get_apmpi_record(log, mod_name, structname, dtype='dict'):
from darshan.backend.cffi_backend import ffi, libdutil, log_get_modules, counter_names, _structdefs
mod_name = 'APMPI'
modules = log_get_modules(log)
rec = {}
buf = ffi.new("void **")
r = libdutil.darshan_log_get_record(log['handle'], modules[mod_name]['idx'], buf)
mod_type = _structdefs[mod_name+"-"+structname]
if r < 1:
return None
......
......@@ -29,37 +29,6 @@ def main():
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()
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