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
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.
Expected behavior
The regex should still match the floating point memory value and return the proper conversion to bytes