From: Roy Stogner <roystgnr@ic...> - 2011-10-22 22:13:06
On Sat, 22 Oct 2011, Wen Jiang wrote:
> I am wondering what does exactly 'semiparallel_only()' mean in the
> petsc_matrix.c file.
See the comment above its definition in the petsc_matrix.h file:
// Macro to identify and debug functions which should be called in
// parallel on parallel matrices but which may be called in serial on
// serial matrices.
In other words: if you have a parallel sparse matrix M, and you call
something like M.l1_norm() on processors 1, 2, and 3, then you'd
better also be calling M.l1_norm() at the same time on processor 4 if
you don't want your program to die or lock up. semiparallel_only() is
an attempt (how good an attempt depends on what processor 4 is doing
instead and what your MPI stack does on certain errors) to exit such
situations with more informative output.