0205 Compilation Zoltan Windows

Kirill Terekhov edited this page Aug 30, 2018 · 5 revisions

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.

The guide below follows recommended steps from Zoltan guide http://www.cs.sandia.gov/zoltan/ug_html/ug_usage.html.

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".

pic1

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

pic2

If you wish to use Zoltan in parallel with MPI then add

TPL_ENABLE_MPI as BOOL with set checkbox

pic3

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

pic4

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.

pic5

Click "Configure" and select Visual Studio as compiler.

pic6

After CMake have successfully finished the configuration you should see the following output

pic7

Then enter your zoltan_build_path directory and open Trilinos.sln generated solution file for Visual Studio.

pic8

Open "Build/Configuration Manager".

pic9

Change from "Debug" to "Release" compilation mode.

pic10

Hit F7, after some time you should see successful compilation.

pic11

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".

pic12

In "Solution Explorer" right click on "INSTALL" project and click "Build".

pic13

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.

pic14

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.

pic15

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.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.