GrPPI
0.3.1
Generic and Reusable Parallel Pattern Interface
|
GrPPI is a header-only library. Consequently, no build process is required for the library itself.
However, GrPPI includes CMake scripts for supporting the following actions:
To setup the build scripts we recommend that you create an out-of-source directory under the GrPPI root directory:
Then, you may generate the scripts by just doing:
Finally, you launch the build process with:
To build the unit tests, you need to set configuration variable GRPPI_UNIT_TEST_ENABLE
to ON
. You can do so be using the CMake GUI or by typing:
Then, you can build the unit tests by typing:
GrPPI offers multiple back-ends:
You may want to disable specific back ends. GrPPI offers specific variables to control this issue:
GRPPI_OMP_ENABLE
: Enable/disable OpenMP back-end.GRPPI_TBB_ENABLE
: Enable/disable TBB back-end.GRPPI_FF_ENABLE
: Entable/disable FastFlow back-end.The OpenMP back-end is controlled by CMake option GRPPI_OMP_ENABLE
(values can be ON
or OFF
). You can enable/disable this back-end with this option.
GrPPI uses CMake's FindOpenMP
to detect if your compiler supports OpenMP. In case your compiler supports OpenMP GRPPI_OMP_ENABLE
will default to ON
. If your compiler does not support OpenMP any attempt to enable GrPPI/OpenMP back-end will be ignored.
If you have and OpenMP compliant compiler and GrPPI refuses to enable the OpenMP back-end, please, open an issue providing details.
The Intel TBB back-end is controlled by CMake option GRPPI_TBB_ENABLE
(values can be ON
or OFF
). You can enable/disable this back-end with this option.
GrPPI tries to detect if your system has Intel TBB installed. In case, Intel TBB is found GRPPI_TBB_ENABLE
will default to ON
. If Intel TBB is not found, any attempt to enable GrPPI/TBB back-end will be ignored.
Please refer to (Additional Libraries)[#additional-libraries] for details on Intel TBB install.
If you have installed Intel TBB and GrPPI refuses to enable the TBB back-end, please, open an issue providing details.
The FastFlow back-end is controlled by CMake option GRPPI_FF_ENABLE
(values can be ON
or OFF
). You can enable/disable this back-end with this option.
GrPPI tries to detect if your system has FastFlow installed. In case, FastFlow is found GRPPI_TBB_ENABLE
will default to ON
. If FastFlow is not found, any attempt to enable GrPPI/FF back-end will be ignored.
Please refer to (Additional Libraries)[#additional-libraries] for details on Intel TBB install.
If you have installed FastFlow and GrPPI refuses to enable the FastFlow back-end, please, open an issue providing details.
To run all the unit tests you can do:
or alternatively:
To perform a coverage analysis type:
The coverage HTML reports are generated under unit_tests/mycov/index.html
.
Documentation generation is disabled by default. However, if you wish to build the documentation yourself, you may enable the option:
This will generate a doc directory under your build tree with the generated documentation.
Note: You will need a doxygen in your system to make use of this option. You will also need graphviz.
GrPPI includes a number of example programs under directory samples. To build all samples you may use:
If you want to install GrPPI in your system, it will be installed using as base path the directory defined by CMAKE_INSTALL_PREFIX
. You do not need to do anything special if you want to install in the default location.
On many Linux systems, this will install the header files under /usr/local/include/grppi
.
You can specify a different install directory to CMake:
For using GrPPI you need a C++14 compliant compiler.
GrPPI has been tested with the following compilers:
If you want to use a different compiler than the default one, you can specify it by doing:
No external library is strictly required for basic GrPPI use. It only hard dependency is the C++ standard library.
In order to use the Intel Threading Building Blocks (TBB) back-end you need to install the following library:
In order to use the FastFlow back-end you need to install it. You can obtain a recent version from:
IMPORTANT NOTE: Current version of fastflow has two minor issues. Until this is fixed you can get this fork
For unit testing GrPPI uses the GoogleTest framework.
You can obtain Get it from:
If you want to run unit tests and perform coverage analysis you will need: