diff --git a/src/runner_doiact.h b/src/runner_doiact.h index 50dea3852d66369fa6d119fb94ebaf10aadbe52a..411ebb7c1cb510333969d022f7c84b69bf6d069f 100644 --- a/src/runner_doiact.h +++ b/src/runner_doiact.h @@ -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 ); diff --git a/src/scheduler.c b/src/scheduler.c index 62a119ebb938b655242085eeda888f97acc3a2dc..6a33c5c59d8f2f3c4a9c758be76b40ade606f874 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -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 &&