Hi,
I don't see that you got an answer to this question. By this time you have
probably know anyway but ...
Ets tables are local to a node. The id returned when creating an ets table
is a number which is only relevant on the node on which the table was
created. So to getting your program to work you would first have to
distribute the ets table to all nodes on which you wish to use it and modify
your algorithm to use the local tables.
An alternative may be to use mnesia which is distributed and can distribute
its data over many nodes.
Sorry, there is nothing else to do. You could create a process on the main
node to access the ets table and use its pid, but I am certain that this
would be slow.
Robert
2009/11/9 sapan shah <>
> HI,
>> I use digraph module to create graphs and apply some functions on it. The
> digraph is internally stored as ets tuples.
> I am using mapreduce architecture to speed up the computations on the
> digraph (using plists.erl from Stephen Marsh).
> So, When the graph is passed to a process on some other node on network, it
> exits with error. (may be because it is not able to access the ets tuples)
> Any solution???
>> Below is a small test example to generate the error
> %%%%%%%%%%%%%%%%%%%%%%%%%%%
> -module(pliststest).
> -compile(export_all).
>> malt() ->
> [100, {nodes, [{'', 3}, {'', 3}]}].
>> test(G, List) ->
> Fun = fun(X) -> io:format("TROUBLE: ~p~n",[digraph:vertices(G)]),
> lists:foldr(fun(_Y,ACC) -> ACC+1 end, 0, X) end,
> Fuse = fun(X, Y) -> X+Y end,
> plists:runmany(Fun, Fuse, List, malt()).
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> Also, PFA the plists.erl (from Stephen Marsh).
>> --
> Regards,
> Sapan Shah
>>> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html> erlang-questions (at) erlang.org
>