Instead of a segv, mdrun now gives an error msg if npme>np, fixes #795
Change-Id: I2e93bccf45ace215d6237354559b8750628a13d6
if (cr->npmenodes > dd->nnodes)
{
gmx_fatal_collective(FARGS,cr,NULL,
- "The number of separate PME node (%d) is larger than the number of PP nodes (%d), this is not supported.",cr->npmenodes,dd->nnodes);
+ "The number of separate PME nodes (%d) is larger than the number of PP nodes (%d), this is not supported.",cr->npmenodes,dd->nnodes);
}
if (cr->npmenodes > 0)
{
{
int d,ndiv;
+ if (n <= 0)
+ {
+ gmx_fatal(FARGS, "Can only factorize positive integers.");
+ }
+
/* Decompose n in factors */
snew(*fac,n/2);
snew(*mfac,n/2);
gmx_fatal(FARGS,
"Can not have separate PME nodes with 2 or less nodes");
}
+ if (cr->npmenodes >= cr->nnodes)
+ {
+ gmx_fatal(FARGS,
+ "Can not have %d separate PME nodes with just %d total nodes",
+ cr->npmenodes, cr->nnodes);
+ }
/* If the user purposely selected the number of PME nodes,
* only check for large primes in the PP node count.