Rank: 47074 based on downloads (last 30 days) and 0 files submitted
photo

Karl

E-mail

Personal Profile:

Professional Interests:
music, signal processing, love, films, photos and whatnot

 

Watch this Author's files

 

Comments and Ratings by Karl View all
Updated File Comments Rating
04 Nov 2009 Multicore - Parallel processing on multiple cores This package realizes parallel processing on multiple cores/machines. Author: Markus Buehren

Hi Markus,

first of all -- you've developed a great tool that helps me a lot with my simulations in the field of audio signal processing. Seeing my dual quad core at 100% (instead of 13%) load warms my heart :).

Well, I'm not sure whether I'm getting something wrong here, but I had some problems when the function that is executed by the multicoremaster() (and the slaves) has more than one return value. It seems that in this case all but the first return values get lost. I applied a little trick that I found out about some time ago to solve this problem:
Everytime that feval() is called (in startmulticoremaster() and startmulticoreslave() ) I added something like this:

N_returnValues = nargout(functionHandleCell{k});
clear('returnValue'); % this is dirty! The next call doesn't work
     % without clearing "returnValue" beforehand if
     % N_returnValues==1. If it's greater->no
     % problem (even without clearing
     % "returnValue")
[returnValue{1:N_returnValues}] = feval(functionHandleCell{k}, parameterCell{k}{:}); % ha!
resultCell{k} = returnValue;

Doing so, the resultsCell that is returned from startmulticoremaster() is always a cell -- even if the called function has only one return value...

I hope this is of any value to anybody and that I'm not causing trouble by posting this hack :). I'm always open to learn a better solution....

Cheers, and thanks again for Multicore!

    Karl

04 Nov 2009 Multicore - Parallel processing on multiple cores This package realizes parallel processing on multiple cores/machines. Author: Markus Buehren

Contact us at files@mathworks.com