[Openmp-dev] Mapped without a warning, but device code fails at run time

Alexey Bataev via Openmp-dev openmp-dev at lists.llvm.org
Thu Oct 31 19:32:43 PDT 2019


Check that you're using the debug version of libomptarget. Maybe, need to change LD_LIBRARY_PATH.

Best regards,
Alexey Bataev

31 окт. 2019 г., в 22:26, Itaru Kitayama via Openmp-dev <openmp-dev at lists.llvm.org> написал(а):


I was expecting if the app was built with debug clang and appropriate env vars are set prior to its run, I should be getting more than a line
like:

Libomptarget fatal error 1: failure of target construct while offloading is mandatory


On Fri, Nov 1, 2019 at 7:10 AM Doerfert, Johannes <jdoerfert at anl.gov<mailto:jdoerfert at anl.gov>> wrote:
I don't know what you mean by descriptive debug messages compared to "the usual errors".
Can you share what you see for the example you have problems with?

________________________________________
From: Itaru Kitayama <itaru.kitayama at gmail.com<mailto:itaru.kitayama at gmail.com>>
Sent: Thursday, October 31, 2019 16:55
To: Doerfert, Johannes
Cc: openmp-dev
Subject: Re: [Openmp-dev] Mapped without a warning, but device code fails at run time

Johannes, all,

Do you have a sample code that shows descriptive debug messages? In my codes, I don’t see any tailored messages other than usual errors.

On Tue, Oct 29, 2019 at 7:47 Doerfert, Johannes <jdoerfert at anl.gov<mailto:jdoerfert at anl.gov><mailto:jdoerfert at anl.gov<mailto:jdoerfert at anl.gov>>> wrote:
I think:
  export LIBOMPTARGET_DEBUG=1
and
  export LIBOMPTARGET_DEVICE_RTL_DEBUG=1
when you build the openmp runtime with debug support,
so when LIBOMPTARGET_ENABLE_DEBUG is set in cmake.

I don't have a setup to test your program right now but I hope someone else can.

________________________________________
From: Itaru Kitayama <itaru.kitayama at gmail.com<mailto:itaru.kitayama at gmail.com><mailto:itaru.kitayama at gmail.com<mailto:itaru.kitayama at gmail.com>>>
Sent: Monday, October 28, 2019 17:40
To: Doerfert, Johannes
Cc: openmp-dev
Subject: Re: [Openmp-dev] Mapped without a warning, but device code fails at run time

Hi,
How do I enable debug messages at run time?
I've attached a small reproducer for you to take a look at it.

On Tue, Oct 29, 2019 at 3:42 AM Doerfert, Johannes <jdoerfert at anl.gov<mailto:jdoerfert at anl.gov><mailto:jdoerfert at anl.gov<mailto:jdoerfert at anl.gov>><mailto:jdoerfert at anl.gov<mailto:jdoerfert at anl.gov><mailto:jdoerfert at anl.gov<mailto:jdoerfert at anl.gov>>>> wrote:
This can have various reasons, including a compiler bug.
Try to enable debug messages by the runtime and see if that helps to determine why offloading failed.
You can also provide a small reproducer so we can take a look.

________________________________________
From: Openmp-dev <openmp-dev-bounces at lists.llvm.org<mailto:openmp-dev-bounces at lists.llvm.org><mailto:openmp-dev-bounces at lists.llvm.org<mailto:openmp-dev-bounces at lists.llvm.org>><mailto:openmp-dev-bounces at lists.llvm.org<mailto:openmp-dev-bounces at lists.llvm.org><mailto:openmp-dev-bounces at lists.llvm.org<mailto:openmp-dev-bounces at lists.llvm.org>>>> on behalf of Itaru Kitayama via Openmp-dev <openmp-dev at lists.llvm.org<mailto:openmp-dev at lists.llvm.org><mailto:openmp-dev at lists.llvm.org<mailto:openmp-dev at lists.llvm.org>><mailto:openmp-dev at lists.llvm.org<mailto:openmp-dev at lists.llvm.org><mailto:openmp-dev at lists.llvm.org<mailto:openmp-dev at lists.llvm.org>>>>
Sent: Monday, October 21, 2019 22:20
To: openmp-dev
Subject: [Openmp-dev] Mapped without a warning, but device code fails at run time

Hi,
By checking the compiler message, a type is mapped without triggering
a Non-trivial type ... warning, but the device code fails at the run time leaving:

Libomptarget fatal error 1: failure of target construct while offloading is mandatory

(in the code accessing an element in a user-defined "vector")
in this case, should I worry about a possible compiler bug?
_______________________________________________
Openmp-dev mailing list
Openmp-dev at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20191101/e7611a79/attachment.html>


More information about the Openmp-dev mailing list