Commit be59fd49 authored by Moe Jette's avatar Moe Jette
Browse files

tch #26: Display negative priority rather than large unsigned

            value (due to uint32_t conversion) in sprio. Helpful
            when fine-tuning weight parameters.

sprio: print overall priority value even if it is less than 0

With some combinations of component values and low weight factors, it can happen that the
priority computed by the priority/multifactor plugin lies below 0 (and would be rounded
up to 2).

When this condition happens, the negative values are difficult to interpret and can give
the wrong impression that the resulting priority is very large (due to the conversion
into a large unsigned number). 

In our tests we found it more helpful to display the negative priority value: a user can
know that SLURM does not use negative values, having the absolute value gives a better
indication how much weight to add to the other factors so that the overall priority
centers around 0.

Before:
  JOBID     USER   PRIORITY        AGE  FAIRSHARE    JOBSIZE  PARTITION        QOS   NICE
   9968   sukysj       8955        218          0        236          0          0  -8500
  10065   amsmax 4294957826          9          0        340          0          0   9821
  10066   amsmax 4294957826          9          0        340          0          0   9821
  10067   amsmax 4294957826          9          0        340          0          0   9821
  10068   amsmax 4294957826          9          0        340          0          0   9821
  10069   amsmax 4294957826          9          0        340          0          0   9821
  10070   amsmax 4294957826          9          0        340          0          0   9821

After:
  JOBID     USER   PRIORITY        AGE  FAIRSHARE    JOBSIZE  PARTITION        QOS   NICE
   9968   sukysj       8955        218          0        236          0          0  -8500
  10065   amsmax      -9470          9          0        340          0          0   9821
  10066   amsmax      -9470          9          0        340          0          0   9821
  10067   amsmax      -9470          9          0        340          0          0   9821
  10068   amsmax      -9470          9          0        340          0          0   9821
  10069   amsmax      -9470          9          0        340          0          0   9821
  10070   amsmax      -9470          9          0        340          0          0   9821
parent e2cc4b2e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment