diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index 72f79977ec..2845c57c4b 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 e5da307cf7..f0c51a31d0 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