[Scilab-users] TR: parallelization

Paul Carrico paul.carrico at free.fr
Fri Nov 23 17:09:53 CET 2012


No suggestion on how to proceed ?

 

Paul

 

De : Paul Carrico [mailto:paul.carrico at free.fr] 
Envoyé : samedi 17 novembre 2012 23:30
À : 'International users mailing list for Scilab.'
Objet : parallelization

 

Dear all,

 

Here is a basic function I would like to perform on a multicore architecture
(the function is just to illustrate the issue) :

-           the inputs have been split into 18 sub-parts 

-          18*20 = 360° 
 elementary Sherlock

 

Thus :

-          How to use “parallel_run” macro ? (not understood)

-          How to store the intermediate results into a final matrix ? has
the chronology of writing can be imposed ?

-          8 procs 
 however 18 = 2*8 +2 
 troubles ?

 

Thanks for any feedback / advice

 

Paul

 

 

 

 

// #####################################################################

mode(0);

 

nb = 18; 

i = [1 : 1 : 20]';

j = [1 : 1 : 20]';

[nl,nc] = size(i)

 

function vect_fct=fct_angles(i, j)

    vect_fct = [i j cos(i)+sin(j) -sin(j)];

endfunction

 

//vect1 = zeros(nb*nl,4);

vect1 = [];

for k = 1 : nb

    vect1 = [vect1 ; fct_angles(nl*(k-1)+i([1: nl],1),nl*(k -1)+j([1:
nl],1))];

 

end

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20121123/aa638a69/attachment.htm>


More information about the users mailing list