﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2080	Mechanics.MultiBody.Examples.Constraints.PrismaticJoint	Martin Sjölund	Lennart Ochel	"Modelica.Mechanics.MultiBody.Examples.Constraints.ConstrainPrismaticJoint.mos still fails. But only on 64-bit 12.04 Ubuntu with gcc 4.4.

On Mint 14 (Ubuntu 12.10) and when using clang, it works fine. This could mean something changed in the compilers, but I doubt it since it's only tiny vendor patches that differ between the two:
12.04: gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-1ubuntu2)
12.10: gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-2ubuntu1)

I had a thought it could be compiler settings that changed (I didn't use -march=native on my laptop in order to please valgrind).

It could possibly be that the linear solver changed. But it didn't since it seems we use our own f2c-translated copy of LAPACK internally! (Willi, why do we use our own version of LAPACK in the simulation executables? omc.exe itself is linked with LAPACK anyway...)

For 12.04 (which does produce a correct executable), I get:
{{{
Error: When solving linear system ...
[
  0.0 , -0.9663834860128886 , 0.0 , 1.0 ;
  -0.5648625214636235 , 0.0 , -0.8191520442889918 , 0.09960050292505122 ;
  0.0 , -0.21486551488510405 , 1.0 , 0.0 ;
  1.0 , 0.14119408087712543 , 0.0 , 0.0
]
  *
[
  bodyOfConstraint.body.frame_a.r_0[3] ;
  freeMotionScalarInit.r_rel_a_1 ;
  bodyOfConstraint.body.frame_a.r_0[1] ;
  bodyOfConstraint.body.frame_a.r_0[2]
]
  =
[
  0.0 ;
  0.0 ;
  0.0 ;
  0.0
]
}}}

(I changed the rhs to all zeroes, which is what the backend used; but I don't get why (1) it fails - all zeroes has a trivial solution provided all x are set in the matrix. (2) why we enter all zeroes on the rhs instead of evaluating the rhs!)

So why did it succeed at evaluating the system on 12.04, but still fail later? Anyway, if dgesv failed for a constant zero rhs we should change linear system solver ;)

Or why did it not even try evaluating the system on 12.04? Note that the system-provided LAPACK is used for both of these versions. '''Jens''', I think we should just rewrite analyzeConstantJacobian to be a little smarter.

I looked at the generated _info.xml and the equations generated are indeed different for the two compilers.

For test.openmodelica.org, 6 more linear system are generated than on my laptop (I guess 3+3 initialization).

If you got this far, you are braver than me. I didn't go up to check that the text is coherent."	defect	assigned	high	Future	Backend	trunk			Willi Braun Jens Frenkel
