Thus, I would urge all example authors to return a value of 0 from
main() after MPI_Finalize() -- or return MPI_Finalize(). The reasons
for this are more than pedagogical, I think, in the case of MPI. The
return value of main() is returned to the operating system, and may be
checked by invoking processes. It seems that batch systems in
particular might infer failure of a job that did not fail and take
inappropriate action as a result.
Maybe it's just because the term is about to start and I am feeling
the pressure of curious young minds, but it seems that examples in the
document should be examples not only of the particular point being
made at the time, but also of good MPI programming practice.
Best Regards,
Andrew Lumsdaine