From b156e8820843c32fd7216b5096264e2ccd2b7e2f Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 8 Aug 2013 11:00:29 -0700 Subject: [PATCH] scheduler: sample code for the SSE3 plan class must check for "pni" rather than "sse3"; clients report "pni" --- sched/plan_class_spec.cpp | 2 +- sched/plan_class_spec.xml.sample | 2 +- sched/sched_customize.cpp | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sched/plan_class_spec.cpp b/sched/plan_class_spec.cpp index 456787f4b7..d4a751fdfb 100644 --- a/sched/plan_class_spec.cpp +++ b/sched/plan_class_spec.cpp @@ -812,7 +812,7 @@ int main() { HOST_USAGE hu; - strcpy(sreq.host.p_features, "sse3"); + strcpy(sreq.host.p_features, "pni"); sreq.host.p_fpops =5e9; g_wreq->effective_ncpus = 4; if (1) { diff --git a/sched/plan_class_spec.xml.sample b/sched/plan_class_spec.xml.sample index a5a8337ee7..98279887a4 100644 --- a/sched/plan_class_spec.xml.sample +++ b/sched/plan_class_spec.xml.sample @@ -69,7 +69,7 @@ sse3 - sse3 + pni 1.1 diff --git a/sched/sched_customize.cpp b/sched/sched_customize.cpp index 84c1d2760d..304713002c 100644 --- a/sched/sched_customize.cpp +++ b/sched/sched_customize.cpp @@ -664,15 +664,16 @@ static inline bool app_plan_nci(SCHEDULER_REQUEST&, HOST_USAGE& hu) { // the following is for an app version that requires a processor with SSE3, // and will run 10% faster than the non-SSE3 version +// NOTE: clients return "pni" instead of "sse3" // static inline bool app_plan_sse3( SCHEDULER_REQUEST& sreq, HOST_USAGE& hu ) { downcase_string(sreq.host.p_features); - if (!strstr(sreq.host.p_features, "sse3")) { + if (!strstr(sreq.host.p_features, "pni")) { // Pre-6.x clients report CPU features in p_model // - if (!strstr(sreq.host.p_model, "sse3")) { + if (!strstr(sreq.host.p_model, "pni")) { //add_no_work_message("Your CPU lacks SSE3"); return false; }