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

Itaru Kitayama via Openmp-dev openmp-dev at lists.llvm.org
Tue Nov 5 18:15:57 PST 2019


Alexey,

A change like this:

map(to: c[0:1]), here c is a pointer

made the program run on the device. We're inspired about this from page 32
of the presentation:
https://ukopenmpusers.co.uk/wp-content/uploads/uk-openmp-users-2018-OpenMP45Tutorial_new.pdf


On Mon, Nov 4, 2019 at 6:36 PM Alexey Bataev <a.bataev at hotmail.com> wrote:

> I rather doubt there is a bug in the compiler. The code maps the pointer
> and then tries to call a member function using this pointer. It will work
> only with unified memory, I think. If the program does not rely on the
> unified memory, the program is not correct, since it doea not offload the
> data itself.
>
> Best regards,
> Alexey Bataev
>
> > 4 нояб. 2019 г., в 02:42, Doerfert, Johannes via Openmp-dev <
> openmp-dev at lists.llvm.org> написал(а):
> >
> > Got it this time (attached again for the list), thanks!
> >
> > After a brief look, I think we need to open a bug for this. If the
> behavior is as you described, it is a problem we need to fix.
> >
> > ________________________________________
> > From: Itaru Kitayama <itaru.kitayama at gmail.com>
> > Sent: Monday, November 4, 2019 01:36
> > To: Doerfert, Johannes
> > Subject: Re: [Openmp-dev] Mapped without a warning, but device code
> fails at run time
> >
> > I've attached the reproducer. Thanks,
> >
> > On Mon, Nov 4, 2019 at 4:27 PM Doerfert, Johannes <jdoerfert at anl.gov
> <mailto:jdoerfert at anl.gov>> wrote:
> > This sounds like a bug. Changing a type should not only impact runtime
> > offloading behavior (with exceptions).
> >
> > I fail to locate the attachment, could you resend or put it somewhere
> > online?
> >
> > Thanks,
> >  Johannes
> >
> >> On 11/04, Itaru Kitayama wrote:
> >> In the attached code, if I remove the protected member, syn_id_delay_
> from
> >> the class definition, it runs on the device.
> >>
> >> On Tue, Oct 29, 2019 at 7:40 AM Itaru Kitayama <
> itaru.kitayama at gmail.com<mailto:itaru.kitayama at gmail.com>>
> >> wrote:
> >>
> >>> 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>>
> >>> 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>> on behalf of Itaru
> >>>> Kitayama via Openmp-dev <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?
> >>>>
> >>>
> >
> > --
> >
> > Johannes Doerfert
> > Researcher
> >
> > Argonne National Laboratory
> > Lemont, IL 60439, USA
> >
> > jdoerfert at anl.gov<mailto:jdoerfert at anl.gov>
> > <my1.cpp>
> > _______________________________________________
> > 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/20191106/80c290a1/attachment.html>


More information about the Openmp-dev mailing list