Commit 00f39e51 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

bug in task splitting (too conservative).


Former-commit-id: 4742d869cc1d03ecbb66633fb5ab05269928f16b
parent 40723f2d
......@@ -1731,7 +1731,7 @@ void DOSUB1 ( struct runner *r , struct cell *ci , struct cell *cj , int sid , i
/* Recurse? */
if ( ci->split && cj->split &&
fmaxf( ci->h_max , cj->h_max ) + ci->dx_max + cj->dx_max < h ) {
fmaxf( ci->h_max , cj->h_max )*kernel_gamma + ci->dx_max + cj->dx_max < h ) {
/* Different types of flags. */
switch ( sid ) {
......@@ -2012,7 +2012,7 @@ void DOSUB2 ( struct runner *r , struct cell *ci , struct cell *cj , int sid , i
/* Recurse? */
if ( ci->split && cj->split &&
fmaxf( ci->h_max , cj->h_max ) + ci->dx_max + cj->dx_max < h ) {
fmaxf( ci->h_max , cj->h_max )*kernel_gamma + ci->dx_max + cj->dx_max < h ) {
/* Different types of flags. */
switch ( sid ) {
......@@ -2295,7 +2295,7 @@ void DOSUB_SUBSET ( struct runner *r , struct cell *ci , struct part *parts , in
/* Recurse? */
if ( ci->split && cj->split &&
fmaxf( ci->h_max , cj->h_max ) + ci->dx_max + cj->dx_max < h ) {
fmaxf( ci->h_max , cj->h_max )*kernel_gamma + ci->dx_max + cj->dx_max < h ) {
/* Get the type of pair if not specified explicitly. */
sid = space_getsid( s , &ci , &cj , shift );
......
......@@ -282,8 +282,8 @@ void scheduler_splittasks ( struct scheduler *s ) {
/* Should this task be split-up? */
if ( ci->split && cj->split &&
ci->h_max*kernel_gamma*space_stretch < hi/2 &&
cj->h_max*kernel_gamma*space_stretch < hj/2 ) {
ci->h_max*kernel_gamma*space_stretch < hi &&
cj->h_max*kernel_gamma*space_stretch < hj ) {
/* Replace by a single sub-task? */
if ( scheduler_dosub &&
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment