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: Confusing spmd error
Replies: 3   Last Post: Jan 9, 2013 12:34 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Edric Ellis

Posts: 695
Registered: 12/7/04
Re: Confusing spmd error
Posted: Jan 9, 2013 4:04 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Chuck37 " <chuck3737@yahooremovethis.com> writes:

> I have a function that is giving me an error when called within spmd
> but I can't repeat it outside. e.g:
>
> x = <something>;
> spmd
> if labindex == 1
> y = <something>
> z = function(x,y);
> end
> end
>
> Gives me an error inside the function, but when I try to debug like this:
>
> z = function(x,y{1})
>
> It runs through just fine. This makes debugging very difficult.
> Anyone have any idea of what would cause it not to run exactly the
> same way in each case?
>
> The error is nothing parallel related by the way, it's actually a
> singular matrix warning.


Hmm, that's very strange. Do you still get the warning if you simply do

x = <something>;
y = <something>;
z = function(x,y);

How about if you do

matlabpool open 1
spmd
x = <something>;
y = <something>;
z = function(x,y);
end

matlabpool close
spmd
x = <something>;
y = <something>;
z = function(x,y);
end

One other thing that has an outside chance of making a difference is
that matlabpool workers are run in single computational thread mode,
which means some algorithms will work slightly differently. You could
try launching your desktop matlab with the "-singleCompThread" switch to
see if that makes any difference.

Cheers,

Edric.



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.