From 355d6c4c4fe3cac198d2a423e1c04cb42c889225 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 19 Jun 2019 08:45:48 +0100 Subject: [PATCH] ENH: scotch: make repeatable. Fixes #1274. --- src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C | 4 ++++ src/parallel/decompose/scotchDecomp/scotchDecomp.C | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index 2845c57c4b..95ae8ed877 100644 --- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C @@ -549,6 +549,10 @@ Foam::label Foam::ptscotchDecomp::decompose } } + + // Make repeatable + SCOTCH_randomReset(); + // Strategy // ~~~~~~~~ diff --git a/src/parallel/decompose/scotchDecomp/scotchDecomp.C b/src/parallel/decompose/scotchDecomp/scotchDecomp.C index f0c51a31d0..b1bf4772cd 100644 --- a/src/parallel/decompose/scotchDecomp/scotchDecomp.C +++ b/src/parallel/decompose/scotchDecomp/scotchDecomp.C @@ -236,6 +236,9 @@ Foam::label Foam::scotchDecomp::decomposeSerial } } + // Make repeatable + SCOTCH_randomReset(); + // Strategy // ~~~~~~~~