diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake index 9d0acbd618..5cea1fbd5e 100755 --- a/src/parallel/decompose/Allwmake +++ b/src/parallel/decompose/Allwmake @@ -44,7 +44,18 @@ wmakeLnInclude decompositionMethods if [ -n "$SCOTCH_ARCH_PATH" ] then wmake $makeType scotchDecomp - [ -d "$FOAM_LIBBIN/$FOAM_MPI" ] && wmakeMpiLib ptscotchDecomp + + if [ -d "$FOAM_LIBBIN/$FOAM_MPI" ] + then + #- Bit of a hack: ptscotch 6 requires scotch linked as well as. Can be + # removed once ptscotch declares dependency on scotch itself. + if [ "$SCOTCH_VERSION" = "scotch_6.0.0" ] + then + export LINK_FLAGS="-lscotch" + fi + + wmakeMpiLib ptscotchDecomp + fi else echo echo "Skipping scotchDecomp (ptscotchDecomp)" diff --git a/src/parallel/decompose/ptscotchDecomp/Make/options b/src/parallel/decompose/ptscotchDecomp/Make/options index d4e551bcac..acdebd8976 100644 --- a/src/parallel/decompose/ptscotchDecomp/Make/options +++ b/src/parallel/decompose/ptscotchDecomp/Make/options @@ -9,4 +9,4 @@ EXE_INC = \ -I../decompositionMethods/lnInclude LIB_LIBS = \ - -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lscotch -lrt + -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit ${LINK_FLAGS} -lrt