Skip to content

Slurm.memory_from_tres cannot handle decimal points #979

Description

@Bubballoo3

Describe the bug
The memory_from_tres method currently looks for \w+, which does not allow period characters. This is an issue because the values from slurm are not guaranteed to be integers. (See spec/fixtures/scripts/sacct.rb‎)

To Reproduce
Open a irb session with a job that has a non-integer memory value. The memory value returned is nil when it should not be.

irb(main):006> OodCore::Job::Adapters::Slurm.memory_from_tres('billing=1,cpu=1,mem=3.93G,node=1')
=> nil

Expected behavior
The regex should still match the floating point memory value and return the proper conversion to bytes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Impact

    None yet

    Source

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions