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 <ba...@mcs.anl.gov> 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 > 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 Guo wrote: > > > 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 <ba...@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 <knep...@gmail.com> > > > wrote: > > > > > > > > > On Thu, May 21, 2020 at 3:25 PM Sam Guo <sam....@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/> > > > > > > > > > > > > > > >