Opened 6 years ago

Last modified 6 years ago

#3342 new defect

Runtime options during initialization

Reported by: Iakov Nakhimovski Owned by: jsten
Priority: minor Milestone: Pending
Component: CodeGen/C Version: trunk
Keywords: #2357. Cc:

Description (last modified by Jesper Mattsson)

Currently default values for run-time options are generated into jmi_set_start_values(). This means that they can not be utilized in run-time before the start values for all the vars are calculated. This have particular effect for the log_level option which gets updated after setting all the start values.
Now, if jmi_set_start_values() requires a call to an external function (e.g. external object constructor) and that one in turn calls ModelicaMessage/ModelicaError the produced message is checked against the value of log_level set during options struct construction and not the one set by the user.
A possible resolution for this is generation of run-time options settings into a separate function, e.g., jmi_set_runtime_options().

This is a part of #2357.

Change History (4)

comment:1 Changed 6 years ago by Iakov Nakhimovski


Changed log_level that is set into options struct at creation to allow messages from ModelicaMessage/ModelicaError to go through during instantiate(). See #3342

This is a workaround so that no messages are missed.

Fixed a memory leak on the way.

comment:2 Changed 6 years ago by Iakov Nakhimovski

Milestone: Pending

comment:3 Changed 6 years ago by Jesper Mattsson

r5814: Merged all missed revisions for 1.12 to release branch.

Last edited 6 years ago by Jesper Mattsson (previous) (diff)

comment:4 Changed 6 years ago by Jesper Mattsson

Description: modified (diff)
Keywords: #2357. added; #3075. removed
Note: See TracTickets for help on using tickets.