fasrc / seff-account

0 stars 0 forks source link

Crash when TimeLimit returned by sacct is not a strict time #1

Open paulraines68 opened 6 months ago

paulraines68 commented 6 months ago

Sometimes sacct will return Partion_Limit for TimeLimit as in this example

3686565|tcsh|00:00:00|256G|6|Partition_Limit|CANCELLED by 5499|00:00:00|1|auser|auser|mlsc

giving this traceback

Traceback (most recent call last):
  File "./seff-account", line 217, in <module>
    job_eff(args.user, args.account, args.starttime, args.endtime, args.cluster)
  File "./seff-account", line 98, in job_eff
    df_long['Timelimit'] = df_long.Timelimit.map(lambda x: time_to_float(x))
  File "/cluster/batch/ADMIN/python3/lib64/python3.6/site-packages/pandas/core/series.py", line 3983, in map
    new_values = super()._map_values(arg, na_action=na_action)
  File "/cluster/batch/ADMIN/python3/lib64/python3.6/site-packages/pandas/core/base.py", line 1160, in _map_values
    new_values = map_f(values, mapper)
  File "pandas/_libs/lib.pyx", line 2403, in pandas._libs.lib.map_infer
  File "./seff-account", line 98, in <lambda>
    df_long['Timelimit'] = df_long.Timelimit.map(lambda x: time_to_float(x))
  File "./seff-account", line 33, in time_to_float
    mins = int(time[-2]) * 60
IndexError: list index out of range
(python3) [root@mlsc-head bin]# ./seff-account -a lncrtx -u fischl -S 2024-01-01 -E 2024-02-29
Traceback (most recent call last):
  File "./seff-account", line 217, in <module>
    job_eff(args.user, args.account, args.starttime, args.endtime, args.cluster)
  File "./seff-account", line 98, in job_eff
    df_long['Timelimit'] = df_long.Timelimit.map(lambda x: time_to_float(x))
  File "/cluster/batch/ADMIN/python3/lib64/python3.6/site-packages/pandas/core/series.py", line 3983, in map
    new_values = super()._map_values(arg, na_action=na_action)
  File "/cluster/batch/ADMIN/python3/lib64/python3.6/site-packages/pandas/core/base.py", line 1160, in _map_values
    new_values = map_f(values, mapper)
  File "pandas/_libs/lib.pyx", line 2403, in pandas._libs.lib.map_infer
  File "./seff-account", line 98, in <lambda>
    df_long['Timelimit'] = df_long.Timelimit.map(lambda x: time_to_float(x))
  File "./seff-account", line 33, in time_to_float
    mins = int(time[-2]) * 60
IndexError: list index out of range
pedmon commented 6 months ago

Out of curiosity what version of slurm are you running? I haven't ever seen Timelimit == Partition_Limit before, though we set defaults for people that basically prevents them for defaulting to the partition time limit.

paulraines68 commented 6 months ago

We are running 23.11.3

pedmon commented 5 months ago

I filled a bug with them on this: https://bugs.schedmd.com/show_bug.cgi?id=19513 I'd rather they just change it to be uniform, but we will see what they say.