Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
0204 Compilation ParMETIS Windows
Compiling INMOST with ParMETIS on Windows
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 is compatible with ParMETIS version 4.0.3 and is known to compile well with Visual Studio. For version of Visual Studio greater then 2010 please correct the source code of ParMETIS as suggested in https://github.com/INMOST-DEV/INMOST/issues/14.
Download ParMETIS version 4.0.3 from http://glaros.dtc.umn.edu/gkhome/metis/parmetis/download.
ParMETIS installation guide recommends that you visit metis/include/metis.h and choose
IDXTYPEWIDTH and REALTYPEWIDTH to be 32 or 64. If you expect large meshes you may change
IDXTYPEWIDTH to 64.
Create "build" directory where visual studio project will be created.
Open cmake-gui application and enter path to the folder where you have unarchived parmetis source code into the field to right to "Where is the source code" text then provide path to your "build" directory.
Before you click "Configure" button in CMake you have to provide cmake instructions for MPI library.
You can either open CMakeLists.txt in source directory and add
Project(ParMETIS) words, then CMake will try to detect MPI library automatically.
Or you may click "Add Entry" button in CMake application and enter
variable of type path on your own. Note that MPI libraries provided for INMOST library
and ParMETIS library should match.
Click "Configure" and select Visual Studio as your compiler. It is recommended that selected compiler match with compiler for INMOST library.
Then click "Generate".
Open your "build" directory and open generated ParMETIS.sln visual studio solution. Switch from Debug to Release mode in "Build/Configuration Manager" menu. Hit F7 to compile the library.
After successful compilation provide path for INMOST library.
Open cmake-gui and by clicking to black triangle at the right end of the field after "Where to build the binaries" and choose your build directory for INMOST.
Then add four entries through "Add Entry" button:
METIS_INCLUDE_DIR of type
PATH pointing to path_of_parmetis_source/metis/include
METIS_LIBRARY of type
FILEPATH pointing to path_of_parmetis_build/libmetis/Release/libmetis.lib
PARMETIS_INCLUDE_DIR of type
PATH pointing to path_of_parmetis_source/include
PARMETIS_LIBRARY of type
FILEPATH pointing to path_of_parmetis_build/libparmetis/Release/parmetis.lib
As a result you will be able to use Partitioner::Parmetis in Partitioner::SetMethod.