LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-30-2011, 10:14 AM   #1
sniff
Member
 
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE/Debian/ubuntu
Posts: 362

Rep: Reputation: 42
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
 
Old 06-30-2011, 11:05 AM   #2
sniff
Member
 
Registered: Jan 2003
Location: Durham UK
Distribution: openSUSE/Debian/ubuntu
Posts: 362

Original Poster
Rep: Reputation: 42
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
parallel processing on RHEL5 aquamarine Linux - Newbie 1 05-25-2011 07:33 AM
[SOLVED] Parallel Processing in RHEL5 aquamarine Linux - Software 8 05-13-2011 12:43 AM
[SOLVED] A parallel processing question ITPhoenix Linux - Newbie 1 03-06-2011 07:38 AM
Parallel processing and Process management. indiancosmonaut AIX 1 01-30-2008 10:54 AM
is parallel processing possible in distrributed system? sabeen Linux - Distributions 1 03-26-2004 06:40 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration