Opened 5 years ago
Closed 3 years ago
#5956 closed defect (fixed)
omc.sendExpression("buildModel(%s)"%modelName) fails to build a model correctly built by OMEdit.
Reported by: | Anton.Soppelsa@eurac.edu | Owned by: | Alachew Mengist |
---|---|---|---|
Priority: | high | Milestone: | 1.16.0 |
Component: | OMPython | Version: | v1.14.1 |
Keywords: | Cc: |
Description
Dear all,
it seems that building a model via OMPython (using the command omc.sendExpression("buildModel(%s)"%modelName)
) fails to build a model which is correctly built by OMEdit IDE.
I think it could be a problem of path, working directory, compilation option or environment in general, but I would really like to hear the opinion of an expert.
This is the report of compilation from IDE
C:/Program Files/OpenModelica1.14.1-64bit//share/omc/scripts/Compile.bat ProjectCannonau.PipeValidation gcc mingw64 parallel 8 0 PATH = "C:\PROGRA~1\OPENMO~1.1-6\tools\msys\mingw64\bin;C:\PROGRA~1\OPENMO~1.1-6\tools\msys\mingw64\bin\..\..\usr\bin;" mingw32-make: Entering directory 'C:/Users/ASOPPE~1/AppData/Local/Temp/OPENMO~1/OMEdit/PROJEC~1.PIP' gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation.o ProjectCannonau.PipeValidation.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_functions.o ProjectCannonau.PipeValidation_functions.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_records.o ProjectCannonau.PipeValidation_records.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_01exo.o ProjectCannonau.PipeValidation_01exo.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_02nls.o ProjectCannonau.PipeValidation_02nls.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_03lsy.o ProjectCannonau.PipeValidation_03lsy.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_04set.o ProjectCannonau.PipeValidation_04set.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_05evt.o ProjectCannonau.PipeValidation_05evt.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_06inz.o ProjectCannonau.PipeValidation_06inz.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_07dly.o ProjectCannonau.PipeValidation_07dly.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_08bnd.o ProjectCannonau.PipeValidation_08bnd.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_09alg.o ProjectCannonau.PipeValidation_09alg.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_10asr.o ProjectCannonau.PipeValidation_10asr.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_11mix.o ProjectCannonau.PipeValidation_11mix.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_12jac.o ProjectCannonau.PipeValidation_12jac.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_13opt.o ProjectCannonau.PipeValidation_13opt.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_14lnz.o ProjectCannonau.PipeValidation_14lnz.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_15syn.o ProjectCannonau.PipeValidation_15syn.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_16dae.o ProjectCannonau.PipeValidation_16dae.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_17inl.o ProjectCannonau.PipeValidation_17inl.c gcc -I. -o ProjectCannonau.PipeValidation.exe ProjectCannonau.PipeValidation.o ProjectCannonau.PipeValidation_functions.o ProjectCannonau.PipeValidation_records.o ProjectCannonau.PipeValidation_01exo.o ProjectCannonau.PipeValidation_02nls.o ProjectCannonau.PipeValidation_03lsy.o ProjectCannonau.PipeValidation_04set.o ProjectCannonau.PipeValidation_05evt.o ProjectCannonau.PipeValidation_06inz.o ProjectCannonau.PipeValidation_07dly.o ProjectCannonau.PipeValidation_08bnd.o ProjectCannonau.PipeValidation_09alg.o ProjectCannonau.PipeValidation_10asr.o ProjectCannonau.PipeValidation_11mix.o ProjectCannonau.PipeValidation_12jac.o ProjectCannonau.PipeValidation_13opt.o ProjectCannonau.PipeValidation_14lnz.o ProjectCannonau.PipeValidation_15syn.o ProjectCannonau.PipeValidation_16dae.o ProjectCannonau.PipeValidation_17inl.o -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/Development/shc-modelica-library/Applications/ProjectCannonau" "-LC:/Program Files/OpenModelica1.14.1-64bit//lib//omc" "-LC:/Program Files/OpenModelica1.14.1-64bit//lib/" "-L%APPDATA%/.openmodelica/binaries/Modelica" "-LC:/Program Files/OpenModelica1.14.1-64bit/lib/omlibrary/Modelica 3.2.3/Resources/Library/mingw64" "-LC:/Program Files/OpenModelica1.14.1-64bit/lib/omlibrary/Modelica 3.2.3/Resources/Library/win64" "-LC:/Program Files/OpenModelica1.14.1-64bit/lib/omlibrary/Modelica 3.2.3/Resources/Library" -lModelicaExternalC -lModelicaStandardTables -lModelicaIO -lModelicaMatIO -lzlib -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -L"C:/Program Files/OpenModelica1.14.1-64bit//lib//omc" -L"C:/Program Files/OpenModelica1.14.1-64bit//lib" -Wl,--stack,16777216,-rpath,"C:/Program Files/OpenModelica1.14.1-64bit//lib//omc" -Wl,-rpath,"C:/Program Files/OpenModelica1.14.1-64bit//lib" -fopenmp -Wl,-Bstatic -lregex -ltre -lintl -liconv -lexpat -lomcgc -lpthread -loleaut32 -limagehlp -lhdf5 -lz -lszip -Wl,-Bdynamic -Wl,-Bstatic -lSimulationRuntimeC -Wl,-Bdynamic -Wl,-Bstatic -lomcgc -lregex -ltre -lintl -liconv -lexpat -static-libgcc -luuid -loleaut32 -lole32 -limagehlp -lws2_32 -llis -lumfpack -lklu -lcolamd -lbtf -lamd -lsundials_idas -lsundials_kinsol -lsundials_nvecserial -lipopt -lcoinmumps -lpthread -lm -lgfortranbegin -lgfortran -lquadmath -lmingw32 -lgcc_eh -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lopenblas -lcminpack -Wl,-Bdynamic -lwsock32 -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic mingw32-make: Leaving directory 'C:/Users/ASOPPE~1/AppData/Local/Temp/OPENMO~1/OMEdit/PROJEC~1.PIP' Compilation process finished successfully.
This is the content of ProjectCannonau.PipeValidation.log
mingw32-make: Entering directory 'C:/DEVELO~1/SHC-MO~1/APPLIC~1/PROJEC~1/Python' gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation.o ProjectCannonau.PipeValidation.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_functions.o ProjectCannonau.PipeValidation_functions.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_records.o ProjectCannonau.PipeValidation_records.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_01exo.o ProjectCannonau.PipeValidation_01exo.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_02nls.o ProjectCannonau.PipeValidation_02nls.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_03lsy.o ProjectCannonau.PipeValidation_03lsy.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_04set.o ProjectCannonau.PipeValidation_04set.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_05evt.o ProjectCannonau.PipeValidation_05evt.c ProjectCannonau.PipeValidation.c: In function 'ProjectCannonau_PipeValidation_eqFunction_519': ProjectCannonau.PipeValidation.c:464:69: error: incompatible types when assigning to type 'modelica_boolean {aka signed char}' from type 'boolean_array {aka struct base_array_s}' data->localData[0]->booleanVars[0] /* $whenCondition1 DISCRETE */ = tmp47; ^ ProjectCannonau.PipeValidation.c: In function 'ProjectCannonau_PipeValidation_eqFunction_542': ProjectCannonau.PipeValidation.c:836:69: error: incompatible types when assigning to type 'modelica_boolean {aka signed char}' from type 'boolean_array {aka struct base_array_s}' data->localData[0]->booleanVars[1] /* $whenCondition2 DISCRETE */ = tmp95; ^ gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_06inz.o ProjectCannonau.PipeValidation_06inz.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_07dly.o ProjectCannonau.PipeValidation_07dly.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_08bnd.o ProjectCannonau.PipeValidation_08bnd.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_09alg.o ProjectCannonau.PipeValidation_09alg.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/Program Files/OpenModelica1.14.1-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=ProjectCannonau_PipeValidation -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=4 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o ProjectCannonau.PipeValidation_10asr.o ProjectCannonau.PipeValidation_10asr.c <builtin>: recipe for target 'ProjectCannonau.PipeValidation.o' failed mingw32-make: *** [ProjectCannonau.PipeValidation.o] Error 1 mingw32-make: *** Waiting for unfinished jobs.... ProjectCannonau.PipeValidation_06inz.c: In function 'ProjectCannonau_PipeValidation_eqFunction_290': ProjectCannonau.PipeValidation_06inz.c:2774:69: error: incompatible types when assigning to type 'modelica_boolean {aka signed char}' from type 'boolean_array {aka struct base_array_s}' data->localData[0]->booleanVars[1] /* $whenCondition2 DISCRETE */ = tmp3; ^ ProjectCannonau.PipeValidation_06inz.c: In function 'ProjectCannonau_PipeValidation_eqFunction_412': ProjectCannonau.PipeValidation_06inz.c:3587:69: error: incompatible types when assigning to type 'modelica_boolean {aka signed char}' from type 'boolean_array {aka struct base_array_s}' data->localData[0]->booleanVars[0] /* $whenCondition1 DISCRETE */ = tmp7; ^ <builtin>: recipe for target 'ProjectCannonau.PipeValidation_06inz.o' failed mingw32-make: *** [ProjectCannonau.PipeValidation_06inz.o] Error 1 mingw32-make: Leaving directory 'C:/DEVELO~1/SHC-MO~1/APPLIC~1/PROJEC~1/Python' RESULT: 2
Sincerely,
Anton
Change History (6)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Thank you arun3688 for the fast reply.
I prepared the script in Python, as yesterday I was using the tool iteractively.
from OMPython import OMCSessionZMQ from os import path # Libraries to be loaded # Standard Library (loaded by default from standard path?) # SHCLibrary # ProjectCannonau # Creating connection to OMC server omc = OMCSessionZMQ() workingDir = path.normpath(omc.sendExpression('cd()')) # This gets the current folder of the OMC basePath = path.normpath(omc.sendExpression('getInstallationDirectoryPath()')) libPath = path.join(basePath, 'lib', 'omlibrary') shcLibPath = path.normpath(r'..\..\..\Library\SHCLibrary\package.mo') cannonauLibPath = path.normpath(r'..\package.mo') # Creating environment in the OMC omc.sendExpression('loadModel(Modelica)') # This loads the Modelica Library (I think it works becuase this library is in the path) omc.sendExpression('getErrorString()') #omc.loadFile(cannonauLibPath) # Working alternative omc.sendExpression('loadFile("%s")'%shcLibPath) # This tries to load a .mo file omc.sendExpression('getErrorString()') #omc.loadFile(shcLibPath) # Working alternative omc.sendExpression('loadFile("%s")'%cannonauLibPath) # This tries to load a .mo file omc.sendExpression('getErrorString()') omc.sendExpression('getLoadedLibraries()') omc.sendExpression('getErrorString()') # Building the model (if needed) modelName = 'ProjectCannonau.PipeValidation' #omc.istantiateModel("ProjectCannonau.ValveControlOpenLoop") # Not working omc.sendExpression('instantiateModel(%s)'%modelName) # This instantiates the model omc.sendExpression('getErrorString()') omc.sendExpression('buildModel(%s)'%modelName) # This builds the model omc.sendExpression('getErrorString()') # This builds the model #omc.buildModel("ProjectCannonau.ValveControlOpenLoop") omc.sendExpression('quit()')
Unfortunately, today the process stops at the flattening stage with the following error (the model still runs on OMEdit).
"[C:/Development/shc-modelica-library/Applications/ProjectCannonau/PipeValidation.mo:109:3-110:94:writable] Error: Subscript '6' for dimension 1 (size = 5) of data.y[6] is out of bounds.\nError: Error occurred while flattening model ProjectCannonau.PipeValidation\n"
Regarding sending the source code, it is not so simple as the model is not trivial and I cannot share it in public. If you really need it to understand the matter, I can send my libraries encrypted.
Looking forward to hear from you,
Anton
comment:3 by , 5 years ago
Hallo,
I am trying today with other models and setup.
I wrote a.mos script doing the same thing as the python script
shcLibPath := "\\Development\\shc-modelica-library\\Library\\SHCLibrary\\package.mo"; getErrorString(); cannonauLibPath := "\\Development\\shc-modelica-library\\Applications\\ProjectCannonau\\package.mo"; getErrorString(); modelName := "ProjectCannonau.ValveControlLinearizable"; getErrorString(); buildPath := "\\Development\\shc-modelica-library\\Applications\\ProjectCannonau\\Python\\" + modelName; getErrorString(); cd(buildPath); getErrorString(); loadModel(Modelica); getErrorString(); loadFile(shcLibPath); getErrorString(); loadFile(cannonauLibPath); getErrorString(); getLoadedLibraries(); getErrorString(); models := searchClassNames(modelName); getErrorString(); //model := models[1]; // Why this is not accepted? instantiateModel(models[1]); getErrorString(); buildModel(models[1]); getErrorString();
I get similar behaviour as yesterday: if I run it from Windows command line omc --showErrorMessages linearization.mos 1> output.txt 2> errors.txt
the compiler complains in a similar way to what it did yesterday. If I copy the file content in the clipboard and then I paste it in the OMEdit CLI, it works as expected.
I hope this helps.
P.S. why the instruction model := models[1];
is not accepted?
comment:4 by , 5 years ago
OMEdit has the new front-end on by default, I guess that's why it works there. Search in OMEdit CLI for setCommandLineOptions and do the same in OMPython or mos script.
comment:5 by , 5 years ago
Thank you Adrian, that solved the problem with the script. I will try with Python today.
comment:6 by , 3 years ago
Milestone: | Future → 1.16.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Can you post the list of OMPython commands used, before building the model omc.sendExpression("buildModel(modelname)"), It would also be good if you can attach the model, to find the problem.