[petsc-users] error of compiling complex

Sam Guo sam.guo at cd-adapco.com
Thu May 21 15:55:20 CDT 2020


The reason we don’t use petsc build tool is to make sure we use same
compiler and flags to build our code and petsc.

On Thursday, May 21, 2020, Satish Balay <balay at mcs.anl.gov> wrote:

> Is there a reason you can't use petsc build tools?
>
> config/gmakegen.py processes the mkaefiles in source dirs - and determines
> the list of files to build [for a given configure setup]
>
> src/ksp/pc/impls/tfs/makefile has:
>
> #requiresscalar real
>
> i.e the sources in this dir are compiled only when --with-scalar-type=real
> and not when --with-scalar-type=complex etc..
>
> Satish
>
> On Thu, 21 May 2020, Sam Guo wrote:
>
> > Thanks for the quick response. I have my own makefile based on PETSc
> > makefile. I need to update my makefile. It seems PETSc generates the
> > makefile on fly. I struggle to figure out which files I should skip for
> > complex. Could you tell me what files I should skip?
> >
> > Thanks,
> > Sam
> >
> > On Thu, May 21, 2020 at 12:31 PM Matthew Knepley <knepley at gmail.com>
> wrote:
> >
> > > On Thu, May 21, 2020 at 3:25 PM Sam Guo <sam.guo at cd-adapco.com> wrote:
> > >
> > >> Dear PETSc dev team,
> > >>    I got following error of compiling complex:
> > >> ../../../petsc/src/ksp/pc/impls/tfs/ivec.c: In function
> ‘PCTFS_rvec_max’:
> > >> ../../../petsc/include/petscmath.h:532:30: error: invalid operands to
> > >> binary < (have ‘PetscScalar’ {aka ‘_Complex double’} and
> ‘PetscScalar’ {aka
> > >> ‘_Complex double’})
> > >>   532 | #define PetscMax(a,b)   (((a)<(b)) ?  (b) : (a))
> > >>
> > >>    Any idea what I did wrong? I am using version 3.11.3.
> > >>
> > >
> > > Can you upgrade to 3.13?
> > >
> > >   Thanks,
> > >
> > >     Matt
> > >
> > >
> > >> Thanks,
> > >> Sam
> > >>
> > >
> > >
> > > --
> > > What most experimenters take for granted before they begin their
> > > experiments is infinitely more interesting than any results to which
> their
> > > experiments lead.
> > > -- Norbert Wiener
> > >
> > > https://www.cse.buffalo.edu/~knepley/
> > > <http://www.cse.buffalo.edu/~knepley/>
> > >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200521/d4df943a/attachment-0001.html>


More information about the petsc-users mailing list