LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Octave Parallel Processing (https://www.linuxquestions.org/questions/programming-9/octave-parallel-processing-889206/)

sniff 06-30-2011 10:14 AM

Octave Parallel Processing
 
Hello,

I'm not an Octave expert, I normally use Java/C++ but sometime Matlab/OCtave are useful for things.

So I have a function that takes a few arguments, as follows...

myFunc(int,int,float,string)

I spend a lot of time running it with large numbers of different parameters for the arguments.

I would like to do the following.
Make some sort of list/array with all the parameters in that I want to run the function with.

Tell octave how many CPUs to use. Then press go and let it run through the list of parameters.

The output from the function is independent of the other runs and is saved in a dir the path of which is the string argument.

Anyone help with this, it seems like a simple idea but I can't figure out if it is possible.

Thanks,
Phil

sniff 06-30-2011 11:05 AM

I figured out my own question.

I modified the function to accept the arguments from a cell array.

Made arrays of arguments...
A1 = {int,int,float,string}
A2 = ...

then used parellfun

parcellfun(#cpus, @myfunction, {A1,A2,...,AN})

parcellfun is in the 'general' package on octave-forge in case anyone is interested.


All times are GMT -5. The time now is 05:36 AM.