[petsc-users] error of compiling complex

Satish Balay balay at mcs.anl.gov
Thu May 21 15:42:28 CDT 2020


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/>
> >
> 


More information about the petsc-users mailing list