Am 12.08.2020 um 17:49 schrieb Allin Cottrell:
On Wed, 12 Aug 2020, Sven Schreiber wrote:
> I'm currently facing a problem running a function inside an
MPI block,
> when lists inside a bundle are used and accessed. (The context is the
> johansensmall.gfn package, where the combination of exogenous terms and
> running it under MPI fails.)
>
> I'm not finished with the bughunting and want to try to produce a
> minimal example, but I wanted to ask here already whether my suspicion
> is plausible:
>
> Because the MPI block doesn't inherit the dataset context of the calling
> environment, for the bootstrap simulation I create a new dataset
> environment via 'nulldata <...> --preserve'. In there I create the
> simulated series. This works in principle. Am I right in assuming that
> gretl is having problems when I use a previously packaged list like
> mybundle.xlist and try to stuff it into the new dataset environment? I
> have double-checked that $nobs matches the length of the variables in
> the list, but is that enough?
In passing a list via a bundle you're just passing a vector of series ID
numbers. This will be usable qua list in the target function only if, in
the dataset context in the target, there exist series answering to those
IDs.
Hm, right. I guess I need to use "--send-data", actually I don't
remember why I didn't do that right away.
But if I were to do only: "--send-data=mylist", are the ID numbers of
mylist in the original dataset somehow translated to the MPI context
where only the subset is present?
(What I mean is: suppose I have series x, y, z. And mylist=deflist(x,z),
so consisting of IDs 1 and 3. Inside the MPI block only x and z then
exist, presumably with local IDs 1 and 2. If I reference mylist in
there, will it look for IDs 1 and 3 or for 1 and 2? And of course
what's worse, what if mylist is wrapped in a bundle?)
thanks
sven