[Openmp-dev] Using the runtime C interface

Joseph Schuchart via Openmp-dev openmp-dev at lists.llvm.org
Wed Oct 26 05:55:38 PDT 2016


All,

I am currently working on a research project with the goal to create a 
C++ abstraction for creating tasks similar to tasking in OpenMP but with 
added functionality and only relying on standard C++ language features. 
In order to allow for an easy integration with existing OpenMP 
applications, I would like to use an existing OpenMP runtime as a basis 
so that users can only port parts of their application while keeping 
most of the existing code. Eventually all created tasks will be 
scheduled by the same runtime.

The LLVM OpenMP runtime seems to be a good fit as it comes with a 
documented API [1] and supports multiple compilers. Thanks to the 
documentation and the library code, I think I have a good understanding 
of how to create tasks with depdendencies using __kmpc_omp_task_alloc() 
and __kmpc_omp_task_with_deps(). However, it is not clear to me how 
threads can be spawned correctly. I assume that __kmpc_fork_call() is 
the right place to look at but I fail to understand how a microtask 
should exactly behave, e.g., which functions to call while waiting for 
tasks to be created in another thread. Is there any publicly available 
example on how to use the API correctly without any OpenMP pragmas? Or 
is it possible to extract such an example from OpenMP code using the 
LLVM compiler?

Any pointers are much appreciated.

Cheers
Joseph

[1] http://openmp.llvm.org/Reference.pdf

-- 
Dipl.-Inf. Joseph Schuchart
High Performance Computing Center Stuttgart (HLRS)
Nobelstr. 19
D-70569 Stuttgart

Tel.: +49(0)711-68565890
Fax: +49(0)711-6856832
E-Mail: schuchart at hlrs.de



More information about the Openmp-dev mailing list