필터 지우기
필터 지우기

connector not running message while executing parallel code on cluster

조회 수: 1 (최근 30일)
Soumyadipta Sengupta
Soumyadipta Sengupta 2018년 12월 19일
답변: Prem Ankur 2018년 12월 26일
I am running the following test code on a cluster.
clc;clear all;
x=32;
poolobj=parpool(x);
A = zeros(32, 11);
tic
parfor (i = 1:32,x)
A(i,:) = compute(A(i,:),i);
end
toc
disp(A);
The function file is a separate file
% This function now contains the body
% of the parfor-loop
function A = compute(A,i)
for j = 1:11
A(j) = i + j - 1;
end
end
Output- It displays the A matrix but it gives a message afterwards
>> >> >> message with properties:
Identifier: 'MATLAB:connector:connector:ConnectorNotRunning'
Arguments: {}
Is the for loop actually working on 32 cores ? It does give a message that a parallel pool of 32 workers has been started. Although, the time taken for lesser cores is smaller. What does this message imply ?
  댓글 수: 2
Prem Ankur
Prem Ankur 2018년 12월 21일
Yes, the code will run on the 32 workers in the parpool. Total time taken depends on the length of time taken by the compute function in the code and then the overhead of sending the data to the 32 workers and receiving the results. Overhead time can be greater than the benefit of parallelizing to the 32 workers. Doing something more computationally intensive will show better scaling properties.
I am not sure about the connector message. Can you share your startup.m or matlabrc.m file?
Soumyadipta Sengupta
Soumyadipta Sengupta 2018년 12월 22일
Thanks for the answer. I am running it on a cluster in which matlab is preinstalled. Hence, i don't have acess to the files.

댓글을 달려면 로그인하십시오.

답변 (1개)

Prem Ankur
Prem Ankur 2018년 12월 26일

카테고리

Help CenterFile Exchange에서 Parallel for-Loops (parfor)에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by