Am 02.02.2024 um 15:12 schrieb Allin Cottrell:
 Right, but that happens automatically within any given gretl process, 
 regardless of whether any series, or list of series, is passed to the 
 called function. As a trivial illustration:
 ....
 In the MPI context the dataset (if present) is not automatically 
 passed between distinct gretl processes, but this is ensured by the 
 --send-data option for a mpi block. Another trivial illustration:
 
Aha! That's very interesting, I wasn't aware of it, because I thought it 
would go against the idea of function encapsulation. But very useful 
here, so I don't need any workaround, it seems.
 There's one gotcha to note here. If you don't need to pass
the entire 
 dataset in the MPI context you can use --send-data=L, where L is a 
 list of series, BUT this won't work if L contains just const. That's 
 because inter-process transfer of data is done using a gdt or gdtb 
 file, and "const" is not explicitly represented in such a file. Trying 
 to save a gdt[b] file containing no series other than const will fail 
 with the message "No data to save!". It's fine if L contains just a 
 single series, but it can't be series 0.  
That's OK.
 You could insert "list L = index" before the mpi block
above, and make 
 the option --send-data=L. 
I guess a "genr index" would also be needed,
because not every existing 
dataset has the index series. But it's not really needed anyway.
 Anyway, the behavior you found with exists() is clearly wrong, and I'm 
 satisfied that a proper fix can be engineered: we'll give the called 
 function a copy of const under the parameter name rather then doing 
 the "shift and rename" thing. That should be in git quite soon.
 
OK, good.
sven