Correction it is nvc:

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)

And I add  -mp=gpu to CUDAFLAGS


On Thu, Nov 4, 2021 at 1:09 PM Satish Balay <balay@mcs.anl.gov> wrote:

On Thu, 4 Nov 2021, Mark Adams wrote:

> Does anyone know if PETSc calls nvcc and hence can add flags to the
> invocation? nvcc wants a flag like -mp=gpu but I don't know if we do that
> or a compiler wrapper in the environment.

$ ./configure --help |grep CUDA
<snip>
  --CUDAC=<prog>
       Specify the CUDA compiler
  --CUDAFLAGS=<string>
       Specify the CUDA compiler options
<snip>

Satish