Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 2.4 KB

QMAKE.md

File metadata and controls

47 lines (38 loc) · 2.4 KB

Compilation using qmake

Even though the application does not use QT, it can be compiled using qmake, which provides great integration with QtCreator and is therefore indended for code development. The qmake build system is currently also used for unit testing and CI.

The only required dependency is the wxWidgets library. Optional dependencies are:

  • Catch2 - C++ unit testing framework, only needed to compile and run unit tests
  • Intel Threading Building Blocks - generally improves performance of the code (enabled by use_tbb)
  • OpenMP - alternative to TBB, however it is currently an inferior option (enabled by use_openmp)
  • Eigen - provides additional methods for setting up initial conditions (enabled by use_eigen)
  • ChaiScript allows to read and modify particle data from a script (enabled by use_chaiscript)
  • OpenVDB - used for converting particles to volumetric data, usable by renderers (enabled by use_vdb)
  • HDF5 - allows reading files generated by miluphcuda code (enabled by use_hdf5)

The compilation should be as easy as

mkdir build_version
cd build_version
qmake CONFIG+=version ../sph.pro
make

where version can be one of:

  • release - full-speed version of the code. This is the default option if no build version is specified
  • debug - debugging build with no optimizations (SLOW)
  • assert - build with all optimizations and additional sanity checks
  • profile - full-speed build that measures durations of various segments of the code and print run statistics

Use different build directory for each version!

By default, OpenSPH uses a custom thread pool for parallelization. It is possible to use Intel TBB library instead, by adding use_tbb flag:

qmake CONFIG+=version CONFIG+=use_tbb ../sph.pro

The project sph.pro builds command-line launcher and the GUI application that allows to set up and run simulations, as well as view previously saved results.

To further build the code examples, run:

cd build_version
qmake CONFIG+=version ../examples.pro
make