Opened 5 years ago
Closed 5 years ago
#5794 closed defect (fixed)
PowerGrids model fails during compilation in OMEdit but works fine from the command line
Reported by: | Francesco Casella | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | critical | Milestone: | 1.16.0 |
Component: | OMEdit | Version: | |
Keywords: | Cc: |
Description
Please try simulating PowerGrids.Examples.Tutorial.GridOperation.Controlled.ControlledGridWithReferenceCalculation
, using the latest Windows nightly.
I get the following errors:
[11] 19:23:20 Error File.open: Failed to open file PowerGrids.Examples.Tutorial.GridOperation.Controlled.ControlledGridWithReferenceCalculation_info.json with mode 2: No such file or directory [12] 19:23:20 Translation Error [C:/dev/OM64bit/OMCompiler/Compiler/SimCode/SerializeModelInfo.mo: 115:9-115:84]: Internal error SerializeModelInfo.serialize failed [13] 19:23:20 Error File.open: Failed to open file PowerGrids.Examples.Tutorial.GridOperation.Controlled.ControlledGridWithReferenceCalculation_functions.c with mode 2: No such file or directory [14] 19:23:20 Error File.open: Failed to open file PowerGrids.Examples.Tutorial.GridOperation.Controlled.ControlledGridWithReferenceCalculation_literals.h with mode 2: No such file or directory [15] 19:23:20 Translation Error Template error: A template call failed (C:\Program Files\OpenModelica1.16.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). [16] 19:23:20 Error File.open: Failed to open file PowerGrids.Examples.Tutorial.GridOperation.Controlled.ControlledGridWithReferenceCalculation_init.xml with mode 2: No such file or directory [17] 19:23:20 Translation Error [C:/dev/OM64bit/OMCompiler/Compiler/SimCode/SimCodeMain.mo: 466:7-466:78]: Internal error C:\Program Files\OpenModelica1.16.0-dev-64bit\bin\OMEdit.exe: [unknown function name] failed
However, if I run the very same model from the test.mos script, it works fine.
I've deleted all the files in the working directory, but to no avail.
Any idea why this happens? I remember a similar issue some time ago but I can't recall if or how it was solved.
We are releasing PowerGrids as open source in a couple of weeks and planning a tutorial at the OpenModelicaWorshop, I'd be glad if we can get this to work before that.
Thank you!
Change History (6)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Most likely because OMEdit writes the file in:
/%TEMP%/ /OpenModelica/ /OMEdit/ /PowerGrids.Examples.Tutorial.GridOperation.Controlled.ControlledGridWithReferenceCalculation/ /PowerGrids.Examples.Tutorial.GridOperation.Controlled.ControlledGridWithReferenceCalculation_info.json
which I bet is > 265
chars long MAX_PATH
.
I think we need to minimize the path, not output the full model name in %TEMP%/OpenModelica/OMEdit/
, maybe for starters, just the last part.
follow-up: 6 comment:4 by , 5 years ago
Yeah, this came to mind to me this evening before I read these comments.
I see that for me %TEMP
is currently C:\Users\Francesco Casella\AppData\Local\Temp
, which already takes 46 chacters. I guess setting it to something like C:\Temp
could be a reasonable workaround for the time being. Is there any easy way to do that without tinkering with Windows environment variables?
comment:6 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to casella:
Is there any easy way to do that without tinkering with Windows environment variables?
This was a dumb question, of course it's Options|General|Working Directory :)
Attachments by e-mail 17/01/20 19:28