On Fri, 30 Jun 2017, Marcin Błażejowski wrote:
W dniu 30.06.2017 o 18:02, Marcin Błażejowski pisze:
>
> Hm,
> send_function.gfn now works, but when I started testing --send-functions
> in my (much bigger) BMA package I got an error:
> -----
> mpiexec exited with status 256stdout:
> This function needs a dataset in place
> -----
I found it!!!
In order to --send-functions works correctly I have to set 'Data
requirement' package option to "No dataset needed".
The same issue is with send_func.gfn in attachement.
Hmm. So the public function in BMA requires a dataset, but the
private functions you're calling, under MPI, don't have such a
requirement?
Then I suppose it's a feasible hack to drop the dataset requirement
from the package specification, but that doesn't really seem right
to me: a package should, ideally, honestly state whether it needs a
dataset or not.
I've just added in git, an option --send-data for the mpi-block
command, which works in the same sort of way as under "foreign"
(except that in this case we can use gretl's native gdt/gdtb formats
to send the data to gretlmpi). However, if you don't really need to
send the dataset this may just waste CPU cycles in your case.
Seems to me that you're trying to use gretl's "mpi" block in a way
that was not intended. That leaves open the question: even if it was
not originally intended, should it nonetheless be supported,
somehow? Possibly, but I think it would be cleaner (if you want to
support both MPI-enabled gretl and basic gretl) if you were to
branch the package code early on, conditional on presence of MPI
support: if so, do this (go into MPI mode right away); if not, do
the other.
Allin