1) Make sure you have updated BuildSystem:<div><br></div><div>  cd $PETSC_DIR/config/BuildSystem</div><div>  hg pull -u</div><div><br></div><div>2) Reconfigure and rebuild</div><div><br></div><div>3) If its still broken, send configure.log to <a href="mailto:petsc-maint@mcs.anl.gov">petsc-maint@mcs.anl.gov</a></div>
<div><br></div><div>   Matt<br><br><div class="gmail_quote">On Thu, Jul 5, 2012 at 3:02 PM, hbui <span dir="ltr"><<a href="mailto:hgbk2008@gmail.com" target="_blank">hgbk2008@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
<br>
When compiling a small petsc example, i got an error as such:<br>
<br>
------------------------------<u></u>------------------------------<u></u>--------------------------<br>
In file included from /opt/petsc/petsc-dev/include/<u></u>petscis.h:8:0,<br>
                 from /opt/petsc/petsc-dev/include/<u></u>petscvec.h:9,<br>
                 from /opt/petsc/petsc-dev/include/<u></u>petscmat.h:6,<br>
                 from /opt/petsc/petsc-dev/include/<u></u>petscdm.h:6,<br>
                 from /opt/petsc/petsc-dev/include/<u></u>petscpc.h:6,<br>
                 from /opt/petsc/petsc-dev/include/<u></u>petscksp.h:6,<br>
                 from ../PETScSolver.h:14,<br>
                 from ../PETScSolver.cpp:8:<br>
/opt/petsc/petsc-dev/include/<u></u>petscsf.h:69:119: error: 'MPI_Win' has not been declared<br>
/opt/petsc/petsc-dev/include/<u></u>petscsf.h:70:80: error: 'MPI_Win' has not been declared<br>
/opt/petsc/petsc-dev/include/<u></u>petscsf.h:71:105: error: 'MPI_Win' has not been declared<br>
In file included from /opt/petsc/petsc-dev/include/<u></u>petscvec.h:482:0,<br>
                 from /opt/petsc/petsc-dev/include/<u></u>petscmat.h:6,<br>
                 from /opt/petsc/petsc-dev/include/<u></u>petscdm.h:6,<br>
                 from /opt/petsc/petsc-dev/include/<u></u>petscpc.h:6,<br>
                 from /opt/petsc/petsc-dev/include/<u></u>petscksp.h:6,<br>
                 from ../PETScSolver.h:14,<br>
                 from ../PETScSolver.cpp:8:<br>
/opt/petsc/petsc-dev/include/<u></u>petsc-private/vecimpl.h:498:3: error: 'MPI_Win' does not name a type<br>
------------------------------<u></u>------------------------------<u></u>--------------------------<br>
<br>
I search over the mailing list and see a post which related to this error but i didn't quite understand the answer and the user has also discontinued the thread.<br>
<a href="http://lists.mcs.anl.gov/pipermail/petsc-dev/2011-November/006227.html" target="_blank">http://lists.mcs.anl.gov/<u></u>pipermail/petsc-dev/2011-<u></u>November/006227.html</a><br>
<br>
I tried to trace back the definition of MPI_Win struct and see as below:<br>
<br>
#ifndef PETSC_HAVE_MPI_WIN_CREATE<br>
#define PETSC_HAVE_MPI_WIN_CREATE 1<br>
#endif<br>
<br>
#if !defined(PETSC_HAVE_MPI_WIN_<u></u>CREATE) /* The intent here is to be able to compile even without a complete MPI. */<br>
typedef struct MPI_Win_MISSING *MPI_Win;<br>
#endif<br>
<br>
For some reason the ./configure define PETSC_HAVE_MPI_WIN_CREATE and compiler skip the MPI_Win definition. However, i also don't know where the struct MPI_Win_MISSING is defined.<br>
<br>
Please advise the method to resolve this compilation error.<br>
<br>
My system is Ubuntu 12.04, Gcc 4.6.3.<br>
<br>
Regards,<br>
Giang Bui<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>
</div>