<div dir="ltr">It is CPPFLAGS. I seem to get the same behavior.<div><br></div><div>FWIW, I did get this response from NERSc but I don't know how to interpret it.</div><div><br></div><div>He seems to be saying that I don't need -mp=gpu for the device compiler (nvcc). He seems to think that I am adding -gpu.</div><div><br></div><div><div><div><div><span style="display:block">nvcc -- The device compiler does not need any of those flags because it already knows that it's being fed cuda code. The warning you're seeing is coming from nvc (which is the host / CPU side compiler) if you're in the PrgEnv-nvidia environment. You should not need to add -mp=gpu and -cuda, please just add the -cuda flag (to your host code) not to the device code.</span></div></div></div><br class="gmail-Apple-interchange-newline"></div><div>I will try to talk with this guy again.</div><div><br></div><div>Thanks,</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 4, 2021 at 4:11 PM Barry Smith <<a href="mailto:bsmith@petsc.dev" target="_blank">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br></div>  Yes, you need to use the CPPFLAGS which maybe called CPPCFLAGS I am not sure<div><br><div><br><blockquote type="cite"><div>On Nov 4, 2021, at 3:23 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:</div><br><div><div dir="ltr">Ah, CCFLAGS does not seem to work. </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 4, 2021 at 3:07 PM Barry Smith <<a href="mailto:bsmith@petsc.dev" target="_blank">bsmith@petsc.dev</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
  You have to pass in the flag to turn off the bitching about -gpu to the C preprocessor, not the C compiler.<br>
<br>
<br>
stderr:<br>
nvc-Warning-The -gpu option has no effect unless a language-specific option to enable GPU code generation is used (e.g.: -acc, -mp=gpu, -stdpar, -cuda)<br>
Source:<br>
#include "confdefs.h"<br>
#include "conffix.h"<br>
#include <stdlib.h><br>
<br>
<br>
<br>
> On Nov 4, 2021, at 2:49 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br>
> <br>
> on Perlmutter with nvhpc:<br>
> <br>
>               Defined make macro "CPP" to "cc --use cpp32"<br>
> Preprocessing source:<br>
> #include "confdefs.h"<br>
> #include "conffix.h"<br>
> #include <stdlib.h><br>
> <br>
> Executing: cc --use cpp32  -I/tmp/petsc-jV9U1b/config.setCompilers  /tmp/petsc-jV9U1b/config.setCompilers/conftest.c<br>
> Possible ERROR while running preprocessor: exit code 1<br>
> stderr:<br>
> nvc-Error-Unknown switch: --use<br>
> Source:<br>
> <configure.log><br>
<br>
</blockquote></div>
<span id="gmail-m_5791906733817924421gmail-m_-4673657770337277716cid:f_kvlc4co30"><configure.log></span></div></blockquote></div><br></div></div></blockquote></div>