Hi again In the following new example, there's something I do not caught ; I cannot figure out what I'm misunderstanding
Am I right to say that n calculations are splitted on the available processors? Paul ################################################################" mode(0); stacksize('max'); clear; function U=fct(R1, i1, R2, i2) U1 = R1. * i1; U2 = R2. * i2; U = [U1 U2]'; // matrice (2x1) a chaque iteration apres tansposition clear U1; clear U2; endfunction n = 1000; // les vecteurs doivent etre en ligne pour la parallelisation i1 = grand(1,n,'unf',0,0.1); R1 = grand(1,n,'unf',0,500); i2 = grand(1,n,'unf',0,0.1); R2 = grand(1,n,'unf',0,1000); // using parallel_run Result = zeros(2,n); // au final, on a une matrice de dim (2xn) tic() Result = parallel_run([R1,i1,R2,i2], fct,[2,1]); // pour les n calculs, on sont un vecteur de dim (2x1) = meme dimension que U en sortie disp(Result); time = toc(); printf("time = %g\n",time); EXPORT CONTROL : Cet email ne contient pas de données techniques This email does not contain technical data
_______________________________________________ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users