[petsc-users] Problem in header file petscerror.h

Jed Brown jedbrown at mcs.anl.gov
Fri May 31 11:51:25 CDT 2013


Mohsin Iqbal <mohsin139 at gmail.com> writes:

> Hello,
>
> I am compiling an application that is using petsc. *petsc-3.0.0-p12* is
> installed in /opt/petsc. During the compilation I am getting this stream of
> errors.
>
> In file included from /opt/petsc/include/petsc.h:1353,
>                  from /opt/petsc/include/petscis.h:7,
>                  from /opt/petsc/include/petscvec.h:9,
>                  from /opt/petsc/include/petscmat.h:6,
>                  from /opt/petsc/include/petscpc.h:6,
>                  from /opt/petsc/include/petscksp.h:6,
>                  from
> /root/resmgmt/applications/Malleability/Quadflow/quadflow/Library/flow_solver/Source/Include/petsc_c.h:17,
>                  from Main/misc_dir/alloc_mem.c:4:
> /opt/petsc/include/petscerror.h:320: error: expected ‘=’, ‘,’, ‘;’, ‘asm’
> or ‘__attribute__’ before ‘PetscTruth’
> /opt/petsc/include/petscerror.h:355: error: expected ‘=’, ‘,’, ‘;’, ‘asm’
> or ‘__attribute__’ before ‘PetscTruth’
> /opt/petsc/include/petscerror.h:398: error: expected ‘=’, ‘,’, ‘;’, ‘asm’
> or ‘__attribute__’ before ‘PetscErrorCode’

That line is PETSC_STATIC_INLINE, which should have be defined in
petscconf.h.  I'm guessing you have a mixed up environment.  You can try
using the -M compiler option to find out which petscconf.h is being
included.

And please upgrade to petsc-3.4.


More information about the petsc-users mailing list