[Openmp-dev] Math symbols are not found during configuration
Itaru Kitayama via Openmp-dev
openmp-dev at lists.llvm.org
Thu Jul 25 13:34:44 PDT 2019
I will try that. Can I assume this is just a temporary fix?
On Thu, Jul 25, 2019 at 22:05 Doerfert, Johannes <jdoerfert at anl.gov> wrote:
> Thanks for the reproducer, that helped a lot.
>
> So the problem is the host code but during device compilation.
> I was earlier confused as host compilation should not be impacted by this
> and it is not.
>
> I do not have a good workaround other than defining NAN, and other macros
> such as M_PI,
> manually in NVPTX mode. In my system that would look like:
>
> #ifdef __NVPTX__
> #define NAN (0.0f / 0.0f)
>
> #endif
>
> Can you give this a try and tell me if it works for you?
>
>
> ________________________________________
> From: Itaru Kitayama <itaru.kitayama at gmail.com>
> Sent: Thursday, July 25, 2019 07:34
> To: Doerfert, Johannes
> Cc: openmp-dev at lists.llvm.org
> Subject: Re: [Openmp-dev] Math symbols are not found during configuration
>
> #include <cmath>
> #include <iostream>
>
> int main()
> {
> std::cout << NAN << std::endl;
> };
>
> This gives you a build error when compiled with -fopenmp-targets=nvptx64,
> but not without it.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20190726/dbe95601/attachment.html>
More information about the Openmp-dev
mailing list