Am 07.01.2017 um 17:30 schrieb Allin Cottrell:
On Sat, 7 Jan 2017, Sven Schreiber wrote:
> Yeah, now you're converging exactly to what I was trying to
do! Launch
> several gretl processes with the help of the shell. Only that I want
> to be able to do it from within gretl, hence the use of the "launch"
> command in gretl/hansl.
I don't quite get why it's advantageous to do this from within gretl,
but you might try (on Windows):
<hansl>
! start gretlcli -b script.inp
</hansl>
I believe that "start" is supposed to background a task under cmd.exe.
Yes that seems to work, including the fact that the started gretlcli has
the same CWD set, which is good.
For the same thing to work on *nixy platforms: Do I get your earlier
statement ("For "launch" ... I've now modified this to use a more
complex function that allows for such a [CWD] setting.") right in the
sense that the effect of "! start ..." on Windows can thus be obtained
on Linux with "launch ...." (in git)?
I've also experimented with MPI a little again. One problem seems to be
that it's not so easy to get shared data from before the mpi block to be
available in the mpi block scope. For example, the following gives an
error "hey undefined":
<hansl>
function void mc(scalar hey)
mpi
s = hey
end mpi
end function
mc(2)
</hansl>
Perhaps one needs a "--send-variables" option similar to --send-data for
the foreign command or to the --send-functions option from mpi itself.
Also, in the mpi documentation I came across the footnote " A possible
future extension is to support the passing of bundles between
processes." and I think that's exactly right, for my purposes just
passing scalars and matrices is not enough; especially given our adopted
style for function packages to setup a bundle initially.
Later / tomorrow I'm hopefully going to put together a toy example that
should also show why it's nice to be able to do it from within gretl.
thanks,
sven