<div><div dir="auto">I will try that. Can I assume this is just a temporary fix?</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 25, 2019 at 22:05 Doerfert, Johannes <<a href="mailto:jdoerfert@anl.gov">jdoerfert@anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for the reproducer, that helped a lot.<br>
<br>
So the problem is the host code but during device compilation.<br>
I was earlier confused as host compilation should not be impacted by this and it is not.<br>
<br>
I do not have a good workaround other than defining NAN, and other macros such as M_PI,<br>
manually in NVPTX mode. In my system that would look like:<br>
<br>
#ifdef __NVPTX__<br>
#define NAN (0.0f / 0.0f) <br>
#endif<br>
<br>
Can you give this a try and tell me if it works for you?<br>
<br>
<br>
________________________________________<br>
From: Itaru Kitayama <<a href="mailto:itaru.kitayama@gmail.com" target="_blank">itaru.kitayama@gmail.com</a>><br>
Sent: Thursday, July 25, 2019 07:34<br>
To: Doerfert, Johannes<br>
Cc: <a href="mailto:openmp-dev@lists.llvm.org" target="_blank">openmp-dev@lists.llvm.org</a><br>
Subject: Re: [Openmp-dev] Math symbols are not found during configuration<br>
<br>
#include <cmath><br>
#include <iostream><br>
<br>
int main()<br>
{<br>
std::cout << NAN << std::endl;<br>
};<br>
<br>
This gives you a build error when compiled with -fopenmp-targets=nvptx64, but not without it.<br>
</blockquote></div></div>