<div dir="ltr">Dear Eric,<div><br></div><div>After adding the two lines before <petscksp.h>, I was able to compile the code. It runs correctly. Thanks for your help.</div><div><br></div><div>Regards,</div><div>Evan</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 24, 2014 at 11:43 AM, Eric Bavier <span dir="ltr"><<a href="mailto:bavier@cray.com" target="_blank">bavier@cray.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<a href="mailto:petsc-users-request@mcs.anl.gov">petsc-users-request@mcs.anl.gov</a> writes:<br>
<br>
> Message: 2<br>
> Date: Mon, 24 Nov 2014 11:28:41 -0800<br>
> From: Evan Um <<a href="mailto:evanum@gmail.com">evanum@gmail.com</a>><br>
> To: petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br>
> Subject: [petsc-users] Difference between PETSC 3.5.0.0 and 3.5.1.0<br>
> Message-ID:<br>
>       <CAP1yThRAs8h-Gii4DFsWB9YenUgcggdjNEXiyv=44Owb=<a href="mailto:j%2BJGQ@mail.gmail.com">j+JGQ@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> Dear PETSC users,<br>
><br>
> I tried to compile my PETSC application code with PETSC 3.5.1.0 but error<br>
> messages below. For example, some PETSC types were not identified or<br>
> defined multiple times. The code has #include <petscksp.h>and is compiled<br>
> with 3.5.0 without any error. I wonder if there is a critical change from<br>
> 3.5.0.0 to 3.5.1.0. I don't see any changes in Documentation: Changes: 3.5<br>
> from PETSC webpage. Thanks for your help.<br>
><br>
> Regards,<br>
> Evan<br>
><br>
> CC  -c -O3  esu_main.cpp<br>
> In file included from /opt/cray/petsc/<br>
> <a href="http://3.5.1.0/real/INTEL/140/sandybridge/include/petscsys.h(390)" target="_blank">3.5.1.0/real/INTEL/140/sandybridge/include/petscsys.h(390)</a>,<br>
>                  from /opt/cray/petsc/<br>
> <a href="http://3.5.1.0/real/INTEL/140/sandybridge/include/petscis.h(7)" target="_blank">3.5.1.0/real/INTEL/140/sandybridge/include/petscis.h(7)</a>,<br>
>                  from /opt/cray/petsc/<br>
> <a href="http://3.5.1.0/real/INTEL/140/sandybridge/include/petscvec.h(9)" target="_blank">3.5.1.0/real/INTEL/140/sandybridge/include/petscvec.h(9)</a>,<br>
>                  from /opt/cray/petsc/<br>
> <a href="http://3.5.1.0/real/INTEL/140/sandybridge/include/petscmat.h(6)" target="_blank">3.5.1.0/real/INTEL/140/sandybridge/include/petscmat.h(6)</a>,<br>
>                  from /opt/cray/petsc/<br>
> <a href="http://3.5.1.0/real/INTEL/140/sandybridge/include/petscpc.h(6)" target="_blank">3.5.1.0/real/INTEL/140/sandybridge/include/petscpc.h(6)</a>,<br>
>                  from /opt/cray/petsc/<br>
> <a href="http://3.5.1.0/real/INTEL/140/sandybridge/include/petscksp.h(6)" target="_blank">3.5.1.0/real/INTEL/140/sandybridge/include/petscksp.h(6)</a>,<br>
>                  from esu_driver_csem.h(19),<br>
>                  from esu_main.cpp(19):<br>
> /opt/cray/petsc/<a href="http://3.5.1.0/real/INTEL/140/sandybridge/include/petscmath.h(274)" target="_blank">3.5.1.0/real/INTEL/140/sandybridge/include/petscmath.h(274)</a>:<br>
> error: identifier "PETSC_CXX_STATIC_INLINE" is undefined<br>
<br>
</div></div>Evan,<br>
<br>
It looks like you're encountering a known bug in the cray release of<br>
petsc 3.5.1.0, which affects use of petsc with C++ compilers.  This bug<br>
will be fixed in cray-petsc/<a href="http://3.5.2.0" target="_blank">3.5.2.0</a>.  In the meantime, you should be<br>
able to safely add the following two lines before #include <petscksp.h><br>
::<br>
<br>
#define PETSC_CXX_STATIC_INLINE static inline<br>
#define PETSC_CXX_RESTRICT __restrict__<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Eric Bavier, Scientific Libraries, Cray Inc.<br>
</font></span></blockquote></div><br></div>