[petsc-users] Problem in header file petscerror.h
Satish Balay
balay at mcs.anl.gov
Fri May 31 11:49:02 CDT 2013
On Fri, 31 May 2013, Mohsin Iqbal wrote:
> Hello,
>
> I am compiling an application that is using petsc. *petsc-3.0.0-p12* is
this versions is very old. We suggest using latest petsc release
[currently 3.4] - and upgrading your code to work with it.
> installed in /opt/petsc. During the compilation I am getting this stream of
> errors.
Can you verify if a PETSc exmaple [from this version of PETSc] compile
and run fine with this install of PETSc?
>
> 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’
The line of code here is:
>>>>
PETSC_STATIC_INLINE PetscTruth PetscExceptionCaught(PetscErrorCode xierr,PetscErrorCode zierr)
<<<
So perhaps the compiler is not able to resolve the macro
'PETSC_STATIC_INLINE'. Are you using PETSc makefiles for your
application? If not - compare your compile command with the one you
get when you build a PETSc example using PETSc makefile [say
src/ksp/ksp/examples/tuotirals/ex2.c]
Satish
> /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’
> In file included from /opt/petsc/include/petsc.h:1435,
> 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/petsclog.h:309: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘PetscErrorCode’
> In file included 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/petscis.h:127: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘PetscErrorCode’
>
> Can someone give any clue to rectify this problem.
>
> Thanks.
>
More information about the petsc-users
mailing list