#2039 closed defect (fixed)
Nonlinear solver prints random strings instead of system names
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.0 |
Component: | Code Generation | Version: | trunk |
Keywords: | Cc: |
Description (last modified by )
Nonlinear solver prints random strings instead of system names, for example the following:
[martin@mega msl32]$ for f in `seq 1 100`; do ./Modelica.Electrical.Machines.Examples.SynchronousInductionMachines.SMEE_LoadDump |& grep -o "Error.*time" | uniq; done Error solving nonlinear system r at time Error solving nonlinear system at time Error solving nonlinear system at time Error solving nonlinear system false at time Error solving nonlinear system 1553 at time Error solving nonlinear system r at time Error solving nonlinear system parameter at time Error solving nonlinear system r at time Error solving nonlinear system voltageController.addSat.k2 at time Error solving nonlinear system at time Error solving nonlinear system true at time Error solving nonlinear system false at time Error solving nonlinear system at time Error solving nonlinear system 0K at time Error solving nonlinear system `R at time Error solving nonlinear system false at time Error solving nonlinear system true at time Error solving nonlinear system Real at time Error solving nonlinear system voltageController.limiter.uMax at time Error solving nonlinear system at time Error solving nonlinear system at time Error solving nonlinear system at time Error solving nonlinear system 1.0 at time Error solving nonlinear system (null) at time Error solving nonlinear system Џ/ at time Error solving nonlinear system at time Error solving nonlinear system 1551 at time Error solving nonlinear system x[1,1] at time ...
Running the executable through gdb always gives the same string (Error solving nonlinear system �K�). So something is fishy.
Change History (8)
comment:1 by , 12 years ago
Description: | modified (diff) |
---|
comment:2 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → accepted |
Ok, this comes from not all equationInfo_reverse_prof_index being populated. I'll fix it.
comment:3 by , 12 years ago
Ok, I fixed so reverse_prof_index is correct... But it seems const struct EQUATION_INFO equationInfo[811] = {
does not list the equations in the order of their index, so the wrong one is chosen anyway :(
comment:4 by , 12 years ago
Ok, running testsuite now. Hopefully my changes didn't break anything. If it didn't, we'll have this fixed (with some extra assertions added to the code that will make sure nonlinear systems will lookup the correct system).
comment:5 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Wheee... r14995 fixed a ton of remaining small bugs. We no longer have equations with the same index or indices that are skipped. They are also all sorted and in order. I'm happy. Especially since if someone adds new stuff in the backend, it should be detected and the simulation executable abort :)
comment:6 by , 12 years ago
Component: | Run-time → Code Generation |
---|
comment:7 by , 12 years ago
I guess using List.sort to sort the equations is not the best solution because it has mostly a bad complexity. There must be a solution without sorting the equations. Normaly the equations should be generted in correct order. Maybe we do not take care on some placees which index the container equation (linear, nonlinear, mixed system) get.
comment:8 by , 12 years ago
Virtually none of the equations are in order. Sort is cheap anyway (n*log n integer comparisons; 10000 equations are roughly 40000 comparisons; 200k eq = 1m compare). Feel free to rewrite it though. Should take no more than a day.
Valgrind says (after disabling some SSE instructions valgrind does not handle)...