Compilation guide for INMOST with Zoltan on Windows
INMOST may be configured with optional Zoltan support. In this case INMOST will support calling graph partitioners from Zoltan package, i.e. you will be able to use Partitioner::Zoltan_RCB, Partitioner::Zoltan_RIB, Partitioner::Zoltan_HSFC, Partitioner::Zoltan_PHG in Partitioner::SetMethod.
If you also provide Parmetis or Scotch libraries to Zoltan then you will be able to use Partitioner::Zoltan_Parmetis or Partitioner::Zoltan_Scotch.
This guide requires you to have CMake and Microsoft Visual Studio. Tested with Zoltan within Trilinos 11.12.1.
While you can obtain standalone Zoltan package from official webpage, you would not be able to compile it without Trilinos package.
You can download Trilinos package from http://trilinos.org/download/. Please note that in order to download it you have to provide some basic information about yourself.
After you have downloaded and unarchived Trilinos into "trilinos_source_path" create "zoltan_build_path".
Open cmake-gui application and enter trilinos_source_path into the field to the right from "Where is the source code" text and zoltan_build_path into the field to the right from "Where to build the binaries".
Then as Zoltan guide suggests click "Add Entry" button and add following entries:
Trilinos_ENABLE_ALL_PACKAGES as BOOL with unset checkbox
Trilinos_ENABLE_ZOLTAN as BOOL with set checkbox
If you wish to use Zoltan in parallel with MPI then add
TPL_ENABLE_MPI as BOOL with set checkbox
In case you use custom MPI library that is not detectable by CMake you will have to provide "MPI_INCLUDE_PATH" variable as well. Add
MPI_INCLUDE_PATH as PATH with path to include directory of your MPI library
Since Fortran is not required to compile Zoltan disable it by setting
Trilinos_ENABLE_Fortran as BOOL with unset checkbox
You can also specify additionally data type used inside zoltan by providing
Zoltan_ENABLE_UINT_IDS as BOOL with set checkbox for unsigned int type or
Zoltan_ENABLE_ULONG_IDS as BOOL with set checkbox for unsigned long type or
Zoltan_ENABLE_ULLONG_IDS as BOOL with set checkbox for unsigned long long type
As a result you will have the following set of options as on picture below.
Click "Configure" and select Visual Studio as compiler.
After CMake have successfully finished the configuration you should see the following output
Then enter your zoltan_build_path directory and open Trilinos.sln generated solution file for Visual Studio.
Open "Build/Configuration Manager".
Change from "Debug" to "Release" compilation mode.
Hit F7, after some time you should see successful compilation.
After successful compilation provide path for INMOST library.
Now we should run installation script. In order to do that create zoltan_build_path/install directory. Then open CMake and fill two fields
CMAKE_INSTALL_PREFIX of type PATH with zoltan_build_path/install
Trilinos_INSTALLATION_DIR of type PATH with zoltan_build_path/install
Then click "Configure" and "Generate".
Return to Visual Studio. There click "View/Solution Explorer".
In "Solution Explorer" right click on "INSTALL" project and click "Build".
In output you should see that all required header files and libraries were copied to trilinos_build_path/install directory.
Open CMake again 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.
First activate USE_PARTITIONER_ZOLTAN checkbox. Then add two entries through "Add Entry" button:
ZOLTAN_INCLUDE_DIR of type PATH pointing to zoltan_build_path/install/include
ZOLTAN_LIBRARY of type FILEPATH pointing to zoltan_build_path/install/lib/zoltan.lib
Your options should match with the options on picture below.
Then click "Configure" and "Generate".
Now if you will try to compile INMOST library with Zoltan it will complain that included file "zoltan_types.h" includes absent file "unistd.h". You can safely change "unistd.h" to "io.h" and proceed with compilation.