<div dir="ltr"><div dir="ltr"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 1, 2021 at 2:52 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">Well the build process used here is:<br>
<br>
>> (1) defined -DPETSC_HAVE_MUMPS,<br>
>> (2) compiles and links mat/impls/aij/mpi/mumps/mumps.c<br>
<br>
<br>
i.e configure is skipped [for mumps part] so PETSC_PKG_MUMPS_VERSION_GE etc are missing [hence this error]<br>
<br></blockquote><div>Then, a hack for use of MUMPS 5.2.1 is at the beginning of mumps.c, add two lines</div><div><span style="font-family:Menlo,Monaco,"Courier New",monospace;font-size:14px;white-space:pre;color:rgb(0,128,0)">#define</span><span style="font-family:Menlo,Monaco,"Courier New",monospace;font-size:14px;white-space:pre;color:rgb(0,128,0)"> PETSC_PKG_MUMPS_VERSION_GE(x</span><span style="font-family:Menlo,Monaco,"Courier New",monospace;font-size:14px;white-space:pre;color:rgb(0,128,0)">,y</span><span style="font-family:Menlo,Monaco,"Courier New",monospace;font-size:14px;white-space:pre;color:rgb(0,128,0)">,z</span><span style="font-family:Menlo,Monaco,"Courier New",monospace;font-size:14px;white-space:pre;color:rgb(0,128,0)">) 0</span><br></div><div><div style="color:rgb(0,0,0);font-family:Menlo,Monaco,"Courier New",monospace;font-size:14px;line-height:21px;white-space:pre"><div><span style="color:rgb(0,128,0)">#define</span><span style="color:rgb(0,128,0)"> PETSC_PKG_MUMPS_VERSION_LT(x</span><span style="color:rgb(0,128,0)">,y</span><span style="color:rgb(0,128,0)">,z</span><span style="color:rgb(0,128,0)">) 1</span><span style="color:rgb(0,128,0)"><br></span></div><div><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small"> </span><br></div></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Satish<br>
<br>
On Wed, 1 Sep 2021, Junchao Zhang wrote:<br>
<br>
> On Wed, Sep 1, 2021 at 2:20 PM Sam Guo <<a href="mailto:sam.guo@cd-adapco.com" target="_blank">sam.guo@cd-adapco.com</a>> wrote:<br>
> <br>
> > If we go back to the original compiling error,<br>
> > "petsc/src/mat/impls/aij/mpi/mumps/mumps.c:52:31: error: missing binary<br>
> > operator before token "("<br>
> > 52 | #if PETSC_PKG_MUMPS_VERSION_GE(5,3,0)"<br>
> > I don't understand what PETSC_PKG_MUMPS_VERSION_GE(5,3,0) is doing.<br>
> ><br>
> When petsc is configured with mumps, you will find the macro<br>
> PETSC_PKG_MUMPS_VERSION_GE(MAJOR,MINOR,SUBMINOR) in<br>
> $PETSC_ARCH/include/petscpkg_version.h<br>
> Sam, you can manually compile the failed file, mumps.c, with preprocessing,<br>
> to see what is wrong in the expansion of the macro.<br>
> <br>
> <br>
> ><br>
> > 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>
> ><br>
> >> I believe I am using MUMPS since I have done following<br>
> >> (1) defined -DPETSC_HAVE_MUMPS,<br>
> >> (2) compiles and links mat/impls/aij/mpi/mumps/mumps.c<br>
> >> (3) link my pre-compiled MUMPS, and<br>
> >> (4) specifies following PETSc options<br>
> >> checkError(EPSGetST(eps, &st));<br>
> >> checkError(STSetType(st, STSINVERT));<br>
> >> //if(useShellMatrix) checkError(STSetMatMode(st,<br>
> >> 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>
> >><br>
> >> Another evidence I am using MUMPS is that If I skip (1)-(3) above, I got<br>
> >> the PETSc error saying that MUMPS is required.<br>
> >><br>
> >> 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>
> >><br>
> >>> mumps is a fortran package - so best to specify fc. Any specific reason<br>
> >>> 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.<br>
> >>> In<br>
> >>> > fact, --with-mumps-include --with-mumps-lib --with-mumps-serial should<br>
> >>> 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>><br>
> >>> wrote:<br>
> >>> ><br>
> >>> > ><br>
> >>> > ><br>
> >>> *******************************************************************************<br>
> >>> > > UNABLE to CONFIGURE with GIVEN OPTIONS (see<br>
> >>> configure.log for<br>
> >>> > > details):<br>
> >>> > ><br>
> >>> > ><br>
> >>> -------------------------------------------------------------------------------<br>
> >>> > > Package mumps requested requires Fortran but compiler turned off.<br>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>
> >>> > ><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>><br>
> >>> wrote:<br>
> >>> > > ><br>
> >>> > > > > Also - what do you have for:<br>
> >>> > > > ><br>
> >>> > > > > grep MUMPS_VERSION<br>
> >>> > > > ><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 <<br>
> >>> <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<br>
> >>> CMake. I<br>
> >>> > > have<br>
> >>> > > > > > > > > defined -DPETSC_HAVE_MUMPS. Thanks.<br>
> >>> > > > > > > > ><br>
> >>> > > > > > > > > On Mon, Aug 30, 2021 at 4:56 PM Sam Guo <<br>
> >>> <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<br>
> >>> 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<br>
> >>> compiling<br>
> >>> > > > > error<br>
> >>> > > > > > > > > >> > petsc/src/mat/impls/aij/mpi/mumps/mumps.c:52:31:<br>
> >>> 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>
> >>><br>
> <br>
<br>
</blockquote></div></div>