It's correct as is.
The idea is that if a job has avg_ncpus > ncpus
(e.g. because the user reduced ncpus in cc_config.xml)
it should get to run, but only when it's at the head of the queue.

If it were "||", then the scheduler would never run
two 4-CPU jobs at once on an 8-CPU system, for example.

[email protected] wrote:
               //
>              if (rp->avp->avg_ncpus > 1) {
> -                if (ncpus_used + rp->avp->avg_ncpus >= ncpus+1) {
> +                if (ncpus_used && (ncpus_used + rp->avp->avg_ncpus >=
> ncpus+1)) {
> +                    // the "ncpus_used &&" is to allow running a job that
> uses
> +                    // more than ncpus (this can happen in pathological
> cases)
> +
>                      if (log_flags.cpu_sched_debug) {
>                          msg_printf(rp->project, MSG_INFO,
>                              "[cpu_sched_debug] not enough CPUs for
> multithread job, skipping %s",
> 
> 
> Are you certain that it should not be:
> 
> +                if (!ncpus_used || (ncpus_used + rp->avp->avg_ncpus >=
> ncpus+1)) {
> 
> 
> jm7
> 

_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to