Opened 12 years ago
Closed 12 years ago
#2056 closed defect (fixed)
Problems with Modelica.Math.Matrices.inv()
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.0 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: | Adrian Pop |
Description
The following test model:
model TestInverse parameter Integer N = 3; Real A[N,N] = identity(N); Real B[N,N] = identity(N); Real C[N,N]; equation C = Modelica.Math.Matrices.inv(A) * B; end TestInverse;
gives the following error:
"[TestInverse.mo:8:3-8:38:writable] Error: Cannot resolve type of expression Modelica.Math.Matrices.inv(A) * B. The operands have types Real[:, :], Real[3, 3] in component <NO COMPONENT>.
The problem persists even if all matrix sizes are replaced by integer literals, as in
model TestInverse2 Real A[3,3] = identity(3); Real B[3,3] = identity(3); Real C[3,3]; equation C = Modelica.Math.Matrices.inv(A) * B; end TestInverse2;
Last, but not least, the following simpler model is translated, but then the simulation executable triggers an unhandled exception and crashes
model TestInverse3 Real A[3,3] = identity(3); Real C[3,3]; equation C = Modelica.Math.Matrices.inv(A); end TestInverse3;
Change History (4)
comment:1 by , 12 years ago
Component: | Backend → Frontend |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 12 years ago
Owner: | changed from | to
---|
comment:3 by , 12 years ago
Cc: | added |
---|
The typing errors are now fixed in r15135. But the models still segfaults during simulation, in the LAPACK library. Might be some issues with our LAPACK interface. I will probably be busy the next two days though, so I added CC to Adrian in case he has time to look at it before me.
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The segmentation faults should hopefully be fixed in r15241, at least it works for me on 64-bit Linux now.
Reassigning this to Per since I'll be busy until the 15th.