Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyDarshan mod_records fails on LUSTRE records #831

Open
jesse-r-s-hines opened this issue Oct 13, 2022 · 0 comments · May be fixed by #832
Open

PyDarshan mod_records fails on LUSTRE records #831

jesse-r-s-hines opened this issue Oct 13, 2022 · 0 comments · May be fixed by #832
Labels
bug Something isn't working pydarshan

Comments

@jesse-r-s-hines
Copy link

jesse-r-s-hines commented Oct 13, 2022

DarshanReport.mod_records throws when loading a LUSTRE module

r = darshan.DarshanReport('sample.darshan')
next(r.mod_records('LUSTRE'))

throws:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/dist-packages/darshan-3.4.0.1-py3.9.egg/darshan/report.py", line 974, in mod_records
    rec = backend.log_get_generic_record(self.log, mod, dtype=dtype)
  File "/usr/local/lib/python3.9/dist-packages/darshan-3.4.0.1-py3.9.egg/darshan/backend/cffi_backend.py", line 354, in log_get_generic_record
    flst = np.copy(np.frombuffer(ffi.buffer(rbuf[0].fcounters), dtype=np.float64))
AttributeError: cdata 'struct darshan_lustre_record *' has no field 'fcounters'

Using backend.log_get_record works, so perhaps just switching DarshanReport.mod_records to use log_get_record instead of log_get_generic_record to make it work for all module types?

I'm running PyDarshan 3.4.0.1. I've attached a sample darshan file that shows the issue.

@tylerjereddy tylerjereddy added bug Something isn't working pydarshan labels Oct 14, 2022
tylerjereddy added a commit to tylerjereddy/darshan that referenced this issue Oct 17, 2022
Fixes darshan-hpc#831

* prevent `log_get_generic_record()` from attempting
to access the `LUSTRE` `fcounters` field, which
apparently does not exist
@tylerjereddy tylerjereddy linked a pull request Oct 17, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pydarshan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants