Are you certain that the logic in the following code is correct?

Modified: branches/boinc_core_release_6_10/checkin_notes
===================================================================
--- branches/boinc_core_release_6_10/checkin_notes           2010-01-14
20:51:59 UTC (rev 20154)
+++ branches/boinc_core_release_6_10/checkin_notes           2010-01-14
20:55:04 UTC (rev 20155)
@@ -105,3 +105,10 @@

     client/
         cs_prefs.cpp
+
+David  17 Dec 2009
+            - client: there are oddball cases where the client has an app
for which
+                        avg_ncpus > ncpus.   Allow such jobs to run;
otherwise nothing runs.
+
+            client/
+                        cpu_sched.cpp

Modified: branches/boinc_core_release_6_10/client/cpu_sched.cpp
===================================================================
--- branches/boinc_core_release_6_10/client/cpu_sched.cpp
2010-01-14 20:51:59 UTC (rev 20154)
+++ branches/boinc_core_release_6_10/client/cpu_sched.cpp
2010-01-14 20:55:04 UTC (rev 20155)
@@ -1274,7 +1274,10 @@
             // so that a GPU app and a multithread app can run together.
             //
             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