[petsc-users] PETSc 3.15.3 compiling error
Satish Balay
balay at mcs.anl.gov
Wed Sep 1 14:52:06 CDT 2021
Well the build process used here is:
>> (1) defined -DPETSC_HAVE_MUMPS,
>> (2) compiles and links mat/impls/aij/mpi/mumps/mumps.c
i.e configure is skipped [for mumps part] so PETSC_PKG_MUMPS_VERSION_GE etc are missing [hence this error]
Satish
On Wed, 1 Sep 2021, Junchao Zhang wrote:
> On Wed, Sep 1, 2021 at 2:20 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.
> >
> When petsc is configured with mumps, you will find the macro
> PETSC_PKG_MUMPS_VERSION_GE(MAJOR,MINOR,SUBMINOR) in
> $PETSC_ARCH/include/petscpkg_version.h
> Sam, you can manually compile the failed file, mumps.c, with preprocessing,
> to see what is wrong in the expansion of the macro.
>
>
> >
> > 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
> >>> > > > > > > > > >> >
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> > >
> >>> >
> >>>
> >>>
>
More information about the petsc-users
mailing list