diff --git a/client/cpu_sched.C b/client/cpu_sched.C index e532653deb..9cb539a149 100644 --- a/client/cpu_sched.C +++ b/client/cpu_sched.C @@ -473,6 +473,7 @@ void CLIENT_STATE::schedule_cpus() { double expected_pay_off; unsigned int i; double rrs = runnable_resource_share(); + double ncpus_used; if (log_flags.cpu_sched_debug) { msg_printf(0, MSG_INFO, "[cpu_sched_debug] schedule_cpus(): start"); @@ -513,7 +514,7 @@ void CLIENT_STATE::schedule_cpus() { #ifdef SIM if (!cpu_sched_rr_only) { #endif - double ncpus_used = 0; + ncpus_used = 0; while (ncpus_used < ncpus) { rp = earliest_deadline_result(); if (!rp) break; diff --git a/client/sim.h b/client/sim.h index c0b127f646..ccc9f5daa9 100644 --- a/client/sim.h +++ b/client/sim.h @@ -177,7 +177,7 @@ private: bool enforce_schedule(); bool no_work_for_a_cpu(); void rr_simulation(); - void make_running_task_heap(vector&); + void make_running_task_heap(vector&, double&); void print_deadline_misses(); public: double retry_shmem_time;