<div dir="ltr">What preprocessor directive should I use for real: PETSC_USE_SCALAR_REAL or PETSC_USE_REAL_DOUBLE?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 21, 2020 at 2:00 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov">balay@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">We usually do the other way around [build petsc with the correct<br>
compilers and option] and make apps use the same flags [via petsc<br>
formatted makefiles].<br>
<br>
However you should be able to construct petsc configure command and<br>
force petsc to build exactly as you need.<br>
<br>
Satish<br>
<br>
On Thu, 21 May 2020, Sam Guo wrote:<br>
<br>
> The reason we don’t use petsc build tool is to make sure we use same<br>
> compiler and flags to build our code and petsc.<br>
> <br>
> On Thursday, May 21, 2020, Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br>
> <br>
> > Is there a reason you can't use petsc build tools?<br>
> ><br>
> > config/gmakegen.py processes the mkaefiles in source dirs - and determines<br>
> > the list of files to build [for a given configure setup]<br>
> ><br>
> > src/ksp/pc/impls/tfs/makefile has:<br>
> ><br>
> > #requiresscalar real<br>
> ><br>
> > i.e the sources in this dir are compiled only when --with-scalar-type=real<br>
> > and not when --with-scalar-type=complex etc..<br>
> ><br>
> > Satish<br>
> ><br>
> > On Thu, 21 May 2020, Sam Guo wrote:<br>
> ><br>
> > > Thanks for the quick response. I have my own makefile based on PETSc<br>
> > > makefile. I need to update my makefile. It seems PETSc generates the<br>
> > > makefile on fly. I struggle to figure out which files I should skip for<br>
> > > complex. Could you tell me what files I should skip?<br>
> > ><br>
> > > Thanks,<br>
> > > Sam<br>
> > ><br>
> > > On Thu, May 21, 2020 at 12:31 PM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>><br>
> > wrote:<br>
> > ><br>
> > > > On Thu, May 21, 2020 at 3:25 PM Sam Guo <<a href="mailto:sam.guo@cd-adapco.com" target="_blank">sam.guo@cd-adapco.com</a>> wrote:<br>
> > > ><br>
> > > >> Dear PETSc dev team,<br>
> > > >> I got following error of compiling complex:<br>
> > > >> ../../../petsc/src/ksp/pc/impls/tfs/ivec.c: In function<br>
> > ‘PCTFS_rvec_max’:<br>
> > > >> ../../../petsc/include/petscmath.h:532:30: error: invalid operands to<br>
> > > >> binary < (have ‘PetscScalar’ {aka ‘_Complex double’} and<br>
> > ‘PetscScalar’ {aka<br>
> > > >> ‘_Complex double’})<br>
> > > >> 532 | #define PetscMax(a,b) (((a)<(b)) ? (b) : (a))<br>
> > > >><br>
> > > >> Any idea what I did wrong? I am using version 3.11.3.<br>
> > > >><br>
> > > ><br>
> > > > Can you upgrade to 3.13?<br>
> > > ><br>
> > > > Thanks,<br>
> > > ><br>
> > > > Matt<br>
> > > ><br>
> > > ><br>
> > > >> Thanks,<br>
> > > >> Sam<br>
> > > >><br>
> > > ><br>
> > > ><br>
> > > > --<br>
> > > > What most experimenters take for granted before they begin their<br>
> > > > experiments is infinitely more interesting than any results to which<br>
> > their<br>
> > > > experiments lead.<br>
> > > > -- Norbert Wiener<br>
> > > ><br>
> > > > <a href="https://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
> > > > <<a href="http://www.cse.buffalo.edu/~knepley/" rel="noreferrer" target="_blank">http://www.cse.buffalo.edu/~knepley/</a>><br>
> > > ><br>
> > ><br>
> ><br>
> <br>
</blockquote></div>