Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: what is MATLAB POOL ?
Replies: 4   Last Post: May 16, 2012 2:32 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nathan Orloff

Posts: 65
Registered: 10/1/10
Re: what is MATLAB POOL ?
Posted: May 16, 2012 2:32 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

%% open your matlab pool of processors. This is a number less than the cores in your computer. This is not the GPU cuda integration.

matlabpool open 2

%% Setup your function list.
% these are the two function I want to run independently on each core.
funList = {@func1,@func2};

% this is the input for each function. Use structures for functions with multiple inputs.
dataList = {data1,data2};

%% Now run the functions.
spmd
labBarrier
output = funList{labindex}(dataList{labindex});
end

%% Now you need to reed your input.
process1output = output{1};
process2output = output{2};

%% Once you close the lab you cant access output.
matlabpool close



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.