Hi Jed,<div><br></div><div>Thanks for your reply. Sorry I am not quite sure about what you meant. Did you mean that petscvec.mod was compiled with a older compiler? How to track down this? I compiled petsc with gcc(4.8).</div>
<div><br></div><div>Peter<br><br><div class="gmail_quote">On Tue, Aug 7, 2012 at 5:30 PM, Jed Brown <span dir="ltr"><<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
There is a version of the module compiled using an older compiler version. It could come from here or from system paths. You have to track down the stray module file and delete it (or at least get it out of a path searched by the compiler).<div class="HOEnZb">
<div class="h5"><br>
<br><div class="gmail_quote">On Tue, Aug 7, 2012 at 3:28 PM, Peter Zhoujie Lu <span dir="ltr"><<a href="mailto:lzj@umich.edu" target="_blank">lzj@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote">Hi All,<br><div><div><br></div><div>I am trying to compile my code that uses petscvec, I got an error about version of petscmod.mod. I tried to search online, but couldn't find the answer. I was wondering if anyone can help. I am using gfortran, openmpi on OSX 10.7. The petsc version is 3.3-p2. Thanks.</div>
<div><br></div><div>Peter</div><div><br></div><div>openmpif90 -I../../mod -I../../externals/SU_MPI/mod -I../../externals/ADT/mod -I../../src/python/fortran/aeroElastic -I../../src/inputParam -I../../src/turbulence -I/opt/local/include -DHAS_ISNAN -fpic -r8 -O2 -g -I/Users/lvzhoujie/Work/petsc-3.3-p2/include -I/Users/lvzhoujie/Work/petsc-3.3-p2/linux-ifort-opt/include -I/Users/lvzhoujie/Work/petsc-3.3-p2 -c getADjoint.F90 -o ../../obj/getADjoint.o</div>
<div><br></div><div><div>getADjoint.F90:18.14:</div><div><br></div><div> use petscvec</div><div> 1</div><div>Fatal Error: Wrong module version '9' (expected '4') for file 'petscvec.mod' opened at (1)</div>
<div>make[4]: *** [getADjoint.o] Error 1</div></div></div></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br></div>