From 0f7a66e3310443f4164b3fda43ee26c47a4776c1 Mon Sep 17 00:00:00 2001 From: Pedro Gonnet <pedro.gonnet@durham.ac.uk> Date: Sat, 22 Jun 2013 15:00:54 +0000 Subject: [PATCH] more precise estimate of costs for splitting pairs. Former-commit-id: 3a3e0d5d4c6cc076e1e75445d3488f56846e2dc8 --- src/scheduler.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scheduler.c b/src/scheduler.c index da2efefd77..ec8c05993a 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -103,6 +103,9 @@ void scheduler_splittasks ( struct scheduler *s ) { { -1 , -1 , -1 , -1 , -1 , 12 , 10 , 9 } , { -1 , -1 , -1 , -1 , -1 , -1 , 11 , 10 } , { -1 , -1 , -1 , -1 , -1 , -1 , -1 , 12 } }; + float sid_scale[13] = { 0.036f , 0.162f , 0.036f , 0.162f , 0.335f , 0.162f , + 0.036f , 0.162f , 0.036f , 0.162f , 0.335f , 0.162f , + 0.335f }; /* Loop through the tasks... */ // #pragma omp parallel default(none) shared(s,tid,pts,space_subsize) private(ind,j,k,t,t_old,redo,ci,cj,hi,hj,sid,shift) @@ -203,7 +206,7 @@ void scheduler_splittasks ( struct scheduler *s ) { /* Replace by a single sub-task? */ if ( scheduler_dosub && - ci->count < space_subsize && cj->count < space_subsize && + ( ci->count + cj->count ) * sid_scale[sid] < space_subsize && ci->maxdepth - ci->depth < scheduler_maxsubdepth && cj->maxdepth - cj->depth < scheduler_maxsubdepth && sid != 0 && sid != 2 && sid != 6 && sid != 8 ) { -- GitLab