Opened 11 years ago
Last modified 2 years ago
#2501 closed defect
Cannot solve linear system — at Version 2
Reported by: | massimo ceraolo | Owned by: | Willi Braun |
---|---|---|---|
Priority: | high | Milestone: | Future |
Component: | Backend | Version: | trunk |
Keywords: | Cc: | Lennart Ochel |
Description (last modified by )
The model I enclose creates a C code that OMEdit (r18411) shows to be incorrect in some points (red messages).
Then the generated code does not produce a valid result.
Steps to reproduce the problem:
1) load "pmwpulser.mo"
2) load and run "InvTrifNotWorking.mo"
3) (in OMEdit) look at the red text in the compilation tab in the simulation output window.
I reproduce hereafter the contents of my compilation window.
I added blank rows to put in evidence the text that appears red in OMEdit.
MC
"C:\OpenModelica1.9.1Nightly\\MinGW\bin\mingw32-make.exe" -f invTrifNotWorking.makefile gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking.o invTrifNotWorking.c ************************************************************ invTrifNotWorking.c:1893: warning: initialization from incompatible pointer type ************************************************************ gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_functions.o invTrifNotWorking_functions.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_records.o invTrifNotWorking_records.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_01exo.o invTrifNotWorking_01exo.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_02nls.o invTrifNotWorking_02nls.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_03lsy.o invTrifNotWorking_03lsy.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_04set.o invTrifNotWorking_04set.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_05evt.o invTrifNotWorking_05evt.c ************************************************************ invTrifNotWorking_05evt.c: In function 'invTrifNotWorking_zeroCrossingDescription': invTrifNotWorking_05evt.c:91: warning: assignment discards qualifiers from pointer target type ************************************************************ gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_06inz.o invTrifNotWorking_06inz.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_07dly.o invTrifNotWorking_07dly.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_08bnd.o invTrifNotWorking_08bnd.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_09alg.o invTrifNotWorking_09alg.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_10asr.o invTrifNotWorking_10asr.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_11mix.o invTrifNotWorking_11mix.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_12jac.o invTrifNotWorking_12jac.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_13opt.o invTrifNotWorking_13opt.c gcc -falign-functions -msse2 -mfpmath=sse -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -c -o invTrifNotWorking_14lnz.o invTrifNotWorking_14lnz.c gcc -I. -o invTrifNotWorking.exe invTrifNotWorking.o invTrifNotWorking_functions.o invTrifNotWorking_records.o invTrifNotWorking_01exo.o invTrifNotWorking_02nls.o invTrifNotWorking_03lsy.o invTrifNotWorking_04set.o invTrifNotWorking_05evt.o invTrifNotWorking_06inz.o invTrifNotWorking_07dly.o invTrifNotWorking_08bnd.o invTrifNotWorking_09alg.o invTrifNotWorking_10asr.o invTrifNotWorking_11mix.o invTrifNotWorking_12jac.o invTrifNotWorking_13opt.o invTrifNotWorking_14lnz.o -I"C:/OpenModelica1.9.1Nightly//include/omc" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -falign-functions -msse2 -mfpmath=sse -L"C:/OpenModelica1.9.1Nightly//lib/omc" -L"C:/OpenModelica1.9.1Nightly//lib" -Wl,--stack,0x2000000,-rpath,"C:/OpenModelica1.9.1Nightly//lib/omc" -Wl,-rpath,"C:/OpenModelica1.9.1Nightly//lib" -lregex -lexpat -lgc -lpthread -fopenmp -loleaut32 -lSimulationRuntimeC -lgc -lexpat -lregex -static-libgcc -luuid -loleaut32 -lole32 -lws2_32 -lsundials_kinsol -lsundials_nvecserial -lipopt -lcoinmumps -lcoinmetis -lpthread -lm -lgfortranbegin -lgfortran -lmingw32 -lgcc_eh -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -llapack-mingw -ltmglib-mingw -lblas-mingw -lf2c -linteractive -lwsock32 -llis -lstdc++
/tmp/OpenModelica/OMEdit/invTrifNotWorking -port=52829 -w -lv=LOG_STATS stdout | warning | Failed to solve linear system of equations (no. 146) at time 0.000000, system is singular for U[20, 20]. LOG_LS | warning | linear system fails: Linear function (index 146, size 24) at t=0 | | | | | [1] upSW.idealOpeningSwitch[1].v | | | | | [2] upSW.idealOpeningSwitch[1].s | | | | | [3] upSW.i[1] | | | | | [4] upSW.idealOpeningSwitch[2].v | | | | | [5] upSW.idealOpeningSwitch[2].s | | | | | [6] upSW.i[2] | | | | | [7] Rf.plug_p.pin[2].v | | | | | [8] Rf.plug_p.pin[1].v | | | | | [9] star.pin_n.v | | | | | [10] downSW.idealOpeningSwitch[3].v | | | | | [11] downSW.idealOpeningSwitch[3].s | | | | | [12] downSW.i[3] | | | | | [13] V1.i | | | | | [14] upSW.i[3] | | | | | [15] upSW.idealOpeningSwitch[3].s | | | | | [16] upSW.idealOpeningSwitch[3].v | | | | | [17] Rf.plug_p.pin[3].v | | | | | [18] downSW.idealOpeningSwitch[1].v | | | | | [19] star1.pin_n.v | | | | | [20] downSW.idealOpeningSwitch[2].v | | | | | [21] downSW.idealOpeningSwitch[2].s | | | | | [22] downSW.i[2] | | | | | [23] downSW.i[1] | | | | | [24] downSW.idealOpeningSwitch[1].s stdout | warning | Failed to solve linear system of equations (no. 230) at time 0.000000, system is singular for U[21, 21]. stdout | warning | Error in initialization. Storing results and exiting. | | | | Use -lv=LOG_INIT -w for more information. Simulation process exited with code 255
Change History (4)
by , 11 years ago
Attachment: | PwmPulser.mo added |
---|
by , 11 years ago
Attachment: | invTrifNotWorking.mo added |
---|
comment:1 by , 11 years ago
Description: | modified (diff) |
---|
comment:2 by , 11 years ago
Description: | modified (diff) |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Summary: | OM creates incorrect C code? (r18411) → Cannot solve linear system |
Note:
See TracTickets
for help on using tickets.
There should be no warnings in r18427. But it also won't help with your problem since it is related to a singular linear system being generated.