Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline omorr  
#1 Posted : 28 March 2012 23:51:04(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello,

I bumped into roots() problem again - SMath 0.93
Here is the file - Primer43.sm.
Or a slight modification - Primer43a.sm
It's been again solved by Newton-Raphson - linear problem, but roots() failed.

In WinXP if you try to get the results by roots() - crash will happen.


In Ubuntu - stack overflow error will be issued.


Regards,
Radovan

Edited by user 29 March 2012 00:09:54(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Davide Carpi  
#2 Posted : 28 March 2012 23:56:03(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
omorr wrote:
Hello,

I bumped into roots() problem again - SMath 0.93
Here is the file - Primer43.sm.
It's been again solved by Newton-Raphson - linear problem, but roots() failed.

In WinXP if you try to get the results by roots() crash will happen
[...]

In Ubuntu - stack overflow error will be issued
[...]

Regards,
Radovan


Same problem with Win 7
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Andrey Ivashov  
#3 Posted : 30 March 2012 07:43:08(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Thank you. Will fix it.
thanks 1 user thanked Andrey Ivashov for this useful post.
on 30/03/2012(UTC)
Offline omorr  
#4 Posted : 31 March 2012 07:56:02(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Andrey,

Here is another similar example Primer44.sm . SMath will crash with roots() again.
Fortunately, Newton-Raphson will do the job.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline omorr  
#5 Posted : 31 March 2012 21:29:27(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Andrey,

Here is another example Primer46.sm

This time there is no roots() involved.


Crash will happen (stack overflow in Ubuntu) if the optimization of the region calculating X is Symbolical. If we set the Numerical optimization everything is fine.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Andrey Ivashov  
#6 Posted : 31 March 2012 22:07:15(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Ok. Will check all these examples.

Regards.
Offline omorr  
#7 Posted : 19 May 2012 22:24:45(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello Andrey,

I was pleasantly surprised that roots() worked in my example Pimer44.sm Good
roots() working

Primer44OK.sm

Primer43.sm and Primer43a.sm did not cause stack overflow but only "No real roots" message. Not quite sure why because those problems are similar.
Primer46.sm still crashes with Symbolic optimization.

I think it is an improvement of roots() in 0.94 regarding these examples. Thank you for your efforts.

Regards,
Radovan





When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline omorr  
#8 Posted : 19 June 2012 13:13:31(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello,
Originally Posted by: omorr Go to Quoted Post

Primer46.sm still crashes with Symbolic optimization.

Unfortunately, It happened in v0.95 as well. I changed this file a bit, regarding the change in stack() function in order to get a function for which Jacobian can be found. It looks quite innocent - but still crashes for symbolic optimization .
Here is the end of this file:
Primer46-crash-nostack-Ok-1
and now when enabling calculation of the last region
Primer46-crash-nostack-Ok-2
The Jacobian matrix J is problematic here. If you use Symbolic optimization of J inverse - crash will happen.
Primer46-crash-nostack-Ok-3

Here is the file: Primer46-crash-nostack-Ok.sm

Why this causes the crash - have no idea. Could someone read this file and check it out, please?

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Davide Carpi  
#9 Posted : 19 June 2012 14:52:35(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Hi omorr,

I can see the same issue, but I've no ideas about origins (could be the symbolic evaluation of submatrix()?)


regards,

w3b5urf3r

Edited by user 18 September 2012 01:36:36(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 19/06/2012(UTC)
Offline omorr  
#10 Posted : 19 June 2012 15:56:41(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Thanks for answering w3b5urf3r,
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
I can see the same issue, but I've no ideas about origins (could be the symbolic evalutation of submatrix()?)

It seems submatrix() is not the reason. I have another example where roots() will work Good - although the function is defined with submatrix() and the Jacobian is not with all constants (nonlinear equations):
Primer47-Ok-1

Here is the file: Primer47-Ok-1.sm.

I do not know what is the reason of this, but SMath should not crash anyway.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Davide Carpi  
#11 Posted : 19 June 2012 20:09:41(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
if may be useful, in this file (0.95_Jacob_symbolic.sm.zip), I've minimized all possible crash causes (lines(), for loops, etc...)

I think that this could reduce the issue options (mathematical problem or code problem with Jacob()<->symbolic evaluation)...

Jacob() issue


regards,

w3b5urf3r

Edited by user 18 September 2012 01:37:34(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 19/06/2012(UTC)
Offline omorr  
#12 Posted : 19 June 2012 21:08:04(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Thank you w3b5urf3r

You gave me again the idea where to "poke" about this. It seems there is nothing to do with Jacob or anything else (lines(), for loops, etc...). It is about this particular matrix and numbers in it. Just put this matrix with particular numbers in an empty sheet and again crash will happen.

strange%20matrix%20crash.png

Here is the file : strange matrix crash.sm

Just put some other numbers and choose Symbolic for, say, J/J and crash will happen again. Put some other numbers and crash will not happen.
Very strange Shok

Regards,
radovan

Edited by user 19 June 2012 21:11:49(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 20/06/2012(UTC)
Offline Davide Carpi  
#13 Posted : 20 June 2012 01:01:40(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
Originally Posted by: omorr Go to Quoted Post
Just put some other numbers and choose Symbolic for, say, J/J and crash will happen again. Put some other numbers and crash will not happen.
Very strange Shok

really very strange, thus the problem it's the inversion but not for any matrix...

in any case Jacob() seems to work fine Happy


regards,

w3b5urf3r
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.