Hi everybody!

Well, after some adventures through SLURM's code, I can answer to myself
and to these unanswered messages as well.

https://groups.google.com/d/msg/slurm-devel/p4wGElKEKsE/wGXxYd_S01MJ

https://groups.google.com/d/msg/slurm-devel/d8K75c3MC58/BVsMXWN71Z4J

(I'm including Sarah and Ahmet in BCC because I don't know how to answer
their messages directly, since they're not in my inbox. )

SLURM's web documentation is very unclear about this issue, and leads to
great confussion, and questions related to this in this mailing list
unfortunately don't seem to get to be responded. I have been able to find
the answer, as I guess the other people asking did somehow. It is just a
matter of time, the code is there. But it's a lot of code.


The problem with Age factor doesn't getting updated resides in that
accounting has to be enabled as well if you want that updating to happen,
or at least some global variable related to accounting. As you can see in
priority_multifactor's *init()* function*:*

if (strcasecmp(temp, "accounting_storage/slurmdbd")
    && strcasecmp(temp, "accounting_storage/mysql")) {
 ...
calc_fairshare = 0;
weight_fs = 0;
 } else if (assoc_mgr_root_assoc) {
...
assoc_mgr_root_assoc->usage->usage_efctv = 1.0;
 slurm_attr_init(&thread_attr);
if (pthread_create(&decay_handler_thread, &thread_attr,
   _decay_thread, NULL))
fatal("pthread_create error %m");
               ...


Only if  *assoc_mgr_root_assoc* is not null (that is, we are using
accounting) we create  *_decay_thread, *that is the thread responsible for
updating job's prioritiy each *PriorityCalcPeriod *time.

This means that, in reality, I can't have a multifactor that only has in
account job's Age and job's Size, as I intended, and as I can actually see
in multifactor plugin's behaviour.


Maybe I'm wrong about something here, since I'm new to Slurm, but I'm
pretty sure this is the answer we were seeking. I will make further tests
to check this.

Regards,

Miguel

On Mon, Jul 30, 2012 at 12:17 PM, Miguel Méndez <[email protected]>wrote:

>  Hello,
>
> There is something I don't understand in priority's multifactor plugin. I
> thought function "priority_p_set" is the one that is called every time to
> get updated priority, but then there is this line:
>
> debug2("initial priority for job %u is %u", job_ptr->job_id, priority);
>
> So every time this function is called, I would see in my debug2 log the
> word "initial", as if this function would only be called once initially.
>
> Actually, when I go to the debug2 log, I see this message only once per
> job. Besides, age factor is always zero (even thought I have it's weight
> set to 1000000 or more).
>
> So, ¿could someone please explain me how exactly this plugin works?
>
> Regards,
>
> Miguel
>
>
>

Reply via email to