On Fri, 23 Jun 2017, Marcin Błażejowski wrote:
Hi,
as we know MPI block has an option "--send-functions" for sharing any
functions defined in the invoking script with MPI nodes. But what about
packages?
Suppose I have a package consists of three functions: foo1, foo2 and
foo3 and inside the foo3 I have MPI block in which I want to use foo1
and foo2. Will the "--send-functions" option then work? Because I
suppose for now it doesn't.
myrtle:~/stats/test-gretl/mpi$ cat myfuncs.inp
function scalar foo1 (void)
return 1
end function
function scalar foo2 (void)
return 2
end function
function scalar foo3 (void)
mpi --send-functions
eval foo1()
eval foo2()
end mpi --np=2
return 3
end function
myrtle:~/stats/test-gretl/mpi$ cat send_funcs.inp
include myfuncs.inp
eval foo3()
myrtle:~/stats/test-gretl/mpi$ gretlcli -q -b send_funcs.inp
gretl version 2017c-git
? run send_funcs.inp
/home/allin/stats/test-gretl/mpi/send_funcs.inp
? include myfuncs.inp
/home/allin/stats/test-gretl/mpi/myfuncs.inp
? eval foo3()
1
2
gretlmpi 2017c-git
Current session: 2017-06-25 20:14
1
2
Done
3
Done
Can you tell us in what way your case differs from the above?
Thanks.
Allin