Installation
This page describes how to build and install bitpit. It covers both the released and the development versions. bitpit depends on several open source tools and libraries such as cmake, libxml2, lapack, etc. These are expected to be present on the machine on which bitpit is being built.Dependencies
In order to build bitpit you need at least the following software:
- a standard compliant C++ compiler, tested are g++ (>= 8.5.0) and Clang (>= 13.0.1). Recent versions of ICC should work, older versions are discouraged
- CMake (>= 3.13)
Some modules may have additional dependencies, the following software is needed only if the modules that depend on it are compiled:
- libxml2 (required by the IO module)
- lapack and lapacke (required by CG and levelset modules)
- PETSc (>= 3.7.4, required by LA module)
To take advangate of multi-processor systems, bitpit can be compiled, optionally, with parallel support. The parallel implementation of bitpit uses the Message-Passing Interface (MPI). Any MPI implemetation, either OpenMPI, LAM, or MPICH suffice.
Download bipit source code
If you are trying to build a bitpit release, download it from the download page. For the development version, please follow the instructions for checking it out from git.Configure bitpit with CMake
Create a build directory where bitpit will be compiled. It is important to point out the bitpit needs to be always build in a separate build directory. Do not build in the source directory. mkdir $HOME/projects/bitpit-build cd $HOME/projects/bitpit-build
Use ccmake (Curses CMake GUI) from the CMake installed location. CCMake is a Curses based GUI for CMake. To run it go to the build directory and specify as an argument the source directory (<SOURCE_DIR>): ccmake <SOURCE_DIR> The ccmake configuration process is an iterative process. First select settings values and run the configuration (key c). After the configuration, new settings may appear. Select the values for the new settings and run the configration again. Repeat until all values are set and the generate option is available (g key).
Some variables (advanced variables) are not visible right away. To see advanced varables, toggle to advanced mode (t key).
To set a variable, move the cursor to the variable and press enter. If it is a boolean (ON/OFF) it will flip the value. If it is string or file, it will allow editing of the string. For file and directories, the <tab> key can be used to complete.
bitpit settings
- CMAKE_BUILD_TYPE
- Sets the build type.
- ENABLE_MPI
- Controls if bitpit will be compiled with parallel support.
- BUILD_EXAMPLES
- Controls if the examples will be build (examples can be build only if all bitpit modules are compiled).
- PETSC_DIR and PETSC_ARCH
- When compiling a module that depends on the PETSc library, it is necessary to specifty where that library is installed. This can be achived properly setting the CMake variables PETSC_DIR and PETSC_ARCH. PETSC_DIR should point to the location of the PETSc installation, whereas PETSC_ARCH should be set to the specific configuration/build that bitpit should use. When using a self-compiled version of PETSc, the CMake variables PETSC_DIR and PETSC_ARCH should be set to the same values used for PETSc compilation. When using a distro-provided version of PETSc, the CMake variables PETSC_DIR and PETSC_ARCH should be set following the documentation of the distribution.
Build bitpit
After the configuration step, bitpit can be build using the command: make On multi-processor system (let's say two processor), compilation can be done in parallel typing: make -j 2
Install bitpit
bitpit can be installed typing: make install This will install all the relevant files in directories under the CMAKE_INSTALL_PREFIX. The executables are installed in ${CMAKE_INSTALL_PREFIX}/bin and the libraries are installed in ${CMAKE_INSTALL_PREFIX}/lib/bitpit-${major}.${minor}.