[petsc-users] PETSc 3.15.3 compiling error
Matthew Knepley
knepley at gmail.com
Wed Sep 1 14:30:46 CDT 2021
On Wed, Sep 1, 2021 at 3:27 PM Sam Guo <sam.guo at cd-adapco.com> wrote:
> For PETSc 3.15.3, if I don't include mat/impls/aij/mpi/mumps/mumps.c, I
> have no compiling error. But I need it for using MUMPS. It is a compiling
> error rather than linking error.
>
I will ask a different way:
Can you run configure, but point it at your MUMPS installation?
--with-mumps-dir=</path/to/mumps>
Thanks,
Matt
> On Wed, Sep 1, 2021 at 12:22 PM Sam Guo <sam.guo at cd-adapco.com> wrote:
>
>> My process only works for PTESc 3.11.3, not 3.15.3 and that's why I
>> started this email thread.
>>
>> On Wed, Sep 1, 2021 at 12:19 PM Sam Guo <sam.guo at cd-adapco.com> wrote:
>>
>>> If we go back to the original compiling error,
>>> "petsc/src/mat/impls/aij/mpi/mumps/mumps.c:52:31: error: missing binary
>>> operator before token "("
>>> 52 | #if PETSC_PKG_MUMPS_VERSION_GE(5,3,0)"
>>> I don't understand what PETSC_PKG_MUMPS_VERSION_GE(5,3,0) is doing.
>>>
>>> On Wed, Sep 1, 2021 at 12:12 PM Sam Guo <sam.guo at cd-adapco.com> wrote:
>>>
>>>> I believe I am using MUMPS since I have done following
>>>> (1) defined -DPETSC_HAVE_MUMPS,
>>>> (2) compiles and links mat/impls/aij/mpi/mumps/mumps.c
>>>> (3) link my pre-compiled MUMPS, and
>>>> (4) specifies following PETSc options
>>>> checkError(EPSGetST(eps, &st));
>>>> checkError(STSetType(st, STSINVERT));
>>>> //if(useShellMatrix) checkError(STSetMatMode(st,
>>>> ST_MATMODE_SHELL));
>>>> checkError(STGetKSP(st, &ksp));
>>>> checkError(KSPSetOperators(ksp, A, A));
>>>> checkError(KSPSetType(ksp, KSPPREONLY));
>>>> checkError(KSPGetPC(ksp, &pc));
>>>> checkError(MatSetOption(A, MAT_SPD, PETSC_TRUE));
>>>> checkError(PCSetType(pc, PCCHOLESKY));
>>>> checkError(PCFactorSetMatSolverType(pc, MATSOLVERMUMPS));
>>>> checkError(PCFactorSetUpMatSolverType(pc));
>>>> checkError(PetscOptionsSetValue(NULL,
>>>> "-mat_mumps_icntl_13","1"));
>>>>
>>>> Another evidence I am using MUMPS is that If I skip (1)-(3) above, I
>>>> got the PETSc error saying that MUMPS is required.
>>>>
>>>> On Wed, Sep 1, 2021 at 12:00 PM Satish Balay <balay at mcs.anl.gov> wrote:
>>>>
>>>>> mumps is a fortran package - so best to specify fc. Any specific
>>>>> reason for needing to force '--with-fc=0'?
>>>>>
>>>>> The attached configure.log is not using mumps.
>>>>>
>>>>> Satish
>>>>>
>>>>> On Wed, 1 Sep 2021, Sam Guo wrote:
>>>>>
>>>>> > fc should not be required since I link PETSc with pre-compiled
>>>>> MUMPS. In
>>>>> > fact, --with-mumps-include --with-mumps-lib --with-mumps-serial
>>>>> should not
>>>>> > be required since my own CMake defines -DPETSC_HAVE_MUMPS and links
>>>>> my
>>>>> > pre-compiled MUMPS.
>>>>> >
>>>>> > I am able to make it work using PETSc 3.11.3. Attached please find
>>>>> the
>>>>> > cPETSc 3.11.3 onfigure.log PETSc.
>>>>> >
>>>>> > On Tue, Aug 31, 2021 at 4:47 PM Satish Balay <balay at mcs.anl.gov>
>>>>> wrote:
>>>>> >
>>>>> > >
>>>>> > >
>>>>> *******************************************************************************
>>>>> > > UNABLE to CONFIGURE with GIVEN OPTIONS (see
>>>>> configure.log for
>>>>> > > details):
>>>>> > >
>>>>> > >
>>>>> -------------------------------------------------------------------------------
>>>>> > > Package mumps requested requires Fortran but compiler turned off.
>>>>> > >
>>>>> > >
>>>>> *******************************************************************************
>>>>> > >
>>>>> > > i.e remove '--with-fc=0' and rerun configure.
>>>>> > >
>>>>> > > Satish
>>>>> > >
>>>>> > > On Tue, 31 Aug 2021, Sam Guo wrote:
>>>>> > >
>>>>> > > > Attached please find the latest configure.log.
>>>>> > > >
>>>>> > > > grep MUMPS_VERSION
>>>>> > > >
>>>>> > >
>>>>> /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/*.h
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION "5.2.1"
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION_MAX_LEN
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION_MAX_LEN 30
>>>>> > > >
>>>>> > >
>>>>> /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/cmumps_c.h:
>>>>> > > > char version_number[MUMPS_VERSION_MAX_LEN + 1 + 1];
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION "5.2.1"
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION_MAX_LEN
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION_MAX_LEN 30
>>>>> > > >
>>>>> > >
>>>>> /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/dmumps_c.h:
>>>>> > > > char version_number[MUMPS_VERSION_MAX_LEN + 1 + 1];
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION "5.2.1"
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION_MAX_LEN
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION_MAX_LEN 30
>>>>> > > >
>>>>> > >
>>>>> /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/smumps_c.h:
>>>>> > > > char version_number[MUMPS_VERSION_MAX_LEN + 1 + 1];
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION "5.2.1"
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION_MAX_LEN
>>>>> > > >
>>>>> > >
>>>>> /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
>>>>> > > > MUMPS_VERSION_MAX_LEN 30
>>>>> > > >
>>>>> > >
>>>>> /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/zmumps_c.h:
>>>>> > > > char version_number[MUMPS_VERSION_MAX_LEN + 1 + 1];
>>>>> > > >
>>>>> > > > On Mon, Aug 30, 2021 at 9:47 PM Satish Balay <balay at mcs.anl.gov>
>>>>> wrote:
>>>>> > > >
>>>>> > > > > Also - what do you have for:
>>>>> > > > >
>>>>> > > > > grep MUMPS_VERSION
>>>>> > > > >
>>>>> > >
>>>>> /u/cd4hhv/dev4/mumps/5.2.1-vanilla-parmetis3.2.0-openmp-cda-001/linux-x86_64-2.3.4/include/*.h
>>>>> > > > >
>>>>> > > > > Satish
>>>>> > > > >
>>>>> > > > > On Mon, 30 Aug 2021, Satish Balay via petsc-users wrote:
>>>>> > > > >
>>>>> > > > > > please resend the logs
>>>>> > > > > >
>>>>> > > > > > Satish
>>>>> > > > > >
>>>>> > > > > > On Mon, 30 Aug 2021, Sam Guo wrote:
>>>>> > > > > >
>>>>> > > > > > > Same compiling error with --with-mumps-serial=1.
>>>>> > > > > > >
>>>>> > > > > > > On Mon, Aug 30, 2021 at 8:22 PM Satish Balay <
>>>>> balay at mcs.anl.gov>
>>>>> > > > > wrote:
>>>>> > > > > > >
>>>>> > > > > > > > Use the additional option: -with-mumps-serial
>>>>> > > > > > > >
>>>>> > > > > > > > Satish
>>>>> > > > > > > >
>>>>> > > > > > > > On Mon, 30 Aug 2021, Sam Guo wrote:
>>>>> > > > > > > >
>>>>> > > > > > > > > Attached please find the configure.log. I use my own
>>>>> CMake. I
>>>>> > > have
>>>>> > > > > > > > > defined -DPETSC_HAVE_MUMPS. Thanks.
>>>>> > > > > > > > >
>>>>> > > > > > > > > On Mon, Aug 30, 2021 at 4:56 PM Sam Guo <
>>>>> sam.guo at cd-adapco.com
>>>>> > > >
>>>>> > > > > wrote:
>>>>> > > > > > > > >
>>>>> > > > > > > > > > I use pre-installed
>>>>> > > > > > > > > >
>>>>> > > > > > > > > > On Mon, Aug 30, 2021 at 4:53 PM Satish Balay <
>>>>> > > balay at mcs.anl.gov>
>>>>> > > > > > > > wrote:
>>>>> > > > > > > > > >
>>>>> > > > > > > > > >>
>>>>> > > > > > > > > >> Are you using --download-mumps or pre-installed
>>>>> mumps? If
>>>>> > > using
>>>>> > > > > > > > > >> pre-installed - try --download-mumps.
>>>>> > > > > > > > > >>
>>>>> > > > > > > > > >> If you still have issues - send us configure.log and
>>>>> > > make.log
>>>>> > > > > from the
>>>>> > > > > > > > > >> failed build.
>>>>> > > > > > > > > >>
>>>>> > > > > > > > > >> Satish
>>>>> > > > > > > > > >>
>>>>> > > > > > > > > >> On Mon, 30 Aug 2021, Sam Guo wrote:
>>>>> > > > > > > > > >>
>>>>> > > > > > > > > >> > Dear PETSc dev team,
>>>>> > > > > > > > > >> > I am compiling petsc 3.15.3 and got following
>>>>> compiling
>>>>> > > > > error
>>>>> > > > > > > > > >> > petsc/src/mat/impls/aij/mpi/mumps/mumps.c:52:31:
>>>>> error:
>>>>> > > > > missing
>>>>> > > > > > > > binary
>>>>> > > > > > > > > >> > operator before token "("
>>>>> > > > > > > > > >> > 52 | #if PETSC_PKG_MUMPS_VERSION_GE(5,3,0)
>>>>> > > > > > > > > >> > Any idea what I did wrong?
>>>>> > > > > > > > > >> >
>>>>> > > > > > > > > >> > 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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210901/563be3be/attachment-0001.html>
More information about the petsc-users
mailing list