Re: [petsc-users] error of compiling complex

2020-05-21 Thread Sam Guo
Hi Satish, Works. Thanks a lot for your help. BR, Sam On Thu, May 21, 2020 at 2:51 PM Satish Balay wrote: > Its PETSC_USE_COMPLEX [undefined for --with-scalar-type=real] > > Satish > > On Thu, 21 May 2020, Sam Guo wrote: > > > What preprocessor directive should I use for real:

Re: [petsc-users] error of compiling complex

2020-05-21 Thread Satish Balay via petsc-users
Its PETSC_USE_COMPLEX [undefined for --with-scalar-type=real] Satish On Thu, 21 May 2020, Sam Guo wrote: > What preprocessor directive should I use for real: PETSC_USE_SCALAR_REAL > or PETSC_USE_REAL_DOUBLE? > > On Thu, May 21, 2020 at 2:00 PM Satish Balay wrote: > > > We usually do the

Re: [petsc-users] error of compiling complex

2020-05-21 Thread Sam Guo
What preprocessor directive should I use for real: PETSC_USE_SCALAR_REAL or PETSC_USE_REAL_DOUBLE? On Thu, May 21, 2020 at 2:00 PM Satish Balay wrote: > We usually do the other way around [build petsc with the correct > compilers and option] and make apps use the same flags [via petsc >

Re: [petsc-users] error of compiling complex

2020-05-21 Thread Satish Balay via petsc-users
We usually do the other way around [build petsc with the correct compilers and option] and make apps use the same flags [via petsc formatted makefiles]. However you should be able to construct petsc configure command and force petsc to build exactly as you need. Satish On Thu, 21 May 2020, Sam

Re: [petsc-users] error of compiling complex

2020-05-21 Thread Sam Guo
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 wrote: > Is there a reason you can't use petsc build tools? > > config/gmakegen.py processes the mkaefiles in source dirs - and determines

Re: [petsc-users] error of compiling complex

2020-05-21 Thread Satish Balay via petsc-users
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

Re: [petsc-users] error of compiling complex

2020-05-21 Thread Sam Guo
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

Re: [petsc-users] error of compiling complex

2020-05-21 Thread Matthew Knepley
On Thu, May 21, 2020 at 3:25 PM Sam Guo 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

Re: [petsc-users] error of compiling complex

2020-05-21 Thread Satish Balay via petsc-users
Something wrong with your build. This source-file should not get compiled for complex. > ../../../petsc/src/ksp/pc/impls/tfs/ivec.c And this relative path looks wierd. How are you building PETSc? Might start with a fresh petsc install. [and look at updating to latest release - petsc-3.13]