diff --git a/etc/config/metis.sh b/etc/config/metis.sh new file mode 100644 index 0000000000..af7efde3ac --- /dev/null +++ b/etc/config/metis.sh @@ -0,0 +1,39 @@ +#----------------------------------*-sh-*-------------------------------------- +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation +# \\/ M anipulation | +#------------------------------------------------------------------------------ +# License +# This file is part of OpenFOAM. +# +# OpenFOAM is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenFOAM. If not, see . +# +# File +# config/metis.sh +# +# Description +# Setup file for metis include/libraries. +# Sourced during wmake process only. +# +# Note +# A csh version is not needed, since the values here are only sourced +# during the wmake process +#------------------------------------------------------------------------------ + +export METIS_VERSION=metis-5.1.0 +export METIS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$METIS_VERSION + +# ----------------------------------------------------------------------------- diff --git a/src/parallel/decompose/Allwmake b/src/parallel/decompose/Allwmake index 5cea1fbd5e..3b10cc617e 100755 --- a/src/parallel/decompose/Allwmake +++ b/src/parallel/decompose/Allwmake @@ -62,6 +62,11 @@ else echo fi + +# Try and build metisDecomp (has own logic) +(cd metisDecomp && Allwmake) + + wmake $makeType decompositionMethods wmake $makeType decompose diff --git a/src/parallel/decompose/metisDecomp/Allwmake b/src/parallel/decompose/metisDecomp/Allwmake new file mode 100755 index 0000000000..a97d63a93b --- /dev/null +++ b/src/parallel/decompose/metisDecomp/Allwmake @@ -0,0 +1,21 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +makeType=${1:-libso} + +# get METIS_VERSION, METIS_ARCH_PATH +if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/metis.sh` +then + . $settings + echo "using METIS_ARCH_PATH=$METIS_ARCH_PATH" + if [ -r $METIS_ARCH_PATH/lib/libmetis.so ] + then + wmake $makeType + fi +else + echo + echo "Error: no config/metis.sh settings" + echo +fi + + +# ----------------------------------------------------------------- end-of-file diff --git a/src/parallel/decompose/metisDecomp/Make/options b/src/parallel/decompose/metisDecomp/Make/options index a6a0f1433e..d4dfa96ba2 100644 --- a/src/parallel/decompose/metisDecomp/Make/options +++ b/src/parallel/decompose/metisDecomp/Make/options @@ -1,7 +1,6 @@ EXE_INC = \ - -I$(WM_THIRD_PARTY_DIR)/metis-5.0pre2/include \ - -I../../dummyThirdParty/metisDecomp /* location of dummy metis.h */ \ + -I$(METIS_ARCH_PATH)/include \ -I../decompositionMethods/lnInclude LIB_LIBS = \ - -L$(FOAM_EXT_LIBBIN) -lmetis -lGKlib + -L$(METIS_ARCH_PATH)/lib -lmetis