A set of labs (local MATLAB workers) for use in the execution of parfor-loops and some statements. Also refers to the command creating for creating said labs. In newer Matlab releases, matlabpool is known as parpool.
Questions tagged [matlabpool]
31 questions
10
votes
1 answer
Can't Get The matlabpool Started
I'm running MATLAB on since about one and a half year now. And I've been trying to get matlabpool ready to go once in nearly every three months. Before I give up on it completely, I've decided to ask for help. :)
My problem starts with matlabpool…

Bedir Yilmaz
- 3,823
- 5
- 34
- 54
3
votes
1 answer
can't use all 8 cores in core i7 for matlab
When I execute
matlabpool open 4;
everything works correctly, but when I try execute
matlabpool open 8;
error occurs immediately. I read about Hyper Threading and I know that 4 of 8 cores are virtual. Does than mean that I cannot use all 8 cores…

Qwer
- 33
- 5
3
votes
1 answer
What determines MaxAllowedNumWorkers?
I want to matlabpool open 24. As the default value of NumWorkers in my machine is 12, I run:
myCluster = parcluster('local');
myCluster.NumWorkers = 12; % 'Modified' property now TRUE
saveProfile(myCluster); % 'local' profile now updated,
…

Franck Dernoncourt
- 77,520
- 72
- 342
- 501
2
votes
2 answers
"the variable in a parfor cannot be classified." error in Matlab
I am trying to implement a very simple program with parfor but I get some errors. I saw nearly all of the SO questions for a possible duplication but non of them was similar to my question situation. The error I get is :
Error: The variable
…

CoderInNetwork
- 2,923
- 4
- 22
- 39
2
votes
1 answer
Parallel pool in Matlab shut down due to error?
I'm trying to execute a code using 12 parallel workers with parfor in Matlab-r2014b. I am allowed to do it since the machine I'm using has 12 cores.
However when I start running the code, after 10-15 minutes, the symbol on the bottom left of the…

TEX
- 2,249
- 20
- 43
2
votes
1 answer
Why parfor-loop spend more time than for-loop?
function test_parfor
N = 1e8;
sum_all = 0; % sum all numbers
sum_odd = 0; % sum odd numbers
sum_even = 0; % sum even numbers
tic;
parfor i = 1 : N
sum_all = sum_all + i; % sum all numbers
if mod(i,2)
sum_odd = sum_odd + i; % sum odd…

chentaocuc
- 177
- 1
- 2
- 8
1
vote
1 answer
Does anyone know how to speed up this simple code running in parallel (with parfor)?
I do time-consuming simulations involving the following (simplified) code:
K=10^5; % large number
L=1000; % smaller number
a=rand(K,L);
b=rand(K,L);
c=rand(L,L);
d=zeros(K,L,L);
parfor m=1:L-1
e=zeros(K,L);
for n=m:L-1
…

Lena K.
- 13
- 2
1
vote
1 answer
How to run two loops simulatenously which share varaibles in MATLAB?
I am trying to implement some logic which can be simplified in the example below:
count = 5;
value = 0;
parfor i = 1:2
if i == 1
for u = 0:count
%Do dome work
pause(5);
value = value + 1;
end
…

Kochez
- 673
- 4
- 10
1
vote
2 answers
Convert matlabpool to parpool in matlab
I have a code from matlab 2010a that I want to run it in matlab 2019a, I'm using parallelism.
matlabpool open 4 %prepares matlab to run in 4 parallel procesors
j1 = batch('parallel1', 'matlabpool', 0);
pause(1)
j2 = batch('parallel2', 'matlabpool',…

Rafael Inostroza
- 29
- 2
1
vote
0 answers
Parallel implementation for Jacobi algorithm takes too much time
I implemented a parallel version of Jacobi's method for the resolution of a linear system. Doing some tests I noticed that the time to execute the function in parallel is very high compared to the time to execute the sequential function. This is…

sergio zavota
- 157
- 3
- 11
1
vote
1 answer
How to add folders containing class definitions to matlab parpool object
I would like to use Matlab's parfor to expedite some parts of my code. Some functions needed for the execution reside in a directory that contains a class definition. Hence I add the requisite directory along with required files to the pool object…

kedarps
- 851
- 9
- 19
1
vote
1 answer
Why do additional workers in a parpool in Matlab sit idle?
I'm trying to use the parpool in Matlab.
I'm using the following code to start the pool and to run the script of choice, but after a little time i get a notification stating that the pool will close down.
The following basically checks to see which…

Bobby
- 65
- 1
- 1
- 7
1
vote
1 answer
Using matlabpool with a specified number of workers
I've been using the command matlabpool open 8 for a while in order to speed up things.
However I just tried using it and am denied 8 cores and now limited to 4.
My laptop is an i7 with 4 cores but hyperthreaded which meant I had no issue making…

user88595
- 195
- 9
1
vote
0 answers
Warning: Using parfor without matlabpool in kmeans matlab
I would like to run the matlab kmeans using 4 lab
I open matlabpool
if ~matlabpool('size')
matlabpool open 4; % Invokes workers
end
I set the option for the kmeans
stream = RandStream('mlfg6331_64'); % Random number stream
options =…

gabboshow
- 5,359
- 12
- 48
- 98
1
vote
1 answer
Unable to delete some files after script crashes
I run a MATLAB script which generates images, saving them into a certain folder. When the code crashes, I cannot delete a few images in that folder unless I restart MATLAB.
Can I solve this problem without restart MATLAB…

user2727676
- 21
- 7