<div dir="ltr">Just if wondering what the actual code is, here&#39;s the bit causing the trouble:<div><br></div><div>
AOApplicationToPetsc(ao, ghostNodes.size(), (int*)ghostNodes);<br>VecCreateGhost(comm, localNodes.size(), PETSC_DECIDE, ghostNodes.size(), (int*)ghostNodes, &amp;v);<br>AOPetscToApplication(ao, ghostNodes.size(), (int*)ghostNodes);</div>

<div><br></div><div>when the code is in serial, ghostNodes.size() = 0 and (int*)ghostNodes = NULL.</div><div><br></div><div><br><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px">
</pre>
</pre><div class="gmail_quote">On Mon, Feb 20, 2012 at 3:54 PM, Mohammad Mirzadeh <span dir="ltr">&lt;<a href="mailto:mirzadeh@gmail.com">mirzadeh@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Sure, Jed. My bad. Here&#39;s the whole message when the code is run in _serial_:<div><br></div><div><div>[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div><div>
[0]PETSC ERROR: Invalid pointer!</div>

<div>[0]PETSC ERROR: Null Pointer: Parameter # 3!</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 6, Wed Jan 11 09:28:45 CST 2012 </div>


<div>[0]PETSC ERROR: See docs/changes/index.html for recent updates.</div><div>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.</div><div>[0]PETSC ERROR: See docs/index.html for manual pages.</div><div>


[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: ./petsc on a arch-linu named mohammad-laptop by mohammad Mon Feb 20 15:52:25 2012</div><div>[0]PETSC ERROR: Libraries linked from /home/mohammad/soft/petsc-3.2-p6/arch-linux2-cxx-debug/lib</div>


<div>[0]PETSC ERROR: Configure run at Thu Feb 16 02:16:40 2012</div><div>[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --with-clanguage=cxx --download-f-blas-lapack=1 --download-mpich=1 --download-hypre=1 --download-ml=1 --with-parmetis-include=/home/mohammad/soft/parmetis/include --with-parmetis-lib=&quot;-L/home/mohammad/soft/parmetis/lib -lparmetis -lmetis&quot; --download-superlu_dist=1</div>


<div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: AOApplicationToPetsc() line 249 in /home/mohammad/soft/petsc-3.2-p6/src/dm/ao/interface/ao.c</div><div>


[0]PETSC ERROR: --------------------- Error Message ------------------------------------</div><div>[0]PETSC ERROR: Invalid pointer!</div><div>[0]PETSC ERROR: Null Pointer: Parameter # 3!</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div>


<div>[0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 6, Wed Jan 11 09:28:45 CST 2012 </div><div>[0]PETSC ERROR: See docs/changes/index.html for recent updates.</div><div>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.</div>


<div>[0]PETSC ERROR: See docs/index.html for manual pages.</div><div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: ./petsc on a arch-linu named mohammad-laptop by mohammad Mon Feb 20 15:52:25 2012</div>


<div>[0]PETSC ERROR: Libraries linked from /home/mohammad/soft/petsc-3.2-p6/arch-linux2-cxx-debug/lib</div><div>[0]PETSC ERROR: Configure run at Thu Feb 16 02:16:40 2012</div><div>[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --with-clanguage=cxx --download-f-blas-lapack=1 --download-mpich=1 --download-hypre=1 --download-ml=1 --with-parmetis-include=/home/mohammad/soft/parmetis/include --with-parmetis-lib=&quot;-L/home/mohammad/soft/parmetis/lib -lparmetis -lmetis&quot; --download-superlu_dist=1</div>


<div>[0]PETSC ERROR: ------------------------------------------------------------------------</div><div>[0]PETSC ERROR: AOPetscToApplication() line 210 in /home/mohammad/soft/petsc-3.2-p6/src/dm/ao/interface/ao.c</div><div>


<br></div><div><br></div><div>It seems to complain about the 3rd parameter of AOApplicationToPetsc() and AOPetscToApplication(). VecCreateGhost, on the other hand, is fine.</div><div><div class="h5"><br><div class="gmail_quote">

On Mon, Feb 20, 2012 at 3:47 PM, Jed Brown <span dir="ltr">&lt;<a href="mailto:jedbrown@mcs.anl.gov" target="_blank">jedbrown@mcs.anl.gov</a>&gt;</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"><div>On Mon, Feb 20, 2012 at 17:25, Mohammad Mirzadeh <span dir="ltr">&lt;<a href="mailto:mirzadeh@gmail.com" target="_blank">mirzadeh@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi,<div><br></div><div>Is there an internal check to see if the &#39;ghost&#39; pointer in VecCreateGhost() is NULL ? This can happen, for example, if the code is run in serial and the there are no ghost points (hence n_ghost = 0 and ghost = NULL(implementation dependent of course) ). AOXXXXToYYYY functions seem to crash if the corresponding pointer is NULL.</div>



</div></blockquote><div><br></div></div><div>Always send the whole error message. </div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div>