ENH: metisDecomp: support for metis-5.1

This commit is contained in:
mattijs
2013-08-05 16:38:16 +01:00
parent 3028224838
commit 40a14a55ed
4 changed files with 67 additions and 3 deletions

39
etc/config/metis.sh Normal file
View File

@ -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 <http://www.gnu.org/licenses/>.
#
# 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
# -----------------------------------------------------------------------------

View File

@ -62,6 +62,11 @@ else
echo
fi
# Try and build metisDecomp (has own logic)
(cd metisDecomp && Allwmake)
wmake $makeType decompositionMethods
wmake $makeType decompose

View File

@ -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

View File

@ -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