[petsc-dev] gcc 10

Barry Smith bsmith at petsc.dev
Mon Jul 13 12:43:05 CDT 2020


  I told everyone in that thread how it should be fixed. 

The fix for this is to add PetscObjectSetName() to src/sys/f90-mod/petscsys.h90 with the * notation to allow any type. You will see in that file PetscObjectReference() etc.

   PetsFE is an INTEGER(8)  in Fortran because no one has updated it yet to be a Fortran type. You will see in include/petsc/finclude/petscdm.h that only DM has be properly updated to be a Fortran type, a bunch of others are still treated as integers and need to be fixed eventually.

#define DM               type(tDM)

#define DMAdaptor        PetscFortranAddr
#define PetscQuadrature  PetscFortranAddr
#define PetscDS          PetscFortranAddr
#define PetscFE          PetscFortranAddr
#define PetscSpace       PetscFortranAddr
#define PetscDualSpace   PetscFortranAddr
#define PetscFV          PetscFortranAddr
#define PetscLimiter     PetscFortranAddr
#define PetscPartitioner PetscFortranAddr
#define DMField          PetscFortranAddr

   We do not need to configure check this, we need to fix the PETSc source so it follows F90 (yes, F90 standards, Gnu is still catching up :-).

  Barry

  A separate issue is external packages do not follow Fortran standards so generate such errors as well, but that is not our business, we just always force turn off the Fortran error checking for external packages.

> On Jul 13, 2020, at 12:34 PM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> Why did Mark have the gcc 10 failure on our example. Was it something with did in it?
> 
>    Matt
> 
> On Mon, Jul 13, 2020 at 12:43 PM Jed Brown <jed at jedbrown.org <mailto:jed at jedbrown.org>> wrote:
> You want this for PETSc or for external packages?  We add it for a bunch of external packages.  I've been building PETSc with gcc/gfortran-10 for months now.
> 
> Matthew Knepley <knepley at gmail.com <mailto:knepley at gmail.com>> writes:
> 
> > Do we have gfortran from gcc 10 running anywhere? We need a check to enable
> >
> >   -fallow-argument-mismatch
> >
> > from configure. Should be as simple as compiling Fortran which has
> > PetscObjectSetName() in it.
> >
> >   Thanks,
> >
> >       Matt
> >
> > -- 
> > 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/ <https://www.cse.buffalo.edu/~knepley/> <http://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>>
> 
> 
> -- 
> 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-dev/attachments/20200713/29f2d61d/attachment.html>


More information about the petsc-dev mailing list