Compiling INMOST with ParMETIS on Linux
INMOST may be configured with optional ParMETIS support. In this case INMOST will support calling graph partitioner from ParMETIS package, i.e. you will be able to use Partitioner::Parmetis in Partitioner::SetMethod.
INMOST requires ParMETIS version 4.0 or higher.
To install ParMETIS yourself, download version 4.03 from http://glaros.dtc.umn.edu/gkhome/metis/parmetis/download.
You can do it using the following command:
wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz
Unpack the package with the command
tar -xzf parmetis-4.0.3.tar.gz
Remember the path where you are working:
export home=`pwd`
Open parmetis-4.0.3/CMakeLists.txt
file for edit and replace following two lines:
set(GKLIB_PATH METIS/GKlib CACHE PATH "path to GKlib")
set(METIS_PATH METIS/metis CACHE PATH "path to METIS")
With three following lines:
find_package(MPI)
set(GKLIB_PATH ${CMAKE_SOURCE_DIR}/metis/GKlib CACHE PATH "path to GKlib")
set(METIS_PATH ${CMAKE_SOURCE_DIR}/metis CACHE PATH "path to METIS")
Now cmake would be able to correctly recognize all the paths and to automatically find the MPI library.
Create the parmetis-build
directory and run the following commands from it:
cmake ../parmetis-4.0.3/. && make
Once you have compiled ParMETIS, provide the following options to CMake configure script of INMOST:
cmake -DUSE_SOLVER_METIS=ON \
-DUSE_PARTITIONER_PARMETIS=ON \
-DMETIS_LIBRARY="$home/parmetis-build/libmetis/libmetis.a" \
-DMETIS_INCLUDE_DIR="$home/parmetis-4.0.3/metis/include" \
-DPARMETIS_LIBRARY="$home/parmetis-library/libparmetis/libparmetis.a" \
-DPARMETIS_INCLUDE_DIR="$home/parmetis-4.0.3/include"
Install ParMETIS with PETSc
PETSc installation guideconfigure
script just add --download-metis --download-parmetis
like this:
cd "$INMOST_ROOT"
wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.5.2.tar.gz
tar zxf petsc-lite-3.5.2.tar.gz
cd petsc-3.5.2
export PETSC_DIR="`pwd`"
export PETSC_ARCH=linux-gnu-debug
./configure --download-metis --download-parmetis
cd "$INMOST_ROOT"
mkdir -p INMOST-build
cd INMOST-build
cmake -DUSE_PARTITIONER_PARMETIS=ON -DPARMETIS_DIR="$PETSC_DIR/$PETSC_ARCH" ../INMOST-0.1
make all