|
|
Compilation guide for INMOST on Windows
|
|
|
=====
|
|
|
|
|
|
Please share any issues with this compilation guide at [https://github.com/INMOST-DEV/INMOST/issues](https://github.com/INMOST-DEV/INMOST/issues)
|
|
|
Download source archive from https://github.com/INMOST-DEV/INMOST/releases and unpack it.
|
|
|
|
|
|
Create new directory for building process.
|
|
|
|
|
|
Download source archive from https://github.com/INMOST-DEV/INMOST/releases and unpack it into inmost_source_path.
|
|
|
Start CMake-gui application and select the above two directories as source and build paths respectively, then press `Configure` button. Select your Visual Studio compiler version and press `Finish`.
|
|
|
If configuration goes successfully, press `Generate` button.
|
|
|
|
|
|
The build directory will be populated with Visual Studio solution file. Open it in Visual Studio and select Build Solution.
|
|
|
|
|
|
Create new folder for building purposes. We will refere to it inmost_build_path.
|
|
|
Optionally we can compile included examples and tests.
|
|
|
Open CMake-gui, open your build path, and turn on check-boxes `COMPILE_EXAMPLES` and `COMPILE_TESTS`. Press `Configure`, then `Generate`. Reopen solution in Visual Studio and select Build Solution.
|
|
|
Once everything is complete, select `RUN_TESTS` target in Project explorer, right-click it and select Rebuild.
|
|
|
This will start internal tests.
|
|
|
|
|
|
|
|
|
Start CMake-gui application and enter inmost_source_path into
|
|
|
the field right after the text "Where is the source code".
|
|
|
Enter inmost_build_path into the field to the right from "Where to build the binaries".
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_1.png]]
|
|
|
|
|
|
|
|
|
Click on the "Generate" button. You will be prompted to select the compiler which you would like to use.
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_2.png]]
|
|
|
|
|
|
|
|
|
Select Visual Studio as your compiler and press "Finish". Once configured it will provide you options that are avialible in INMOST.
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_3.png]]
|
|
|
|
|
|
|
|
|
By default `USE_MESH`, `USE_SOLVER`, `USE_PARTITIONER` and `USE_AUTODIFF` checkboxes are activated.
|
|
|
They are related to internal services within INMOST:
|
|
|
|
|
|
|
|
|
* `USE_MESH` provides tools to work with mesh and mesh data in distributed parallel environment.
|
|
|
* `USE_SOLVER` provides capabilities to solve sparse linear algebraic problem Ax=b in distributed parallel environment and can interface with PETSc and Trilinos libraries.
|
|
|
* `USE_PARTITIONER` gives capability to partition the mesh in serial execution and can interface with ParMetis and Zoltan libraries for parallel execution.
|
|
|
* `USE_AUTODIFF` is a tool that automatically constructs Jacobian matrix for nonlinear problem, works in parallel.
|
|
|
|
|
|
|
|
|
You can uncheck any of this checkboxes and click "Configure" again.
|
|
|
|
|
|
|
|
|
There are also several options that allows to extend functionality by using side libraries:
|
|
|
|
|
|
|
|
|
* `USE_PARTITIONER_PARMETIS` activates ParMetis library interface for graph partitioning. Refer to [[compilation guide with ParMetis|0204-Compilation-ParMETIS-Windows]] for further instructions.
|
|
|
* `USE_PARTITIONER_ZOLTAN` activates Zoltan library interface for graph partitioning. Refer to [[compilation guide with Zoltan|0205-Compilation-Zoltan-Windows]] for further instructions.
|
|
|
* `USE_SOLVER_PETSC` that activates PETSc library interface for linear problem solution in parallel. Refer to [[compilation guide with PETSc|0206-Compilation-PETSc-Windows]] for further instructions.
|
|
|
* `USE_SOLVER_TRILINOS` that activates Trilinos library interface for linear problem solution in parallel. Refer to [[compilation guide with Trilinos|0207-Compilation-Trilinos-Windows]] for further instructions.
|
|
|
* `TEST_FORTRAN_ANI3D` test for presence of fortran compiler and compile ANI3D serial solver.
|
|
|
|
|
|
|
|
|
In case CMake detects presence of MPI library then it will also activate the following checkboxes:
|
|
|
|
|
|
|
|
|
* `USE_MPI` compile INMOST for distributed environment.
|
|
|
* `USE_MPI2` that will activate features from MPI-2, this option is provided to you in the case you have MPI-1 library. Then in order to compile INMOST you will have to uncheck this checkbox manually.
|
|
|
* `USE_MPI_FILE` this will activate input-output algorithms using MPI-ROMIO functionality in INMOST. In case your MPI does not have ROMIO you should manualy uncheck this checkbox.
|
|
|
* `USE_MPI_P2P` this will activate point to point algorithms using MPI-RDMA functionality in INMOST. In case your MPI does not have RDMA or your hardware does not support RDMA operations you should manualy uncheck this checkbox.
|
|
|
|
|
|
|
|
|
If your MPI library was not detected automatically you may try providing it manually. Click "Add Entry" button and enter:
|
|
|
|
|
|
|
|
|
* `MPI_INCLUDE_PATH` type `PATH` the path to header files of MPI library.
|
|
|
* `MPI_LIBRARY` type `FILEPATH` the MPI library
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_4.png]]
|
|
|
|
|
|
|
|
|
Then click "Configure" again and in case you see "MPI FOUND" words then you have successfully activated MPI in INMOST.
|
|
|
|
|
|
|
|
|
MPI is not required for INMOST to work. You may uncheck the checkbox USE_MPI if you don't plan to use INMOST library in parallel. In this case all parallel algorithms would be deactivated.
|
|
|
|
|
|
|
|
|
You may also set two checkboxes:
|
|
|
|
|
|
|
|
|
* `COMPILE_TESTS` that will activate tests for inner functionality. You can get the information about those tests [[here|5000-Testing]].
|
|
|
* `COMPILE_EXAMPLES` that will activate attached examples. You can get the information about those examples [[here|1800-Examples-Shortcuts]].
|
|
|
|
|
|
|
|
|
At last you may setup `CMAKE_INSTALL_PREFIX` variable. By this variable you provide the path where the library and all the relevant header files will be installed. It will also provide instructions for other cmake projects that will have to use INMOST library.
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_5.png]]
|
|
|
|
|
|
|
|
|
Then click "Configure" again and then "Generate". In output you should see the words "Generation done".
|
|
|
|
|
|
|
|
|
Go to your inmost_build_path. You should see there multiple files.
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_6.png]]
|
|
|
|
|
|
|
|
|
Double click on Visual Studio solution file INMOST.sln. Hit F7 to compile library and additional components.
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_7.png]]
|
|
|
|
|
|
|
|
|
After successfull compilation in case you have activated `COMPILE_TESTS` before you may go to "View/Solution Explorer".
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_8.png]]
|
|
|
|
|
|
|
|
|
There you can find "RUN_TESTS" project in the list, right click it and then click build.
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_9.png]]
|
|
|
|
|
|
|
|
|
If everything is fine all testing should end successfully.
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_10.png]]
|
|
|
|
|
|
|
|
|
Now you can install library. Go to "View/Solution Explorer" again. Find "INSTALL" project there, right click on it and then click build.
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_11.png]]
|
|
|
|
|
|
|
|
|
In output window it should report you destination where it installs library, headers and binaries of examples. This destination should match with the one you have provided through `CMAKE_INSTALL_PREFIX`.
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_12.png]]
|
|
|
|
|
|
|
|
|
Now you can check examples and you are ready to use INMOST.
|
|
|
|
|
|
|
|
|
When you are developing your application with INMOST library it is recommended that you use INMOST in Debug mode. This will activate numerous internal checks within INMOST which will help you to narrow the problem. Once you are done you'd better use Release mode. In order to switch the mode go to "Build/Configuration Manager".
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_13.png]]
|
|
|
|
|
|
|
|
|
And there switch from Debug to Release mode.
|
|
|
|
|
|
|
|
|
[[pics/compile_inmost_14.png]] |