This is only a temporary fix, and bug 416 should stay open until resolved.
int natoms_force,int natoms_f_novirsum);
/* Set the number of cg's and atoms for the force calculation */
-extern bool can_use_allvsall(const t_inputrec *ir,
+extern bool can_use_allvsall(const t_inputrec *ir, const gmx_mtop_t *mtop,
bool bPrintNote,t_commrec *cr,FILE *fp);
/* Returns if we can use all-vs-all loops.
* If bPrintNote==TRUE, prints a note, if necessary, to stderr
);
}
- if (can_use_allvsall(inputrec,TRUE,cr,fplog))
+ if (can_use_allvsall(inputrec,mtop,TRUE,cr,fplog))
{
/* All-vs-all loops do not work with domain decomposition */
Flags |= MD_PARTDEC;
return cutoff;
}
-bool can_use_allvsall(const t_inputrec *ir,
+bool can_use_allvsall(const t_inputrec *ir, const gmx_mtop_t *mtop,
bool bPrintNote,t_commrec *cr,FILE *fp)
{
bool bAllvsAll;
bAllvsAll = FALSE;
#else
bAllvsAll =
- (ir->rlist==0 &&
+ (
+ /* disable for very small systems (bug 416) */
+ mtop->natoms > 64 &&
+ ir->rlist==0 &&
ir->rcoulomb==0 &&
ir->rvdw==0 &&
ir->ePBC==epbcNONE &&
fr->sc_sigma6 = pow(ir->sc_sigma,6);
/* Check if we can/should do all-vs-all kernels */
- fr->bAllvsAll = can_use_allvsall(ir,FALSE,NULL,NULL);
+ fr->bAllvsAll = can_use_allvsall(ir,mtop,FALSE,NULL,NULL);
fr->AllvsAll_work = NULL;
fr->AllvsAll_workgb = NULL;
init_parallel(fplog, cr, inputrec, mtop, state);
}
- if (can_use_allvsall(inputrec,TRUE,cr,fplog))
+ if (can_use_allvsall(inputrec,mtop,TRUE,cr,fplog))
{
/* All-vs-all loops do not work with domain decomposition */
Flags |= MD_PARTDEC;