[erlang-questions] performance on multicore computer

Jiansen He jiansenhe@REDACTED
Sun Oct 24 19:48:09 CEST 2010

Thank you, Jesper. my new code is as follows:

%% -- generate all sequences of length exactly n starting at index i or
%% gen_ :: Int -> Int -> [String] -> AssocList [String] Int
gen_ (_, _, []) -> [];
gen_ (I, N, [H | T]) ->
    N > length([H | T]) -> [];
    true ->
       insert({takeN(N, [H | T]), I}, gen_ (I+1, N, T))

%% -- generate all sequences of length at most n
%% gen :: Int -> [String] -> AssocList [String] Int
gen(0, _) ->
gen(N, L) ->
    [Sqs_len_n, Sqs_up_to_n1] = rpc:parallel_eval([concordance_1_1_2, gen_,
[0, N, L], concordance_1_1_2, gen, [(N-1), L]]),

However, when I run this code, I got following error message:

exception error: no function clause matching


     in function  rpc:parallel_eval/1
     in call from concordance_1_1_2:gen/2
     in call from concordance_1_1_2:concordance/2
     in call from concordance_1_1_2:main/2

Can I use rpc:parallel_eval/1 on one machine only.  In this program, I'm
interested in how to utilize a multi-core machine,
although rpc:parallel_eval/1 is definitely a useful machine for cluster

I tried net_adm:ping(nonode@REDACTED), and it give me pang.  nodes() returns

More information about the erlang-questions mailing list