Opened 7 years ago

Closed 7 years ago

#4654 closed defect (fixed)

Activating -d=newInst via setCommandineOptions does not work sometimes

Reported by: Adrian Pop Owned by: Adrian Pop
Priority: high Milestone: 1.13.0
Component: New Instantiation Version:
Keywords: Cc:

Description

Running omc with the attached script fails to compile the model.
However running omc -d=newInst with the attached script works fine.

Attachments (1)

Change History (4)

comment:1 by Adrian Pop, 7 years ago

Owner: changed from Per Östlund to Adrian Pop
Status: newaccepted
Summary: Activating -d=newInst via setCommandineOptions does not sometimesActivating -d=newInst via setCommandineOptions does not work sometimes

comment:2 by Adrian Pop, 7 years ago

The error you're getting are rather weird, seems like loading of NFModelicaBuiltin.mo fails:

[/ScalableTestSuite 1.9.4/Electrical/BreakerCircuits.mo:22:7-25:15:writable] Error: No matching function found for pre(B.open) in component <REMOVE ME>
candidates are :
  pre() => ()

comment:3 by Per Östlund, 7 years ago

Resolution: fixed
Status: acceptedclosed

Fixed in cf618db7. The issue was that ModelicaBuiltin.mo was loaded before the script was evaluated, since the scripting functions are partially defined there. It was then cached and reused during the script evaluation. The fix simply invalidates the cache if -d=newInst is toggled on or off.

Note: See TracTickets for help on using tickets.