Commit 491b3390 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: add build scripts for KaHIP and METIS

parent 6f32862d
......@@ -94,6 +94,19 @@ do
done
# Clean various packages via 'wclean'
for i in libccmio*/Make kahip*/lib/Make
do
[ -d "$i" ] && (
echo
echo "${i%/Make}"
echo " wclean"
echo
cd ${i%/Make} && wclean
)
done
# Clean out-of-source build directories
if [ -d build ]
then
......
......@@ -65,8 +65,7 @@ warnBuildIssues()
warnNotFound()
{
echo " Optional component ($1) was not found"
echo
echo "Optional component ($1) was not found"
}
#------------------------------------------------------------------------------
......@@ -101,7 +100,7 @@ fi
echo
echo ========================================
echo "Build Scotch decomposition library $SCOTCH_VERSION"
echo "Scotch decomposition ($SCOTCH_VERSION)"
echo " $SCOTCH_ARCH_PATH"
SCOTCH_SOURCE_DIR=$sourceBASE/$SCOTCH_VERSION
......@@ -113,8 +112,8 @@ if [ -f $SCOTCH_ARCH_PATH/include/scotch.h \
-a -r $FOAM_EXT_LIBBIN/libscotch.so \
-a -r $FOAM_EXT_LIBBIN/libscotcherrexit.so ]
then
echo " scotch header in $SCOTCH_ARCH_PATH/include"
echo " scotch libs in $FOAM_EXT_LIBBIN"
echo " scotch include: $SCOTCH_ARCH_PATH/include"
echo " scotch library: $FOAM_EXT_LIBBIN"
elif [ -d "$SCOTCH_SOURCE_DIR" ]
then
(
......@@ -176,15 +175,15 @@ if [ "${FOAM_MPI:-dummy}" != dummy ] && \
then
echo
echo ========================================
echo "Build pt-scotch decomposition library $SCOTCH_VERSION (with $FOAM_MPI)"
echo "pt-scotch decomposition ($SCOTCH_VERSION with $FOAM_MPI)"
echo " $SCOTCH_ARCH_PATH"
if [ -f $SCOTCH_ARCH_PATH/include/$FOAM_MPI/ptscotch.h \
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotch.so \
-a -r $FOAM_EXT_LIBBIN/$FOAM_MPI/libptscotcherrexit.so ]
then
echo " ptscotch header in $SCOTCH_ARCH_PATH/include/$FOAM_MPI"
echo " ptscotch libs in $FOAM_EXT_LIBBIN/$FOAM_MPI"
echo " ptscotch include: $SCOTCH_ARCH_PATH/include/$FOAM_MPI"
echo " ptscotch library: $FOAM_EXT_LIBBIN/$FOAM_MPI"
else
(
cd $SCOTCH_SOURCE_DIR/src || exit 1
......@@ -239,55 +238,46 @@ fi
#------------------------------------------------------------------------------
# Metis is optional
echo
echo ========================================
echo Build Metis decomposition
# Get METIS_VERSION, METIS_ARCH_PATH
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
# Get KAHIP_ARCH_PATH
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/kahip)
then
. $settings
fi
if [ -n "$KAHIP_ARCH_PATH" ]
then
echo KaHIP decomposition
./makeKAHIP -test "$KAHIP_ARCH_PATH" || \
./makeKAHIP || warnBuildIssues KAHIP
else
warnNotFound KAHIP # METIS is optional
fi
METIS_SOURCE_DIR=$sourceBASE/$METIS_VERSION
#------------------------------------------------------------------------------
echo
echo ========================================
if [ -f $METIS_ARCH_PATH/include/metis.h \
-a -r $FOAM_EXT_LIBBIN/libmetis.so ]
# Get METIS_ARCH_PATH
if settings=$($WM_PROJECT_DIR/bin/foamEtcFile config.sh/metis)
then
echo " metis header in $METIS_ARCH_PATH/include"
echo " metis libs in $FOAM_EXT_LIBBIN"
elif [ -d "$METIS_SOURCE_DIR" ]
. $settings
fi
if [ -n "$METIS_ARCH_PATH" ]
then
(
cd $METIS_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
rm -rf $METIS_ARCH_PATH
# Adjust metis integer size to match OpenFOAM label-size
sed -i -e 's=\(#define IDXTYPEWIDTH\).*=\1 '$WM_LABEL_SIZE'=' \
include/metis.h
# No config option for the library location.
# - build normally and use mv to relocate it
make config shared=1 prefix=$METIS_ARCH_PATH \
&& make -j $WM_NCOMPPROCS install \
&& mv $METIS_ARCH_PATH/lib/libmetis.so $FOAM_EXT_LIBBIN
rmdir $METIS_ARCH_PATH/lib 2>/dev/null || true # Failed rmdir is uncritical
) || warnBuildIssues METIS
echo Metis decomposition
./makeMETIS -test "$METIS_ARCH_PATH" || \
./makeMETIS || warnBuildIssues METIS
else
warnNotFound METIS
warnNotFound METIS # METIS is optional
fi
#------------------------------------------------------------------------------
echo
echo ========================================
echo Build CGAL
if [ -n "$CGAL_ARCH_PATH" ]
then
echo "CGAL/boost"
./makeCGAL -test "$CGAL_ARCH_PATH" "$BOOST_ARCH_PATH" || \
./makeCGAL || warnBuildIssues CGAL
else
......@@ -296,9 +286,9 @@ fi
echo
echo ========================================
echo Build FFTW
if [ -n "$FFTW_ARCH_PATH" ]
then
echo FFTW
./makeFFTW -test "$FFTW_ARCH_PATH" || \
./makeFFTW || warnBuildIssues FFTW
else
......
......@@ -109,7 +109,7 @@ ThirdParty components prior to building OpenFOAM itself.
- This will be automatically invoked by the top-level OpenFOAM `Allwmake`, but
can also be invoked directly to find possible build errors.
- Builds an mpi library (openmpi or mpich), scotch decomposition, boost, CGAL, FFTW.
- If the optional metis directory is found, it will also be compiled.
- If the optional kahip or metis directories are found, they will also be compiled.
4. `makeParaView` *(optional but highly recommended)*
- This is optional, but extremely useful for visualization and for
run-time post-processing function objects.
......@@ -122,16 +122,26 @@ ThirdParty components prior to building OpenFOAM itself.
#### Optional Components
`makeADIOS`
- Only required for ADIOS support,
- Only required for [ADIOS](#parallel) support,
which is currently staged in the [add-ons repository][link AddOns].
`makeCGAL`
- Builds third-party boost and CGAL.
- Builds [boost](#general-packages) and [CGAL](#general-packages).
Automatically invoked from the ThirdParty `Allwmake`,
but can be invoked directly to resolve possible build errors.
`makeFFTW`
- Builds third-party FFTW.
- Builds [FFTW](#general-packages).
Automatically invoked from the ThirdParty `Allwmake`,
but can be invoked directly to resolve possible build errors.
`makeKAHIP`
- Builds [KaHIP](#parallel) decomposition library.
Automatically invoked from the ThirdParty `Allwmake`,
but can be invoked directly to resolve possible build errors.
`makeMETIS`
- Builds [METIS](#parallel) decomposition library.
Automatically invoked from the ThirdParty `Allwmake`,
but can be invoked directly to resolve possible build errors.
......@@ -147,11 +157,11 @@ ThirdParty components prior to building OpenFOAM itself.
`makeMesa`, `makeVTK`
- Additional support for building offscreen rendering components.
Useful if you want to render on computer servers without graphics cards.
The `makeParaView.example` and `makeVTK.example` files provide some useful
The `makeParaView.example` and `makeVTK.example` files offer some
suggestions about compiling such a configuration.
`makeQt`
- Script to build a [third-party installation of Qt](#makeQt), including qmake.
- Script to build a [Qt](#makeQt), including qmake.
- Possibly needed for `makeParaView`.
- The associated `etc/relocateQt` may be of independent use.
Read the file for more details.
......@@ -312,15 +322,6 @@ GNU *configure* can only be used prior to clang version 3.9.
| [llvm][page llvm] | [download][link llvm]
### Parallel Processing <a name="parallel"></a>
| Name | Location
|-----------------------|------------------------
| [adios][page adios] | [repo][repo adios] or [github download][link adios] or [alt download][altlink adios]
| [scotch, ptscotch][page scotch] | [download][link scotch]
| [openmpi][page openmpi] | [download][link openmpi]. The newer [openmpi][newer openmpi] make exhibit stability issues.
### General <a name="general-packages"></a>
| Name | Location
......@@ -334,6 +335,17 @@ GNU *configure* can only be used prior to clang version 3.9.
| gperftools | [repo][repo gperftools] or [download][link gperftools]
### Parallel Processing <a name="parallel"></a>
| Name | Location
|-----------------------|------------------------
| [openmpi][page openmpi] | [download][link openmpi]. The newer [openmpi][newer openmpi] make exhibit stability issues.
| [adios][page adios] | [repo][repo adios] or [github download][link adios] or [alt download][altlink adios]
| [scotch, ptscotch][page scotch] | [download][link scotch]
| [kahip][page kahip] | [download][link kahip]
| [metis][page metis] | [download][link metis]
### Visualization <a name="viz-version"></a>
| Name | Location
......@@ -405,6 +417,12 @@ The minimum gcc/g++ requirements for building various components.
[page scotch]: https://www.labri.fr/perso/pelegrin/scotch/
[link scotch]: https://gforge.inria.fr/frs/download.php/file/34099/scotch_6.0.3.tar.gz
[page kahip]: http://algo2.iti.kit.edu/documents/kahip/
[link kahip]: http://algo2.iti.kit.edu/schulz/software_releases/KaHIP_2.00.tar.gz
[page metis]: http://glaros.dtc.umn.edu/gkhome/metis/metis/overview
[link metis]: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
[page openmpi]: http://www.open-mpi.org/
[link openmpi]: https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.4.tar.bz2
[newer openmpi]: https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.bz2
......@@ -452,7 +470,7 @@ The minimum gcc/g++ requirements for building various components.
<!-- OpenFOAM -->
[link AddOns]: https://develop.openfoam.com/Community/OpenFOAM-addOns
[link community-projects]: http://www.openfoam.com/services/community-projects.php
[link community-projects]: http://www.openfoam.com/community/projects.php
<!-- Standard Footer -->
......@@ -460,8 +478,8 @@ The minimum gcc/g++ requirements for building various components.
- [Community AddOns][link AddOns] repository
- [Collaborative and Community-based Developments][link community-projects]
- [Download](http://www.openfoam.com/releases) and
[installation instructions](http://www.openfoam.com/download/installation.php)
- [Download](http://www.openfoam.com/download) and
[installation instructions](http://www.openfoam.com/code/build-guide.php)
- [Documentation](http://www.openfoam.com/documentation)
- [Reporting bugs/issues](http://www.openfoam.com/code/bug-reporting.php) (including bugs/suggestions/feature requests) in OpenFOAM+
- [Contacting OpenCFD](http://www.openfoam.com/contact)
......
/* NOTE: make any changes to this file in etc/wmakeFiles/ */
interface/kaHIP_interface.cpp
/* List obtained from SConscript, libkaffpa_files = [ ... ] entry */
data_structure/graph_hierarchy.cpp
algorithms/strongly_connected_components.cpp
algorithms/topological_sort.cpp
algorithms/push_relabel.cpp
io/graph_io.cpp
tools/quality_metrics.cpp
tools/random_functions.cpp
tools/graph_extractor.cpp
tools/misc.cpp
tools/partition_snapshooter.cpp
partition/graph_partitioner.cpp
partition/w_cycles/wcycle_partitioner.cpp
partition/coarsening/coarsening.cpp
partition/coarsening/contraction.cpp
partition/coarsening/edge_rating/edge_ratings.cpp
partition/coarsening/matching/matching.cpp
partition/coarsening/matching/random_matching.cpp
partition/coarsening/matching/gpa/path.cpp
partition/coarsening/matching/gpa/gpa_matching.cpp
partition/coarsening/matching/gpa/path_set.cpp
partition/coarsening/clustering/node_ordering.cpp
partition/coarsening/clustering/size_constraint_label_propagation.cpp
partition/initial_partitioning/initial_partitioning.cpp
partition/initial_partitioning/initial_partitioner.cpp
partition/initial_partitioning/initial_partition_bipartition.cpp
partition/initial_partitioning/initial_refinement/initial_refinement.cpp
partition/initial_partitioning/bipartition.cpp
partition/initial_partitioning/initial_node_separator.cpp
partition/uncoarsening/uncoarsening.cpp
partition/uncoarsening/separator/area_bfs.cpp
partition/uncoarsening/separator/vertex_separator_algorithm.cpp
partition/uncoarsening/separator/vertex_separator_flow_solver.cpp
partition/uncoarsening/refinement/cycle_improvements/greedy_neg_cycle.cpp
partition/uncoarsening/refinement/cycle_improvements/problem_factory.cpp
partition/uncoarsening/refinement/cycle_improvements/augmented_Qgraph.cpp
partition/uncoarsening/refinement/mixed_refinement.cpp
partition/uncoarsening/refinement/label_propagation_refinement/label_propagation_refinement.cpp
partition/uncoarsening/refinement/refinement.cpp
partition/uncoarsening/refinement/quotient_graph_refinement/2way_fm_refinement/two_way_fm.cpp
partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement/two_way_flow_refinement.cpp
partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement/boundary_bfs.cpp
partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement/flow_solving_kernel/cut_flow_problem_solver.cpp
partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement/most_balanced_minimum_cuts/most_balanced_minimum_cuts.cpp
partition/uncoarsening/refinement/quotient_graph_refinement/quotient_graph_refinement.cpp
partition/uncoarsening/refinement/quotient_graph_refinement/complete_boundary.cpp
partition/uncoarsening/refinement/quotient_graph_refinement/partial_boundary.cpp
partition/uncoarsening/refinement/quotient_graph_refinement/quotient_graph_scheduling/quotient_graph_scheduling.cpp
partition/uncoarsening/refinement/quotient_graph_refinement/quotient_graph_scheduling/simple_quotient_graph_scheduler.cpp
partition/uncoarsening/refinement/quotient_graph_refinement/quotient_graph_scheduling/active_block_quotient_graph_scheduler.cpp
partition/uncoarsening/refinement/kway_graph_refinement/kway_graph_refinement.cpp
partition/uncoarsening/refinement/kway_graph_refinement/kway_graph_refinement_core.cpp
partition/uncoarsening/refinement/kway_graph_refinement/kway_graph_refinement_commons.cpp
partition/uncoarsening/refinement/cycle_improvements/augmented_Qgraph_fabric.cpp
partition/uncoarsening/refinement/cycle_improvements/advanced_models.cpp
partition/uncoarsening/refinement/kway_graph_refinement/multitry_kway_fm.cpp
partition/uncoarsening/refinement/node_separators/greedy_ns_local_search.cpp
partition/uncoarsening/refinement/node_separators/fm_ns_local_search.cpp
partition/uncoarsening/refinement/node_separators/localized_fm_ns_local_search.cpp
algorithms/cycle_search.cpp
partition/uncoarsening/refinement/cycle_improvements/cycle_refinement.cpp
partition/uncoarsening/refinement/tabu_search/tabu_search.cpp
LIB = $(FOAM_EXT_LIBBIN)/libkahip
/*
* NOTE: make any changes to this file in etc/wmakeFiles/
* Must use -DNDEBUG to disable kahip debug mode.
* Using -DMODE_NODESEP is not strictly required for building the library.
*/
EXE_INC = \
${c++LESSWARN} \
-DNDEBUG -DMODE_NODESEP \
-I$(KAHIP_LIB_SRC) \
-I$(KAHIP_LIB_SRC)/partition \
-I$(KAHIP_LIB_SRC)/partition/uncoarsening/refinement/quotient_graph_refinement/flow_refinement
LIB_LIBS =
......@@ -111,29 +111,48 @@ CCMIO_ARCH_PATH=$installBASE/$ccmioPACKAGE
# Sources must be available
[ -d "$CCMIO_SOURCE_DIR" ] || die "Missing sources: '$ccmioPACKAGE'"
#
# Manual installation
#
install()
{
# Ensure a clean build next time
wclean
local incdir=$CCMIO_ARCH_PATH/include/libccmio
# Make headers available:
mkdir -m 0755 -p $incdir
/bin/cp -pv libccmio/ccmio*.h $incdir
}
echo "Starting build: $ccmioPACKAGE ($targetType)"
echo
(
cd $CCMIO_SOURCE_DIR || exit 1
export GIT_DIR=$PWD/.git # Mask seeing our own git-repo
incDIR=$CCMIO_ARCH_PATH/include/libccmio
libDIR=$CCMIO_ARCH_PATH/lib
rm -rf $CCMIO_ARCH_PATH
rm -f $FOAM_EXT_LIBBIN/libccmio.so
mkdir -p $incDIR 2>/dev/null
mkdir -p $libDIR 2>/dev/null
libdir=$CCMIO_ARCH_PATH/lib
cpMakeFiles libccmio 2>/dev/null
# Place static libraries in sub-directory:
if [ "$targetType" = lib ]
then
export FOAM_EXT_LIBBIN=$libDIR
mkdir -m 0755 -p $libdir 2>/dev/null
export FOAM_EXT_LIBBIN=$libdir
fi
if wmake $targetType
then
# Make headers available:
/bin/cp -pv libccmio/ccmio*.h $incDIR
fi
)
wmake -j $WM_NCOMPPROCS -s $targetType \
&& echo "Built: ccmio" \
&& install
) || {
echo "Error building: ccmio"
exit 1
}
#------------------------------------------------------------------------------
......@@ -44,8 +44,8 @@ then
dir="$2" # <- CGAL_ARCH_PATH
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libCGAL.so" ]
then
echo " CGAL headers in $dir/include"
echo " CGAL libs in $dir/lib$WM_COMPILER_LIB_ARCH"
echo " CGAL include: $dir/include"
echo " CGAL library: $dir/lib$WM_COMPILER_LIB_ARCH"
# Additional information about boost
dir="$3" # <- BOOST_ARCH_PATH
for root in "$dir" /usr
......@@ -53,8 +53,8 @@ then
if [ -d "$root/include/boost" \
-a -r "$root/lib$WM_COMPILER_LIB_ARCH/libboost_system.so" ]
then
echo " BOOST headers in $root/include"
echo " BOOST libs in $root/lib$WM_COMPILER_LIB_ARCH"
echo " boost include: $root/include"
echo " boost library: $root/lib$WM_COMPILER_LIB_ARCH"
break
fi
done
......
......@@ -38,8 +38,8 @@ then
dir="$2" # <- FFTW_ARCH_PATH
if [ -d "$dir/include" -a -r "$dir/lib$WM_COMPILER_LIB_ARCH/libfftw3.so" ]
then
echo " FFTW headers in $dir/include"
echo " FFTW libs in $dir/lib$WM_COMPILER_LIB_ARCH"
echo " fftw include: $dir/include"
echo " fftw library: $dir/lib$WM_COMPILER_LIB_ARCH"
exit 0
else
exit 2
......
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017 OpenCFD Ltd.
# \\/ 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/>.
#
# Script
# makeKAHIP
#
# Description
# Build the KaHIP library (int32 only).
#
# ----------------------------------------------
# NO USER-CONFIGURABLE SETTINGS WITHIN THIS FILE
#------------------------------------------------------------------------------
# Short-circuit test for an installation
if [ "$1" = "-test" ]
then
[ "$#" -eq 2 ] || { echo "${0##*/} -test : needs 1 argument"; exit 1; }
dir="$2" # <- KAHIP_ARCH_PATH
if [ -d "$dir/include" ]
then
for lib in \
$FOAM_EXT_LIBBIN/libkahip.so \
$dir/lib/libkahip.a \
$dir/lib/libkahip.so \
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip.a \
$dir/lib$WM_COMPILER_LIB_ARCH/libkahip.so \
;
do
if [ -r "$lib" ]
then
echo " kahip include: $dir/include"
echo " kahip library: ${lib%/*}"
exit 0
fi
done
fi
exit 2
fi
#------------------------------------------------------------------------------
# Run from third-party directory only
cd ${0%/*} && wmakeCheckPwd "$WM_THIRD_PARTY_DIR" 2>/dev/null || {
echo "Error (${0##*/}) : not located in \$WM_THIRD_PARTY_DIR"
echo " Check your OpenFOAM environment and installation"
exit 1
}
[ -n "$FOAM_EXT_LIBBIN" ] || {
echo "Error (${0##*/}) : \$FOAM_EXT_LIBBIN not set"
echo " Check your OpenFOAM environment and installation"
exit 1
}
. etc/tools/ThirdPartyFunctions
#------------------------------------------------------------------------------
_foamEtc config.sh/kahip
kahipPACKAGE=${KAHIP_VERSION:-kahip-system}
targetType=libso
#------------------------------------------------------------------------------
usage()
{
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
/bin/cat<<USAGE
Usage: ${0##*/} [OPTION] [lib|libso] [kahip-VERSION]
options:
-gcc Force gcc/g++ instead of the values from \$WM_CC, \$WM_CXX
-help
* Compile KaHIP
$kahipPACKAGE
USAGE
exit 1
}
#------------------------------------------------------------------------------
# Parse options
while [ "$#" -gt 0 ]
do
case "$1" in
'') ;; # Ignore empty
-h | -help) usage ;;
-gcc) useGcc ;;
lib|libso)
targetType="$1"
;;
kahip-[1-9]* | kahip-git)
kahipPACKAGE="${1%%/}"
unset KAHIP_ARCH_PATH # Avoid inconsistency
;;
*)
die "unknown option/argument: '$1'"
;;
esac
shift
done
[ -n "$kahipPACKAGE" ] || die "The kahip-VERSION was not specified"
# Nothing to build
if _foamIsNone $kahipPACKAGE
then
echo "Using kahip-none (skip ThirdParty build of KAHIP)"
exit 0
elif _foamIsSystem $kahipPACKAGE
then
echo "Using kahip-system"
exit 0
fi
#------------------------------------------------------------------------------
#
# Build KaHIP
#
# KAHIP_ARCH_PATH : installation directory
# KAHIP_SOURCE_DIR : location of the original sources
KAHIP_SOURCE_DIR=$sourceBASE/$kahipPACKAGE
KAHIP_ARCH_PATH=$installBASE/$kahipPACKAGE
[ -d "$KAHIP_SOURCE_DIR" ] || {
echo "Missing sources: '$kahipPACKAGE'"
exit 1
}
#
# Manual installation
#
install()
{
# Ensure a clean build next time
wclean
local bindir=$KAHIP_ARCH_PATH/bin
local incdir=$KAHIP_ARCH_PATH/include
local libdir=$KAHIP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
mkdir -m 0755 -p $incdir
/bin/cp -pv \
$KAHIP_SOURCE_DIR/interface/kaHIP_interface.h \
$incdir
}
echo "Starting build: $kahipPACKAGE ($targetType)"
echo
(
cd $KAHIP_SOURCE_DIR/lib || exit 1
export GIT_DIR=$KAHIP_SOURCE_DIR/.git # Mask seeing our own git-repo
rm -rf $KAHIP_ARCH_PATH
rm -f $FOAM_EXT_LIBBIN/libkahip.so
libdir=$KAHIP_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH
cpMakeFiles kahip 2>/dev/null
if [ -e ../interface -a ! -e interface ]
then
ln -s ../interface interface
fi
# Place static libraries in sub-directory:
if [ "$targetType" = lib ]
then
mkdir -m 0755 -p $libdir 2>/dev/null