Opened 7 years ago

Closed 6 years ago

#4844 closed defect (duplicate)

Weird behaviour of OMEdit with packages

Reported by: Francesco Casella Owned by: Adrian Pop
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 by Francesco Casella, 7 years ago

Owner: changed from Adeel Asghar to Adrian Pop
Status: newassigned

@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 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0

comment:3 by Adeel Asghar, 6 years ago

Component: OMEditFrontend

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.

in reply to:  3 comment:4 by Francesco Casella, 6 years ago

Resolution: duplicate
Status: assignedclosed

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.