Skip to content

BUG(pydarshan): id field in to_df() output should be uint64 instead of int64 #1031

@jay-tau

Description

@jay-tau

TL;DR: The id field in the DataFrame generated by DarshanRecordCollection.to_df() should be of type uint64 instead of int64.

Currently, the Pandas DataFrames created from PyDarshan POSIX records (via report.records[modulename].to_df()) represent the id field as a signed 64-bit integer (int64). However, this field originates from the Darshan C library, which uses a hash function (darshan_hash()) that returns values of type unsigned long long—corresponding to a 64-bit unsigned integer (uint64).

To maintain fidelity with the underlying data representation and avoid potential issues with signed integer overflow or interpretation, it would be more appropriate to cast the id field to uint64 in the resulting DataFrame.

References:

Implementation of darshan_hash: darshan-util/darshan-common.c

Header for darshan_hash: darshan-util/darshan-common.h

Slack: Issue, Response from @shanedsnyder

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions