<div dir="ltr">My process only works for PTESc 3.11.3, not 3.15.3 and that's why I started this email thread.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 1, 2021 at 12:19 PM Sam Guo <<a href="mailto:sam.guo@cd-adapco.com">sam.guo@cd-adapco.com</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"><div dir="ltr">If we go back to the original compiling error,<div>"petsc/src/mat/impls/aij/mpi/mumps/mumps.c:52:31: error: missing binary operator before token "("<br></div>   52 | #if PETSC_PKG_MUMPS_VERSION_GE(5,3,0)"<div>I don't understand what PETSC_PKG_MUMPS_VERSION_GE(5,3,0) is doing.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 1, 2021 at 12:12 PM Sam Guo <<a href="mailto:sam.guo@cd-adapco.com" target="_blank">sam.guo@cd-adapco.com</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"><div dir="ltr">I believe I am using MUMPS since I have done following<div>(1) defined 

-DPETSC_HAVE_MUMPS, </div><div>(2) compiles and links mat/impls/aij/mpi/mumps/mumps.c</div><div>(3) link my pre-compiled MUMPS, and </div><div>(4) specifies following PETSc options<div>       checkError(EPSGetST(eps, &st));<br>        checkError(STSetType(st, STSINVERT));<br>        //if(useShellMatrix) checkError(STSetMatMode(st, ST_MATMODE_SHELL));<br>        checkError(STGetKSP(st, &ksp));<br>        checkError(KSPSetOperators(ksp, A, A));<br>        checkError(KSPSetType(ksp, KSPPREONLY));<br>        checkError(KSPGetPC(ksp, &pc));<br>        checkError(MatSetOption(A, MAT_SPD, PETSC_TRUE));<br>        checkError(PCSetType(pc, PCCHOLESKY));<br>        checkError(PCFactorSetMatSolverType(pc, MATSOLVERMUMPS));<br>        checkError(PCFactorSetUpMatSolverType(pc));<br>        checkError(PetscOptionsSetValue(NULL, "-mat_mumps_icntl_13","1"));<br></div><div><br></div><div>Another evidence I am using MUMPS is that If I skip (1)-(3) above, I got the PETSc error saying that MUMPS is required.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 1, 2021 at 12:00 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">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">mumps is a fortran package - so best to specify fc. Any specific reason for needing to force '--with-fc=0'?<br>
<br>
The attached configure.log is not using mumps.<br>
<br>
Satish<br>
<br>
On Wed, 1 Sep 2021, Sam Guo wrote:<br>
<br>
> fc should not be required since I link PETSc with pre-compiled MUMPS. In<br>
> fact, --with-mumps-include --with-mumps-lib --with-mumps-serial should not<br>
> be required since my own CMake defines -DPETSC_HAVE_MUMPS and links my<br>
> pre-compiled MUMPS.<br>
> <br>
> I am able to make it work using PETSc 3.11.3. Attached please find the<br>
> cPETSc 3.11.3 onfigure.log PETSc.<br>
> <br>
> On Tue, Aug 31, 2021 at 4:47 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br>
> <br>
> ><br>
> > *******************************************************************************<br>
> >          UNABLE to CONFIGURE with GIVEN OPTIONS    (see configure.log for<br>
> > details):<br>
> ><br>
> > -------------------------------------------------------------------------------<br>
> > Package mumps requested requires Fortran but compiler turned off.<br>
> ><br>
> > *******************************************************************************<br>
> ><br>
> > i.e remove '--with-fc=0' and rerun configure.<br>
> ><br>
> > Satish<br>
> ><br>
> > On Tue, 31 Aug 2021, Sam Guo wrote:<br>
> ><br>
> > > Attached please find the latest configure.log.<br>
> > ><br>
> > > grep MUMPS_VERSION<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/*.h<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/cmumps_c.h:#ifndef<br>
> > > MUMPS_VERSION<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/cmumps_c.h:#define<br>
> > > MUMPS_VERSION "5.2.1"<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/cmumps_c.h:#ifndef<br>
> > > MUMPS_VERSION_MAX_LEN<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/cmumps_c.h:#define<br>
> > > MUMPS_VERSION_MAX_LEN 30<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/cmumps_c.h:<br>
> > >    char version_number[MUMPS_VERSION_MAX_LEN + 1 + 1];<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/dmumps_c.h:#ifndef<br>
> > > MUMPS_VERSION<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/dmumps_c.h:#define<br>
> > > MUMPS_VERSION "5.2.1"<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/dmumps_c.h:#ifndef<br>
> > > MUMPS_VERSION_MAX_LEN<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/dmumps_c.h:#define<br>
> > > MUMPS_VERSION_MAX_LEN 30<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/dmumps_c.h:<br>
> > >    char version_number[MUMPS_VERSION_MAX_LEN + 1 + 1];<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/smumps_c.h:#ifndef<br>
> > > MUMPS_VERSION<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/smumps_c.h:#define<br>
> > > MUMPS_VERSION "5.2.1"<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/smumps_c.h:#ifndef<br>
> > > MUMPS_VERSION_MAX_LEN<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/smumps_c.h:#define<br>
> > > MUMPS_VERSION_MAX_LEN 30<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/smumps_c.h:<br>
> > >    char version_number[MUMPS_VERSION_MAX_LEN + 1 + 1];<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/zmumps_c.h:#ifndef<br>
> > > MUMPS_VERSION<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/zmumps_c.h:#define<br>
> > > MUMPS_VERSION "5.2.1"<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/zmumps_c.h:#ifndef<br>
> > > MUMPS_VERSION_MAX_LEN<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/zmumps_c.h:#define<br>
> > > MUMPS_VERSION_MAX_LEN 30<br>
> > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/zmumps_c.h:<br>
> > >    char version_number[MUMPS_VERSION_MAX_LEN + 1 + 1];<br>
> > ><br>
> > > On Mon, Aug 30, 2021 at 9:47 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>> wrote:<br>
> > ><br>
> > > > Also - what do you have for:<br>
> > > ><br>
> > > > grep MUMPS_VERSION<br>
> > > ><br>
> > /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/*.h<br>
> > > ><br>
> > > > Satish<br>
> > > ><br>
> > > > On Mon, 30 Aug 2021, Satish Balay via petsc-users wrote:<br>
> > > ><br>
> > > > > please resend the logs<br>
> > > > ><br>
> > > > > Satish<br>
> > > > ><br>
> > > > > On Mon, 30 Aug 2021, Sam Guo wrote:<br>
> > > > ><br>
> > > > > > Same compiling error with --with-mumps-serial=1.<br>
> > > > > ><br>
> > > > > > On Mon, Aug 30, 2021 at 8:22 PM Satish Balay <<a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>><br>
> > > > wrote:<br>
> > > > > ><br>
> > > > > > > Use the additional option: -with-mumps-serial<br>
> > > > > > ><br>
> > > > > > > Satish<br>
> > > > > > ><br>
> > > > > > > On Mon, 30 Aug 2021, Sam Guo wrote:<br>
> > > > > > ><br>
> > > > > > > > Attached please find the configure.log. I use my own CMake. I<br>
> > have<br>
> > > > > > > > defined -DPETSC_HAVE_MUMPS. Thanks.<br>
> > > > > > > ><br>
> > > > > > > > On Mon, Aug 30, 2021 at 4:56 PM Sam Guo <<a href="mailto:sam.guo@cd-adapco.com" target="_blank">sam.guo@cd-adapco.com</a><br>
> > ><br>
> > > > wrote:<br>
> > > > > > > ><br>
> > > > > > > > > I use pre-installed<br>
> > > > > > > > ><br>
> > > > > > > > > On Mon, Aug 30, 2021 at 4:53 PM Satish Balay <<br>
> > <a href="mailto:balay@mcs.anl.gov" target="_blank">balay@mcs.anl.gov</a>><br>
> > > > > > > wrote:<br>
> > > > > > > > ><br>
> > > > > > > > >><br>
> > > > > > > > >> Are you using --download-mumps or pre-installed mumps? If<br>
> > using<br>
> > > > > > > > >> pre-installed - try --download-mumps.<br>
> > > > > > > > >><br>
> > > > > > > > >> If you still have issues - send us configure.log and<br>
> > make.log<br>
> > > > from the<br>
> > > > > > > > >> failed build.<br>
> > > > > > > > >><br>
> > > > > > > > >> Satish<br>
> > > > > > > > >><br>
> > > > > > > > >> On Mon, 30 Aug 2021, Sam Guo wrote:<br>
> > > > > > > > >><br>
> > > > > > > > >> > Dear PETSc dev team,<br>
> > > > > > > > >> >    I am compiling petsc 3.15.3 and got following compiling<br>
> > > > error<br>
> > > > > > > > >> > petsc/src/mat/impls/aij/mpi/mumps/mumps.c:52:31: error:<br>
> > > > missing<br>
> > > > > > > binary<br>
> > > > > > > > >> > operator before token "("<br>
> > > > > > > > >> >    52 | #if PETSC_PKG_MUMPS_VERSION_GE(5,3,0)<br>
> > > > > > > > >> >    Any idea what I did wrong?<br>
> > > > > > > > >> ><br>
> > > > > > > > >> > Thanks,<br>
> > > > > > > > >> > Sam<br>
> > > > > > > > >> ><br>
> > > > > > > > >><br>
> > > > > > > > >><br>
> > > > > > > ><br>
> > > > > > ><br>
> > > > > > ><br>
> > > > > ><br>
> > > > ><br>
> > > ><br>
> > > ><br>
> > ><br>
> ><br>
> ><br>
> <br>
<br>
</blockquote></div>
</blockquote></div>
</blockquote></div>