Message-ID: <1348647102.31596.63.camel@milan>
Date: 2012-09-26T08:11:42Z
From: Milan Bouchet-Valat
Subject: Help needed on parallel processing
In-Reply-To: <CAKC+_z_U0WAmcrC2s0KgqeEEiSjyRrYPkj9OaLXoewurszJODA@mail.gmail.com>
Le mercredi 26 septembre 2012 ? 13:04 +0530, Anindya Sankar Dey a
?crit :
> Hi All,
>
> If i have a vector say x<-1:10 and then use
>
> parLapply(cl,x,function(k){k=k*2; return(k);}
>
> it works and will also parallel process depending on the number of cores
> and the number of clusters I've built in cl.
>
>
> My query is, if I want this function -
>
> function(k1,k2){ s=k1+k2; return(s);}
>
> to work using parallel processing what will be the procedure.
I think you should have a look at the clusterMap() function. It's the
parallel equivalent of mapply().
My two cents