help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multicore process - rewriting a for-loop


From: lyvic
Subject: Multicore process - rewriting a for-loop
Date: Mon, 21 Jan 2013 01:28:13 -0800 (PST)

Hello dear Forum,

I'm proud I got this far, but now I'm stuck and need your help:

I have installed Octave and written an routine that works fine. I wanted to
rewrite it in order to use multiple cores on the task and found the 
multicore-package <http://octave.sourceforge.net/multicore/index.html>  .
But now the question:

My code looks like this:

for c1=1:steps
[ze,x,y]=function(ze,y,c1,c2,steps);
endfor;

Now, I do not understand how to transform this into the following form:

Example: If you have your parameters saved in parameter cell
   PARAMETERCELL, the for-loop

        for k=1:numel(PARAMETERCELL)
                RESULTCELL{k} = FHANDLE(PARAMETERCELL{k});
        end

   which you would run in a single process can be run in parallel on
   different cores/machines using STARTMULTICOREMASTER and
   STARTMULTICORESLAVE. Run

        RESULTCELL = STARTMULTICOREMASTER(FHANDLE, PARAMETERCELL, DIRNAME)

It must have to do with the number and the type of parameters I want to hand
over and get back. Is it?
Please give me a hint so I know where I should start looking. I have already
wasted a weekend and am always coming back to the above lines that do not
help me.

regards,

Max



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Multicore-process-rewriting-a-for-loop-tp4649003.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]