[petsc-users] petsc-users Digest, Vol 71, Issue 59

Evan Um evanum at gmail.com
Mon Nov 24 15:01:05 CST 2014


Dear Eric,

After adding the two lines before <petscksp.h>, I was able to compile the
code. It runs correctly. Thanks for your help.

Regards,
Evan



On Mon, Nov 24, 2014 at 11:43 AM, Eric Bavier <bavier at cray.com> wrote:

>
> petsc-users-request at mcs.anl.gov writes:
>
> > Message: 2
> > Date: Mon, 24 Nov 2014 11:28:41 -0800
> > From: Evan Um <evanum at gmail.com>
> > To: petsc-users <petsc-users at mcs.anl.gov>
> > Subject: [petsc-users] Difference between PETSC 3.5.0.0 and 3.5.1.0
> > Message-ID:
> >       <CAP1yThRAs8h-Gii4DFsWB9YenUgcggdjNEXiyv=44Owb=
> j+JGQ at mail.gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Dear PETSC users,
> >
> > I tried to compile my PETSC application code with PETSC 3.5.1.0 but error
> > messages below. For example, some PETSC types were not identified or
> > defined multiple times. The code has #include <petscksp.h>and is compiled
> > with 3.5.0 without any error. I wonder if there is a critical change from
> > 3.5.0.0 to 3.5.1.0. I don't see any changes in Documentation: Changes:
> 3.5
> > from PETSC webpage. Thanks for your help.
> >
> > Regards,
> > Evan
> >
> > CC  -c -O3  esu_main.cpp
> > In file included from /opt/cray/petsc/
> > 3.5.1.0/real/INTEL/140/sandybridge/include/petscsys.h(390),
> >                  from /opt/cray/petsc/
> > 3.5.1.0/real/INTEL/140/sandybridge/include/petscis.h(7),
> >                  from /opt/cray/petsc/
> > 3.5.1.0/real/INTEL/140/sandybridge/include/petscvec.h(9),
> >                  from /opt/cray/petsc/
> > 3.5.1.0/real/INTEL/140/sandybridge/include/petscmat.h(6),
> >                  from /opt/cray/petsc/
> > 3.5.1.0/real/INTEL/140/sandybridge/include/petscpc.h(6),
> >                  from /opt/cray/petsc/
> > 3.5.1.0/real/INTEL/140/sandybridge/include/petscksp.h(6),
> >                  from esu_driver_csem.h(19),
> >                  from esu_main.cpp(19):
> > /opt/cray/petsc/
> 3.5.1.0/real/INTEL/140/sandybridge/include/petscmath.h(274):
> > error: identifier "PETSC_CXX_STATIC_INLINE" is undefined
>
> Evan,
>
> It looks like you're encountering a known bug in the cray release of
> petsc 3.5.1.0, which affects use of petsc with C++ compilers.  This bug
> will be fixed in cray-petsc/3.5.2.0.  In the meantime, you should be
> able to safely add the following two lines before #include <petscksp.h>
> ::
>
> #define PETSC_CXX_STATIC_INLINE static inline
> #define PETSC_CXX_RESTRICT __restrict__
>
> --
> Eric Bavier, Scientific Libraries, Cray Inc.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141124/e7d58fad/attachment.html>


More information about the petsc-users mailing list