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:
different results in normal for and parfor loop

Subject: different results in normal for and parfor loop

From: liu

Date: 12 May, 2014 02:45:13

Message: 1 of 2

I have a script which works fine in the normal for loop, but when I run it with parallel toolbox with parfor, I received the following wrong message and the results are totally wrong.

Warning: Matrix is close to singular or badly scaled.
         Results may be inaccurate. RCOND = 2.790704e-017.
> In myfun at 45
  In parallel_function>make_general_channel/channel_general at 871
  In remoteParallelFunction at 31

I did not find anything wrong in my script. How can I check the code and get the right result? thank you very much

best,
xueliang

Subject: different results in normal for and parfor loop

From: Edric M Ellis

Date: 12 May, 2014 07:45:47

Message: 2 of 2

"liu " <siqi163@163.com> writes:

> I have a script which works fine in the normal for loop, but when I
> run it with parallel toolbox with parfor, I received the following
> wrong message and the results are totally wrong.
>
> Warning: Matrix is close to singular or badly scaled.
> Results may be inaccurate. RCOND = 2.790704e-017.
>> In myfun at 45
> In parallel_function>make_general_channel/channel_general at 871
> In remoteParallelFunction at 31
>
> I did not find anything wrong in my script. How can I check the code
> and get the right result? thank you very much

This message can occur because the workers are running in single
computational thread mode. You can debug your code by launching MATLAB
with the "-singleCompThread" flag. Please post self-contained
reproduction steps here if you think this message is incorrect.

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