<div dir="ltr"><div dir="ltr">On Wed, Sep 1, 2021 at 5:19 PM Sam Guo <<a href="mailto:sam.guo@cd-adapco.com">sam.guo@cd-adapco.com</a>> wrote:<br></div><div class="gmail_quote"><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 build MUMPS at the designated machine but my local machine does not have fortran compiler.</div></blockquote><div><br></div><div>Can you run the configure there?</div><div><br></div><div> THanks,</div><div><br></div><div> Matt</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"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 1, 2021 at 1:58 PM Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.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"><div dir="ltr">On Wed, Sep 1, 2021 at 4:03 PM Sam Guo <<a href="mailto:sam.guo@cd-adapco.com" target="_blank">sam.guo@cd-adapco.com</a>> wrote:<br></div><div class="gmail_quote"><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">Hi Matt,<div> I tried --with-mumps-dir but same error.</div></div></blockquote><div><br></div><div>How can you build MUMPS without a Fortran compiler? And if you have one, why are you not telling PETSc about it?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</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"><div dir="ltr"><div>Hi Junchao,</div><div> That's a very good clue and suggestion. I looked petscpkg_version.h. It is empty as follows. I'll follow your suggestion and define those macros in mumps.c.</div><div><br></div><div>#if !defined(INCLUDED_PETSCPKG_VERSION_H)<br>#define INCLUDED_PETSCPKG_VERSION_H<br><br>#endif<br></div><div><br></div><div>Hi Satish,</div><div> Yes, what I am doing is hacking but it is necessary since have own own mpi wrapper. </div><div><br></div><div>Thank you all,</div><div>Sam</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 1, 2021 at 12:52 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">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>
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>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>