Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#5880 closed defect (fixed)

MSL Electrical machine model only works in the Linux Jenkins tests, but not with -nfAPI

Reported by: casella Owned by: adrpo
Priority: blocker Milestone: 1.16.0
Component: Code Generation Version:
Keywords: Cc: adrpo

Description

Please consider the Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase model of MSL 3.2.3. It simulates correctly in our Jenkins test, but if you run it with the latest Windows nighly, lots of errors are generated and the simulation breaks around time = 6, with smee3.stator.electroMagneticConverter.singlePhaseElectroMagneticConverter[2].Phi.re blowing up to infinity.

@adeas31, this is quite odd, can you please check what happens here?

Attachments (1)

script.mos (178 bytes) - added by adeas31 4 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 4 years ago by adeas31

  • Component changed from OMEdit to Code Generation
  • Owner changed from adeas31 to mahge930
  • Status changed from new to assigned

With the current master version it fails to compile the simulation executable. Here is the compile log,

record SimulationResult
    resultFile = "",
    simulationOptions = "startTime = 0.0, stopTime = 30.0, numberOfIntervals = 30000, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''",
    messages = "Failed to build model: Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase",
    timeFrontend = 9.600737000000001,
    timeBackend = 6.6090968,
    timeSimCode = 0.5504135,
    timeTemplates = 0.6748769,
    timeCompile = 17.4779593,
    timeSimulation = 0.0,
    timeTotal = 34.9134391
end SimulationResult;
"Error: Error building simulator. Build log: OMDev\tools\msys\mingw64\bin\mingw32-make: Entering directory 'C:/Users/adeas31/Desktop/5880'
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_functions.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_functions.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_records.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_records.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_01exo.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_01exo.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_02nls.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_02nls.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_03lsy.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_03lsy.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_04set.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_04set.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_05evt.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_05evt.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_06inz.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_06inz.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_07dly.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_07dly.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_08bnd.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_08bnd.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_09alg.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_09alg.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_10asr.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_10asr.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_11mix.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_11mix.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_12jac.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_12jac.c
Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_functions.c: In function 'omc_Modelica_Electrical_MultiPhase_Functions_symmetricOrientation':
Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_functions.c:651:72: error: incompatible type for argument 1 of 'integer_array_make_index_array'
       create_index_spec(&tmp4, 1, tmp3, integer_array_make_index_array(tmp2), 'A');
                                                                        ^
In file included from C:/OpenModelica/build/include/omc/c/util/modelica.h:55:0,
                 from Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_functions.h:4,
                 from Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_functions.c:2:
C:/OpenModelica/build/include/omc/c/util/integer_array.h:270:18: note: expected 'const integer_array_t * {aka const struct base_array_s *}' but argument is of type 'integer_array {aka struct base_array_s}'
 extern _index_t* integer_array_make_index_array(const integer_array_t *arr);
                  ^
Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_functions.c:659:73: error: incompatible type for argument 1 of 'integer_array_make_index_array'
       create_index_spec(&tmp10, 1, tmp9, integer_array_make_index_array(tmp8), 'A');
                                                                         ^
In file included from C:/OpenModelica/build/include/omc/c/util/modelica.h:55:0,
                 from Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_functions.h:4,
                 from Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_functions.c:2:
C:/OpenModelica/build/include/omc/c/util/integer_array.h:270:18: note: expected 'const integer_array_t * {aka const struct base_array_s *}' but argument is of type 'integer_array {aka struct base_array_s}'
 extern _index_t* integer_array_make_index_array(const integer_array_t *arr);
                  ^
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_13opt.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_13opt.c
gcc  -Os -falign-functions -fno-ipa-pure-const -mstackrealign -msse2 -mfpmath=sse     -I"C:/OpenModelica/build//include/omc/c" -I. -DOPENMODELICA_XML_FROM_FILE_AT_RUNTIME -DOMC_MODEL_PREFIX=Modelica_Magnetic_FundamentalWave_Examples_BasicMachines_SMEE_Generator_MultiPhase -DOMC_NUM_MIXED_SYSTEMS=0 -DOMC_NUM_LINEAR_SYSTEMS=11 -DOMC_NUM_NONLINEAR_SYSTEMS=0 -DOMC_NDELAY_EXPRESSIONS=0 -DOMC_NVAR_STRING=0  -c -o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_14lnz.o Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_14lnz.c
<builtin>: recipe for target 'Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_functions.o' failed
OMDev\tools\msys\mingw64\bin\mingw32-make: *** [Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase_functions.o] Error 1
OMDev\tools\msys\mingw64\bin\mingw32-make: *** Waiting for unfinished jobs....
OMDev\tools\msys\mingw64\bin\mingw32-make: Leaving directory 'C:/Users/adeas31/Desktop/5880'
RESULT: 2
"

Last edited 4 years ago by adeas31 (previous) (diff)

comment:2 Changed 4 years ago by mahge930

  • Status changed from assigned to accepted

Changed 4 years ago by adeas31

comment:3 Changed 4 years ago by casella

What do you mean by "master" version? Both the newInst and master reports on Jenkins are fine.

comment:4 Changed 4 years ago by mahge930

I can not reproduce this as of 46dda5311a1760eb3f9ce892531711f3cc2f18b2.

Compilation and simulation completes successfully for both old and new front-ends on my machine. I am using the 64 bit version.

Can you verify again with this version just to make sure? I am using OMDev directly to compile from source and you are using nightly. If we still have the problem then I will have to check the nightly and see what difference we have in configurations between the two.

comment:5 Changed 4 years ago by casella

Will do ASAP. But this is obviously an OMEdit issue, if you use OMDev you are following a different path.

comment:6 Changed 4 years ago by adeas31

  • Cc adrpo added
  • Owner changed from mahge930 to adrpo
  • Status changed from accepted to assigned

I debugged a bit more and for sure it is not OMEdit issue. Here is the script to reproduce the issue,

setCommandLineOptions("-d=newInst");
getErrorString();
setCommandLineOptions("-d=nfAPI");
getErrorString();
loadModel(Modelica);
getErrorString();
simulate(Modelica.Magnetic.FundamentalWave.Examples.BasicMachines.SMEE_Generator_MultiPhase);
getErrorString();

Surprisingly the problematic part is setCommandLineOptions("-d=nfAPI");. If you remove this line everything works fine. @adrpo why is this flag making the simulation terminate?

comment:7 Changed 4 years ago by casella

  • Summary changed from MSL Electrical machine model only works in the Linux Jenkins tests, but not on Windows to MSL Electrical machine model only works in the Linux Jenkins tests, but not on with -nfAPI

comment:8 Changed 4 years ago by casella

  • Summary changed from MSL Electrical machine model only works in the Linux Jenkins tests, but not on with -nfAPI to MSL Electrical machine model only works in the Linux Jenkins tests, but not with -nfAPI

comment:9 Changed 4 years ago by adrpo

  • Status changed from assigned to accepted

comment:10 Changed 4 years ago by adrpo

  • Resolution set to fixed
  • Status changed from accepted to closed

comment:11 Changed 4 years ago by casella

Works fine, thanks @adrpo!

Note: See TracTickets for help on using tickets.