LLVM/OpenMP Runtimes
====================
-There are four distinct types of LLVM/OpenMP runtimes
+There are four distinct types of LLVM/OpenMP runtimes: the host runtime
+:ref:`libomp`, the target offloading runtime :ref:`libomptarget`, the target
+offloading plugin :ref:`libomptarget_plugin`, and finally the target device
+runtime :ref:`libomptarget_device`.
+
+For general information on debugging OpenMP target offloading applications, see
+:ref:`libomptarget_info` and :ref:`libomptarget_device_debugging`
+
+.. _libomp:
LLVM/OpenMP Host Runtime (``libomp``)
-------------------------------------
**Default:** ``true``
+.. _libomptarget:
+
LLVM/OpenMP Target Host Runtime (``libomptarget``)
--------------------------------------------------
``LIBOMPTARGET_MEMORY_MANAGER_THRESHOLD`` is set to ``0`` the memory manager
will be completely disabled.
+.. _libomptarget_info:
+
LIBOMPTARGET_INFO
"""""""""""""""""
Libomptarget error: Copying data from device failed.
Libomptarget error: Call to targetDataEnd failed, abort target.
Libomptarget error: Failed to process data after launching the kernel.
- Libomptarget error: Run with LIBOMPTARGET_INFO=4 to dump host-target pointer mappings.
+ Libomptarget error: Consult https://openmp.llvm.org/design/Runtimes.html for debugging options.
sum.cpp:5:1: Libomptarget error 1: failure of target construct while offloading is mandatory
This shows that there is an illegal memory access occuring inside the OpenMP
The default behavior of LLVM 14 is to force atomic maps clauses, prior versions
of LLVM did not.
+.. _libomptarget_plugin:
LLVM/OpenMP Target Host Runtime Plugins (``libomptarget.rtl.XXXX``)
-------------------------------------------------------------------
""""""""""""""""""""""""
This is the maximum amount of time the client will wait for a response from the server.
+.. _libomptarget_device:
+
LLVM/OpenMP Target Device Runtime (``libomptarget-ARCH-SUBARCH.bc``)
--------------------------------------------------------------------
runtime functions on the target device. It is linked with the device code's LLVM
IR during compilation.
+.. _libomptarget_device_debugging:
+
Debugging
^^^^^^^^^
* Enable debugging assertions in the device. ``0x01``
* Enable OpenMP runtime function traces in the device. ``0x2``
+ * Enable diagnosing common problems during offloading . ``0x4``
.. code-block:: c++