On Sat, 14 Jan 2017, Riccardo (Jack) Lucchetti wrote:
On Sat, 14 Jan 2017, Allin Cottrell wrote:
> This relates to the thread started By Sven in
>
http://lists.wfu.edu/pipermail/gretl-devel/2017-January/007254.html
> but I think it merits a thread of its own.
>
> When working up an MPI-based variant of the task Sven's talking about
> (launching a bunch of parallel processes, each of which carries out the
> same basic computation but with a process-specific set of parameter values)
> I noticed something that's a little awkward. Namely, for almost everything
> that's indexable in hansl, the index starts at 1, but with MPI we've
> carried over the underlying MPI specification in which the indexation of
> processes starts at 0 (so n parallel processes have IDs 0 to n-1).
>
> So long as what's in place is clearly documented (and I think it is), a
> hansl coder should be able to handle this without huge difficulty.
> Nonetheless I wonder if we'd be better to identify MPI processes in hansl
> using a 1-based index. This would be easy to arrange, but would be
> backward-incompatible. Which leads to two questions:
>
> 1) Does anyone at this point have an investment in gretl-MPI scripts that
> use 0-based process IDs? (I suspect not, but maybe I'm wrong.)
I really don't think so. And even if it were so, anyone who's savvy enough to
write scripts using our MPI functions in a non-trivial way should have no
problem adjusting to the new convention.
> 2) If backward-compatibility turns out not to be a serious issue, do we
> think it's worthwhile to switch to 1-based MPI process IDs?
Having said the above, I don't see huge advantages either; In fact, the idea
that there is a "#0 worker", perhaps makes it a little bit more evident that
that worker has a somewhat different, specialised role. However if others
feel otherwise, I wouldn't insist.
Thanks, Jack (also thanks to Sven for comments).
My feeling now is that there isn't a compelling case for switching.
MPI looks a bit "foreign" within hansl, with a 0-based index and (as
Sven noted) the unfamiliar term "rank" for what gets indexed. But
maybe that's not such a bad thing, since MPI is indeed somewhat
foreign: it takes something of a mental leap to figure how to write
common code for a set of parallel processes. Besides, if we stay
with the conventions of MPI itself, we make it easier for users to
cross-reference with the documentation for OpenMPI or MPICH (which
can be helpful for understanding the general ideas, even if you're
not coding in C or Fortran.)
Allin