[petsc-dev] I am getting this error ...

Mark Adams mfadams at lbl.gov
Thu Nov 4 18:31:01 CDT 2021


OK, configure is done.
Maybe I have too many -mp=gpu

       CUDAC
arch-perlmutter-opt-nvidia-cuda/obj/sys/classes/random/impls/curand/curand2.o
gcc: error: unrecognized command line option ‘-mp=gpu’; did you mean
‘-mpku’?

On Thu, Nov 4, 2021 at 5:51 PM Barry Smith <bsmith at petsc.dev> wrote:

>
>   Need the same thing for the C++ preprocessor flag
>
>
>
> On Nov 4, 2021, at 5:44 PM, Mark Adams <mfadams at lbl.gov> wrote:
>
> It gets a lot further.
>
> On Thu, Nov 4, 2021 at 5:32 PM Mark Adams <mfadams at lbl.gov> wrote:
>
>> OK, sorry I missed the CPPFLAGS. It is running now.
>> Thanks,
>>
>> On Thu, Nov 4, 2021 at 4:43 PM Satish Balay <balay at mcs.anl.gov> wrote:
>>
>>> Multiple e-mail threads on the same issue (:
>>>
>>> As suggested in my earlier thread - add -mp=gpu to both CPPFLAGS and
>>> CFLAGS [or LDFLAGS]
>>>
>>> Satish
>>>
>>> -------
>>> 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
>>> Possible ERROR while running linker:
>>> stderr:
>>> 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)
>>>
>>>
>>> On Thu, 4 Nov 2021, Mark Adams wrote:
>>>
>>> > It is CPPFLAGS. I seem to get the same behavior.
>>> >
>>> > FWIW, I did get this response from NERSc but I don't know how to
>>> interpret
>>> > it.
>>> >
>>> > 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.
>>> >
>>> > 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.
>>> >
>>> > I will try to talk with this guy again.
>>> >
>>> > Thanks,
>>> >
>>> >
>>> > On Thu, Nov 4, 2021 at 4:11 PM Barry Smith <bsmith at petsc.dev> wrote:
>>> >
>>> > >
>>> > >   Yes, you need to use the CPPFLAGS which maybe called CPPCFLAGS I
>>> am not
>>> > > sure
>>> > >
>>> > >
>>> > > On Nov 4, 2021, at 3:23 PM, Mark Adams <mfadams at lbl.gov> wrote:
>>> > >
>>> > > Ah, CCFLAGS does not seem to work.
>>> > >
>>> > > On Thu, Nov 4, 2021 at 3:07 PM Barry Smith <bsmith at petsc.dev> wrote:
>>> > >
>>> > >>
>>> > >>   You have to pass in the flag to turn off the bitching about -gpu
>>> to the
>>> > >> C preprocessor, not the C compiler.
>>> > >>
>>> > >>
>>> > >> stderr:
>>> > >> 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)
>>> > >> Source:
>>> > >> #include "confdefs.h"
>>> > >> #include "conffix.h"
>>> > >> #include <stdlib.h>
>>> > >>
>>> > >>
>>> > >>
>>> > >> > On Nov 4, 2021, at 2:49 PM, Mark Adams <mfadams at lbl.gov> wrote:
>>> > >> >
>>> > >> > on Perlmutter with nvhpc:
>>> > >> >
>>> > >> >               Defined make macro "CPP" to "cc --use cpp32"
>>> > >> > Preprocessing source:
>>> > >> > #include "confdefs.h"
>>> > >> > #include "conffix.h"
>>> > >> > #include <stdlib.h>
>>> > >> >
>>> > >> > Executing: cc --use cpp32  -I/tmp/petsc-jV9U1b/config.setCompilers
>>> > >> /tmp/petsc-jV9U1b/config.setCompilers/conftest.c
>>> > >> > Possible ERROR while running preprocessor: exit code 1
>>> > >> > stderr:
>>> > >> > nvc-Error-Unknown switch: --use
>>> > >> > Source:
>>> > >> > <configure.log>
>>> > >>
>>> > >> <configure.log>
>>> > >
>>> > >
>>> > >
>>> >
>>>
>>> <configure.log>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20211104/99e59a96/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make.log
Type: application/octet-stream
Size: 15121 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20211104/99e59a96/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: configure.log
Type: application/octet-stream
Size: 1980960 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20211104/99e59a96/attachment-0003.obj>


More information about the petsc-dev mailing list