diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index c5f652bab4..3090f25e1a 100644 --- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C @@ -718,6 +718,15 @@ Foam::label Foam::ptscotchDecomp::decompose << processorWeights << endl; } + + if (processorWeights.size() != nDomains_) + { + FatalIOErrorInFunction(coeffsDict_) + << "processorWeights not the same size" + << " as the wanted number of domains " << nDomains_ + << exit(FatalIOError); + } + check ( SCOTCH_archCmpltw diff --git a/src/parallel/decompose/scotchDecomp/scotchDecomp.C b/src/parallel/decompose/scotchDecomp/scotchDecomp.C index 348745e786..38667ebf36 100644 --- a/src/parallel/decompose/scotchDecomp/scotchDecomp.C +++ b/src/parallel/decompose/scotchDecomp/scotchDecomp.C @@ -349,6 +349,14 @@ Foam::label Foam::scotchDecomp::decomposeSerial Info<< "scotchDecomp : Using procesor weights " << processorWeights << endl; } + if (processorWeights.size() != nDomains_) + { + FatalIOErrorInFunction(coeffsDict_) + << "processorWeights not the same size" + << " as the wanted number of domains " << nDomains_ + << exit(FatalIOError); + } + check ( SCOTCH_archCmpltw