Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Parfor error in 64 bit ONLY

Subject: Parfor error in 64 bit ONLY

From: Adam

Date: 10 Sep, 2013 23:27:06

Message: 1 of 2

hey guys, I have a script which is driving me up the wall!! please see the decription below:

-In 32 bit MatLab the script runs fine with parfor loop (though can't use due to large file size
-In 64 bit MatLab the script runs with for loop (not parfor) (can't use because would take weeks to finish)
-In 64 bit MatLab the script throws the following error when using the parfor loop command:

Error using Tani_Parallel (line 18)
For colon operator with char operands, first and last operands must be char.

Line 18 is the following: parfor j=1:5394;

Any thoughts on this matter? any help is GREATLY appreciated. Thank you.

Subject: Parfor error in 64 bit ONLY

From: Edric M Ellis

Date: 11 Sep, 2013 07:54:20

Message: 2 of 2

"Adam " <adam.idone@chromocell.com> writes:

> hey guys, I have a script which is driving me up the wall!! please see the decription below:
>
> -In 32 bit MatLab the script runs fine with parfor loop (though can't use due to large file size
> -In 64 bit MatLab the script runs with for loop (not parfor) (can't use because would take weeks to finish)
> -In 64 bit MatLab the script throws the following error when using the parfor loop command:
>
> Error using Tani_Parallel (line 18)
> For colon operator with char operands, first and last operands must be char.
>
> Line 18 is the following: parfor j=1:5394;
>
> Any thoughts on this matter? any help is GREATLY appreciated. Thank you.

You might have some luck wrapping the body of your PARFOR loop with try/catch, like so:

parfor j = ...
  try
    ... original body of loop ...
  catch E
    disp(getReport(E)); % show the error on the worker
    rethrow(E);
  end
end

Cheers,

Edric.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us