Am 16.02.2015 um 14:45 schrieb Allin Cottrell:
On Mon, 16 Feb 2015, Sven Schreiber wrote:
> 2) AFAICS the mpi block is encapsulated like a function body,
that is
> no variables/objects from outside the mpi block can be directly used
> inside. The analogy to the "foreign" block is clearly explained, but
> intuitively I think there is a difference: the mpi feature is supposed
> to be part of gretl, so I do not quite like it that suddenly the
> scoping rules within a hansl script change.
I see what you mean, but it would be difficult to do otherwise. As with
"foreign", an MPI block means that a distinct program is being launched,
with its own address space. No variables carry over automatically,
anything that's wanted has to be communicated via file. But I suppose we
could consider trying to make this "transparent" to the user (i.e.
transmit everything in the background, probably via an XML serialization).
I guess that would be good, or change the "mpi" block to "foreign
language=mpihansl". (I'm not 100% serious here, but it would be a clear
signal.) My first priority here is not asking for a new feature but
having a reasonably clean syntax.
Another thought I was having is whether these scripts can be made
portable, in the sense that they would also run on a machine without MPI
(in a single process then, of course). But I still have to get familiar
with the gretl-mpi setup.
thanks,
sven