<div dir="ltr">OK, sorry I missed the CPPFLAGS. It is running now.<div>Thanks,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 4, 2021 at 4:43 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</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">Multiple e-mail threads on the same issue (:<br>
<br>
As suggested in my earlier thread - add -mp=gpu to both CPPFLAGS and CFLAGS [or LDFLAGS]<br>
<br>
Satish<br>
<br>
-------<br>
Executing: cc  -o /tmp/petsc-Vvs8_T/config.setCompilers/conftest   -g -DLANDAU_DIM=2 -DLANDAU_MAX_SPECIES=10 -DLANDAU_MAX_Q=4 /tmp/petsc-Vvs8_T/config.setCompilers/conftest.o<br>
Possible ERROR while running linker:<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>
<br>
<br>
On Thu, 4 Nov 2021, Mark Adams wrote:<br>
<br>
> It is CPPFLAGS. I seem to get the same behavior.<br>
> <br>
> FWIW, I did get this response from NERSc but I don't know how to interpret<br>
> it.<br>
> <br>
> He seems to be saying that I don't need -mp=gpu for the device compiler<br>
> (nvcc). He seems to think that I am adding -gpu.<br>
> <br>
> nvcc -- The device compiler does not need any of those flags because it<br>
> already knows that it's being fed cuda code. The warning you're seeing is<br>
> coming from nvc (which is the host / CPU side compiler) if you're in the<br>
> PrgEnv-nvidia environment. You should not need to add -mp=gpu and -cuda,<br>
> please just add the -cuda flag (to your host code) not to the device code.<br>
> <br>
> I will try to talk with this guy again.<br>
> <br>
> Thanks,<br>
> <br>
> <br>
> 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>
> <br>
> ><br>
> >   Yes, you need to use the CPPFLAGS which maybe called CPPCFLAGS I am not<br>
> > sure<br>
> ><br>
> ><br>
> > On Nov 4, 2021, at 3:23 PM, Mark Adams <<a href="mailto:mfadams@lbl.gov" target="_blank">mfadams@lbl.gov</a>> wrote:<br>
> ><br>
> > Ah, CCFLAGS does not seem to work.<br>
> ><br>
> > 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>
> ><br>
> >><br>
> >>   You have to pass in the flag to turn off the bitching about -gpu to the<br>
> >> C preprocessor, not the C compiler.<br>
> >><br>
> >><br>
> >> stderr:<br>
> >> nvc-Warning-The -gpu option has no effect unless a language-specific<br>
> >> option to enable GPU code generation is used (e.g.: -acc, -mp=gpu, -stdpar,<br>
> >> -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<br>
> >> /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>
> >> <configure.log><br>
> ><br>
> ><br>
> ><br>
> <br>
<br>
</blockquote></div>