← Back to team overview

dolfin team mailing list archive

Problem with missing ghost values

 

The unit test currently failing on the Mac buildbot (timing out) is
failing on my machine (Ubuntu 11.10) with a PETSc error claiming that
the vector in question is not ghosted.

I've tracked it down to the plotting from the C++ eigenvalue demo, and
the call to gather() from within interpolate_vertex_values.

The problem is that the Function to be plotted is created from a
solution vector x from the eigenvalue problem like so:

  Function u(V, x);

Since x does not come from a Function to begin with, it was not
initialized with ghost values, so then later when
u.interpolated_vertex_values is called, the call to gather() fails.

Should there be a test for whether ghost values exist in either
PETScVector or Function (_have_ghost_values)?

On top of this, the call to plot() does not work in parallel from C++
anyway so it's easy to make the bug disappear (by moving the check in
the plot function earlier to before the call to
interpolate_vertex_values), but it exposes a problem with the
constructor

  Function u(V, x);

which may not make sense if x does not have the proper layout.

--
Anders


Follow ups