Opened 5 years ago
Last modified 3 years ago
#5577 reopened defect
Translation Error When Export FMU Using -d=newInst
Reported by: | Owned by: | Adrian Pop | |
---|---|---|---|
Priority: | blocker | Milestone: | 1.19.0 |
Component: | NF API | Version: | v1.14.0-dev-nightly |
Keywords: | FMU | Cc: |
Description
import load = ModelicaServices.ExternalReferences.loadResource; Modelica.Blocks.Sources.CombiTimeTable combiTimeTable1(extrapolation = Modelica.Blocks.Types.Extrapolation.Periodic, fileName = load("modelica://TestPackage/Folder/TestFile.txt"), smoothness = Modelica.Blocks.Types.Smoothness.ConstantSegments, tableName = "TestTable", tableOnFile = true);
when trying to export above model with uncheck Enable old frontend for code generation
option or using -d=newInst
with said option enabled, i got following translation error:
[1] 14:39:48 Translation Error Error building simulator. Build log: gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test.o Test.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_functions.o Test_functions.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_records.o Test_records.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_01exo.o Test_01exo.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_02nls.o Test_02nls.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_03lsy.o Test_03lsy.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_04set.o Test_04set.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_05evt.o Test_05evt.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_06inz.o Test_06inz.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_07dly.o Test_07dly.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_08bnd.o Test_08bnd.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_09alg.o Test_09alg.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_10asr.o Test_10asr.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_11mix.o Test_11mix.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_12jac.o Test_12jac.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_13opt.o Test_13opt.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_14lnz.o Test_14lnz.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_15syn.o Test_15syn.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_16dae.o Test_16dae.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_17inl.o Test_17inl.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_init_fmu.o Test_init_fmu.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -IC:/OpenModelica//include/omc/c/fmi -c -o Test_FMU.o Test_FMU.c In file included from Test_FMU.c:54:0: fmi-export/fmu2_model_interface.c.inc: In function 'omc_assert_fmi_common': fmi-export/fmu2_model_interface.c.inc:162:16: warning: passing argument 1 of 'GC_vasprintf' from incompatible pointer type [-Wincompatible-pointer-types] GC_vasprintf(&str, msg, args); ^ In file included from openmodelica_func.h:52:0, from Test_FMU.c:10: util/modelica_string.h:71:5: note: expected 'const char **' but argument is of type 'char **' int GC_vasprintf(const char **strp, const char *fmt, va_list ap); ^ Test_FMU.c: In function 'setDefaultStartValues': Test_FMU.c:81:82: error: incomplete universal character name \U comp->fmuData->modelData->stringParameterData[0].attribute.start = mmc_mk_scon("C:\Users\trari\Documents\TestPackage\Folder\TestFile.txt"); ^ Test_FMU.c:81:82: warning: unknown escape sequence: '\D' Test_FMU.c:81:82: warning: unknown escape sequence: '\T' Test_FMU.c:81:82: warning: unknown escape sequence: '\F' Test_FMU.c:81:82: warning: unknown escape sequence: '\T' <builtin>: recipe for target 'Test_FMU.o' failed make: *** [Test_FMU.o] Error 1 make: *** Waiting for unfinished jobs....
Attachments (2)
Change History (23)
comment:1 by , 5 years ago
follow-up: 4 comment:2 by , 5 years ago
As far as I remember if fixed the escaping when I fixed #5431.
comment:4 by , 5 years ago
comment:6 by , 5 years ago
Milestone: | Future → 1.14.0 |
---|---|
Priority: | high → blocker |
Status: | new → assigned |
This should get fixed in 1.14.0 as #5431
comment:7 by , 5 years ago
Should be fixed with PR: https://github.com/OpenModelica/OpenModelica/pull/316
The attached zipped package and the t.mos script will generate FMU with correct resources (also part of the zip).
After I merge the PR, please test and close the ticket if is fine.
by , 5 years ago
comment:8 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed in 6bd362/OpenModelica.
comment:9 by , 5 years ago
Dear all,
I am having having the same problem with version 1.14.1-64bit.
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3.o CallExternalPythonV3.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_functions.o CallExternalPythonV3_functions.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_records.o CallExternalPythonV3_records.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_01exo.o CallExternalPythonV3_01exo.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_02nls.o CallExternalPythonV3_02nls.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_03lsy.o CallExternalPythonV3_03lsy.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_04set.o CallExternalPythonV3_04set.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_05evt.o CallExternalPythonV3_05evt.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_06inz.o CallExternalPythonV3_06inz.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_07dly.o CallExternalPythonV3_07dly.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_08bnd.o CallExternalPythonV3_08bnd.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_09alg.o CallExternalPythonV3_09alg.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_10asr.o CallExternalPythonV3_10asr.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_11mix.o CallExternalPythonV3_11mix.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_12jac.o CallExternalPythonV3_12jac.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_13opt.o CallExternalPythonV3_13opt.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_14lnz.o CallExternalPythonV3_14lnz.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_15syn.o CallExternalPythonV3_15syn.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_16dae.o CallExternalPythonV3_16dae.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_17inl.o CallExternalPythonV3_17inl.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_init_fmu.o CallExternalPythonV3_init_fmu.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.14.1-64bit//include/omc/c/fmi" -I"C:/Users/.conda/envs/tensorflow_env/include" -c -o CallExternalPythonV3_FMU.o CallExternalPythonV3_FMU.c In file included from CallExternalPythonV3_FMU.c:54:0: fmi-export/fmu2_model_interface.c.inc: In function 'omc_assert_fmi_common': fmi-export/fmu2_model_interface.c.inc:162:16: warning: passing argument 1 of 'GC_vasprintf' from incompatible pointer type [-Wincompatible-pointer-types] GC_vasprintf(&str, msg, args); ^ In file included from openmodelica_func.h:52:0, from CallExternalPythonV3_FMU.c:10: util/modelica_string.h:71:5: note: expected 'const char **' but argument is of type 'char **' int GC_vasprintf(const char **strp, const char *fmt, va_list ap);
Could someone assist me please?
comment:11 by , 5 years ago
Same error:
gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3.o CallExternalPythonV3.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_functions.o CallExternalPythonV3_functions.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_records.o CallExternalPythonV3_records.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_01exo.o CallExternalPythonV3_01exo.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_02nls.o CallExternalPythonV3_02nls.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_03lsy.o CallExternalPythonV3_03lsy.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_04set.o CallExternalPythonV3_04set.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_05evt.o CallExternalPythonV3_05evt.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_06inz.o CallExternalPythonV3_06inz.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_07dly.o CallExternalPythonV3_07dly.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_08bnd.o CallExternalPythonV3_08bnd.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_09alg.o CallExternalPythonV3_09alg.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_10asr.o CallExternalPythonV3_10asr.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_11mix.o CallExternalPythonV3_11mix.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_12jac.o CallExternalPythonV3_12jac.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_13opt.o CallExternalPythonV3_13opt.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_14lnz.o CallExternalPythonV3_14lnz.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_15syn.o CallExternalPythonV3_15syn.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_16dae.o CallExternalPythonV3_16dae.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_17inl.o CallExternalPythonV3_17inl.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_init_fmu.o CallExternalPythonV3_init_fmu.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -DOMC_MINIMAL_RUNTIME=1 -DCMINPACK_NO_DLL=1 -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c/fmi" -c -o CallExternalPythonV3_FMU.o CallExternalPythonV3_FMU.c In file included from CallExternalPythonV3_FMU.c:54:0: fmi-export/fmu2_model_interface.c.inc: In function 'omc_assert_fmi_common': fmi-export/fmu2_model_interface.c.inc:162:16: warning: passing argument 1 of 'GC_vasprintf' from incompatible pointer type [-Wincompatible-pointer-types] GC_vasprintf(&str, msg, args); ^ In file included from openmodelica_func.h:52:0, from CallExternalPythonV3_FMU.c:10: util/modelica_string.h:71:5: note: expected 'const char **' but argument is of type 'char **' int GC_vasprintf(const char **strp, const char *fmt, va_list ap); ^
comment:12 by , 5 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:13 by , 5 years ago
OK, can you please attach the source code of a test case that reproduces the issue? That will help finding a fix.
Thanks!
by , 5 years ago
Calling External python File functionV2.py and export the model to FMU
comment:15 by , 5 years ago
I do not know it is related but, my FMU is created, and when I export it into OMEdit and try to simulate it I obtain the following error after compilation:
C:/OpenModelica1.16.0-dev-64bit//share/omc/scripts/Compile.bat CallExternalPythonV3_me_FMU gcc mingw64 parallel 1 0 PATH = "C:\OPENMO~1.0-D\tools\msys\mingw64\bin;C:\OPENMO~1.0-D\tools\msys\mingw64\bin\..\..\usr\bin;" mingw32-make: Entering directory 'C:/Users/CABECE~1/AppData/Local/Temp/OPENMO~1/OMEdit/CALLEX~2' gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=CallExternalPythonV3_me_FMU -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o CallExternalPythonV3_me_FMU.o CallExternalPythonV3_me_FMU.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=CallExternalPythonV3_me_FMU -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o CallExternalPythonV3_me_FMU_functions.o CallExternalPythonV3_me_FMU_functions.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=CallExternalPythonV3_me_FMU -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o CallExternalPythonV3_me_FMU_records.o CallExternalPythonV3_me_FMU_records.c gcc -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse -I"C:/OpenModelica1.16.0-dev-64bit//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=CallExternalPythonV3_me_FMU -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=0 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0 -c -o CallExternalPythonV3_me_FMU_01exo.o CallExternalPythonV3_me_FMU_01exo.c CallExternalPythonV3_me_FMU_01exo.c: In function 'CallExternalPythonV3_me_FMU_callExternalObjectDestructors': CallExternalPythonV3_me_FMU_01exo.c:11:5: warning: implicit declaration of function 'omc_CallExternalPythonV3__me__FMU_FMI2ModelExchange_destructor' [-Wimplicit-function-declaration] omc_CallExternalPythonV3__me__FMU_FMI2ModelExchange_destructor(threadData,data->simulationInfo->extObjs[0]); ^
comment:16 by , 5 years ago
Together with:
[2] 16:37:08 Traduction Avertissement [CallExternalPythonV3_me_FMU: 92:7-95:21]: Could not find library OpenModelicaFMIRuntimeC in either of: /usr/lib//OpenModelicaFMIRuntimeC.dll /usr/lib//libOpenModelicaFMIRuntimeC.a /usr/lib//libOpenModelicaFMIRuntimeC.lib /lib//OpenModelicaFMIRuntimeC.dll /lib//libOpenModelicaFMIRuntimeC.a /lib//libOpenModelicaFMIRuntimeC.lib /usr/lib//OpenModelicaFMIRuntimeC.dll /usr/lib//libOpenModelicaFMIRuntimeC.a /usr/lib//libOpenModelicaFMIRuntimeC.lib /lib//OpenModelicaFMIRuntimeC.dll /lib//libOpenModelicaFMIRuntimeC.a /lib//libOpenModelicaFMIRuntimeC.lib
comment:17 by , 5 years ago
Milestone: | 1.14.0 → 1.16.0 |
---|
comment:19 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 after 1.17.0-dev.beta2 release
Which version of OMC is this?