The Insieme compiler is a source-to-source compiler for C/C++ that supports portable parallel abstractions (OpenMP, MPI and OpenCL) for heterogeneous multi-core architectures. More deatails are available here.
Insieme contains 4 main sub-directories:
- insieme
- /code -- Insieme compiler implementation
- /docs -- Insieme developer documentation
- /scripts -- Insieme environment installation scripts
- /test -- Insieme integration tests
Insieme is written in C++11 and relies on several third-party libraries, an updated list is available here.
Name | Version | What's for |
---|---|---|
G++ | = 4.6.x | Compiler |
CMake | >= 2.8.x | Build System |
Google Test | >= 1.6 | Unit testing |
Boost | = 1.50 | Utilities, regex, filesystem, program options |
LLVM/Clang | = 3.4 (patch) | C/C++ frontend |
ISL | = 0.10 | Polyhedral model representation & analysis |
CLooG | = 0.17 | Polyhedral model code generation |
Barvinok | = 0.35 | Polyhedral model cardinality |
CUDD | >= 2.4.2 | Manipulation of decision diagrams |
LuaJIT | >= 2.0.0 | Scripting |
Shark | >= 2.3.4 | Machine learning |
Kompex | >= 1.7.9 | DBMS |
Ruby | >= 2.8 | Scripting |
You can either install those packages manually (or via a package manager) or use the provided utility which takes care of building all dependencies from scratch and apply patches.
cd scripts
make PREFIX=/where/to/install
All libraries will be installed in $PREFIX
and a symbolic link is created with postfix '-latest' pointing to the newest installed version of a library (which simplifies the following cmake configuration steps). By default PREFIX=~/lib
; additionally the script performs a parallel build (make -j$SLOTS
) using all availabe cores in the host architecture. You can change this behaviour by passing to the make a different value for SLOTS
.
Insieme's build system is based on CMake. We suppose to have the all dependencies installed in the same directory: $HOME/libs
mkdir build
cd build
# SET ENVIRONMENT
export PREFIX=$HOME/libs
export LD_LIBRARY_PATH=$PREFIX/gcc-latest/lib64:$PREFIX/mpfr-latest/lib:$PREFIX/mpc-latest/lib:\\
$PREFIX/gmp-latest/lib:$PREFIX/cloog-gcc-latest/lib:$PREFIX/ppl-latest/lib:$PREFIX/papi-latest/lib:$LD_LIBRARY_PATH
export PATH=$PREFIX/ruby-latest/bin/:$PREFIX/cmake-latest/bin:$PATH
# CREATE PROJECT MAKEFILE
CXX=$PREFIX/gcc-latest/bin/g++ INSIEME_LIBS_HOME=$PREFIX $PREFIX/cmake-latest/bin/cmake ..
Several other options can be provided to enable/disable some of the compiler features:
-DDOC=ON|OFF
-- Enable/disable generation of documentation-DCMAKE_BUILD_TYPE=Debug|Release
-- Set the build to be in Debug or Release mode-DUSE_OPENCL=ON|OFF
-- Enabe/disable OpenCL support (in both frontend/backend/runtime) (note: this variables must be passed as parameters of the cmake command, not set as environment variables)
If successful, CMake produces the set of Makefiles to build the Insieme project.
make -j2 # Builds using two threads
Or you can alternatively mode into a subfolder and only buld that particular module of the compiler
cd core
make
Unit tests can be executed with:
make test
If everything was successful... congratulation! You may start enjoying Insieme now!
Please, understand that the install command is not implemented since this is an on-going development. Instead of polluting your local setup, we prefer to use insieme from the build directory. There is always time for install scripts in future releases.
Integration tests can be executed using the custom runner compiled in the build directory:
./code/driver/integration_test
Integration tests can be executed in parallel (-w SLOTS
), and multiple times (-r N
). For a full list of options use the -h
argument or refer to the insieme developer documentation. The mock run (``-m```) will give you an idea of the actual commands being invoked.