wiki:OpenMP

Version 4 (modified by Sebastian Huber, on Apr 10, 2015 at 7:24:30 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

The OpenMP 3.1 Validation Suite was used to validate the OpenMP support. Due to some problems with this test suite results are currently not available. There are two related bug reports to GCC Bug 65385 and Bug 65386.

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).