Opened 6 years ago

Closed 5 years ago

#4844 closed defect (duplicate)

Weird behaviour of OMEdit with packages

Reported by: casella Owned by: adrpo
Priority: blocker Milestone: 1.14.0
Component: Frontend Version:
Keywords: Cc:

Description

Please open the ScalableTestSuite library, version 1.10.0, with the latest nightly build. Note the the library was updated today to include the model causing the reported problem, so it may still not be available in the built-in OMC libraries.

Select the ScalableTestSuite.Mechanical.HarmonicOscillator.ScaledExperiments.HarmonicOscillatorNetwork_N_10 model and simulate it. The code generation process proceeds until the generation of the C code, but then aborts with the following error messages:

[1] 13:44:00 Error
File.open: Failed to open file ScalableTestSuite.Mechanical.HarmonicOscillator.ScaledExperiments.HarmonicOscillatorNetwork_N_10_functions.c with mode 2: No such file or directory

[2] 13:44:01 Error
File.open: Failed to open file ScalableTestSuite.Mechanical.HarmonicOscillator.ScaledExperiments.HarmonicOscillatorNetwork_N_10_literals.h with mode 2: No such file or directory

[3] 13:44:01 Translation Error
Template error: A template call failed (C:\OpenModelica1.13.0-dev-64bit\bin\OMEdit.exe: [unknown function name]). One possible reason could be that a template imported function call failed (which should not happen for functions called from within template code; templates assert pure 'match'/non-failing semantics).

[4] 13:44:01 Translation Error
[C:/dev/OpenModelica64bit/OMCompiler/Compiler/SimCode/SimCodeMain.mo: 449:7-449:78]: Internal error C:\OpenModelica1.13.0-dev-64bit\bin\OMEdit.exe: [unknown function name] failed

The model is syntactically and semantically correct, and it simulates just fine with the 1.12.0 stable release. Unfortunately I can't say when OMEdit got broken since then.

Also note that if I define a new model

model foo
  extends ScalableTestSuite.Mechanical.HarmonicOscillator.ScaledExperiments.HarmonicOscillatorNetwork_N_10;
  annotation(experiment(StopTime=10));
end foo;

it works just fine.

Change History (4)

comment:1 Changed 6 years ago by casella

  • Owner changed from adeas31 to adrpo
  • Status changed from new to assigned

@adrpo reports that it is probably an issue related to the parallelization of template writing. Probably the stack size is not large enough on Windows and should be increased.

comment:2 Changed 6 years ago by casella

  • Milestone changed from 1.13.0 to 1.14.0

Rescheduled to 1.14.0

comment:3 follow-up: Changed 5 years ago by adeas31

  • Component changed from OMEdit to Frontend

This is because omc fails to handle long file names on Windows. As a workaround set C:/OMTemp as a working directory in OMEdit.

See also #5426.

comment:4 in reply to: ↑ 3 Changed 5 years ago by casella

  • Resolution set to duplicate
  • Status changed from assigned to closed

Replying to adeas31:

This is because omc fails to handle long file names on Windows. As a workaround set C:/OMTemp as a working directory in OMEdit.

OK, will do. In fact, this could also be a workaround for #5437

See also #5426.

Sure. In fact, #5426 makes this a duplicate, I'll close it as such.

Note: See TracTickets for help on using tickets.