Version 7 (modified by Sebastian Huber, on Jul 20, 2015 at 4:59:25 AM) (diff)


Tool Chain Requirements

OpenMP support for RTEMS is available in GCC 4.9.3, 5.1 or later. Currently is uses the POSIX configuration of libgomp. Thread-local storage is enabled using the local-exec model. A Newlib version after 2015-03-12 is required. To enable the OpenMP support for GCC add the --enable-libgomp option to the GCC configure command line.

OpenMP Validation

Originally the OpenMP 3.1 Validation Suite was selected to validate the OpenMP support. Due to some problems with this test suite results are currently not available. Tests that failed on RTEMS failed also on Linux. There were two related bug reports to GCC Bug 65385 and Bug 65386. The quality of the test suite itself turned out to be quite bad.

Performance Observations

Not yet available.

Open Issues

  • Atomic operations and OpenMP are not supported in GCC, see Bug 65467. Due to this a #include <rtems.h> is not possible in files compiled with -fopenmp.
  • The gomp_new_team() function uses
    • one malloc() allocation,
    • four mutex initializations,
    • three semaphore initializations, and
    • one barrier initialization.

These resources are freed in gomp_team_end(). These are quite heavy weight operations on RTEMS. Possible performance improvements are the usage of a free list for teams or something similar to the Linux futex infrastructure used in the Linux configuration of libgomp (for example the mutex implementation of the new network stack, which doesn't use the classic RTEMS objects).

  • The libgomp uses the standard heap for dynamic memory. Since a gomp_free() function is missing it is hard to replace this with a dedicated heap.
  • The thread pool is built up with POSIX threads. There is currently no means to change RTEMS specific parameters of these threads, e.g. to select the scheduler instance.