Opened 8 years ago
Closed 6 years ago
#4159 closed defect (fixed)
Clean up flags dealing with Jacobian generation
Reported by: | Francesco Casella | Owned by: | Willi Braun |
---|---|---|---|
Priority: | high | Milestone: | 1.13.0 |
Component: | Backend | Version: | |
Keywords: | Cc: |
Description
The current situation with compiler flags dealing with Jacobian generation is a bit confusing. We have
--postOptModules=calculateStrongComponentJacobians
Generates analytical jacobian for torn linear and non-linear strong components. By default non-linear components with user-defined function calls are skipped. See also debug flags: NLSanalyticJacobian and forceNLSanalyticJacobian)--initOptModules=calculateStrongComponentJacobians
Generates analytical jacobian for torn linear and non-linear strong components. By default non-linear components with user-defined function calls are skipped. See also debug flags: NLSanalyticJacobian and NLSanalyticJacobianDisable--debug=NLSanalyticJacobian
Enables analytical jacobian for non-linear strong components without user-defined function calls, for that see forceNLSanalyticJacobian--debug=forceNLSanalyticJacobian
Forces calculation analytical jacobian also for non-linear strong components with user-defined functionsdetectJacobianSparsePattern
Detects the sparse pattern for Jacobian A
NLSanalyticJacobianDisable
is mentioned in the documentation of--initOptModules=calculateStrongComponentJacobians
ulateStrongComponentJacobians}}}, but actually seems to be defined nowhere
- It is not clear what is the interplay between the preOptModule and initOptModule flags and the debug flags. If I set the debug flags, do they override both the intOpt and postOpt flags? What if I wanted to force the symbolic differentiation of functions for the initial equation system but not for the causalized simulation equations?
- It is not clear what exactly is the Jacobian matrix A computed by
detectJacobianSparsePattern
. I guess it is df/dx in the causalized representation dx/dt = f(x,t) - if so, please write it down explicitly
Change History (9)
follow-up: 2 comment:1 by , 8 years ago
Status: | new → accepted |
---|
follow-up: 3 comment:2 by , 8 years ago
Replying to wbraun:
Replying to casella:
- It is not clear what is the interplay between the preOptModule and initOptModule flags and the debug flags. If I set the debug flags, do they override both the intOpt and postOpt flags? What if I wanted to force the symbolic differentiation of functions for the initial equation system but not for the causalized simulation equations?
The debug flags do change the behavior of the module, which is used in the different pipe-lines. So currently you can not achieve the later behavior. So I need to create different modules for that.
You don't need different modules for that. You just need to define accurately the intended behaviour with flags.
follow-up: 4 comment:3 by , 8 years ago
Replying to lochel:
You don't need different modules for that. You just need to define accurately the intended behaviour with flags.
I agree with Lennart. The case of doing different things for initialization and simulation was just hypothetical, it's probably of little or no practical use. Just make sure that the behaviour with the different flags is clear in the documentation, particularly when you combine them, because currently it's not.
I won't waste time adding other modules (and yet another flag), unless there's a specific need to do so.
comment:4 by , 8 years ago
Replying to casella:
The case of doing different things for initialization and simulation was just hypothetical, it's probably of little or no practical use.
I agree. The current design uses the same debug flags for all optimization phases. If there are other use cases, then we have just to define more specific debug flags. However, this has to be clear from the documentation.
comment:5 by , 7 years ago
Milestone: | 1.12.0 → 1.13.0 |
---|
Milestone moved to 1.13.0 due to 1.12.0 already being released.
comment:7 by , 6 years ago
I guess so. I only have one doubt: the detectJacobianSparsePattern
flag has disappeared from the compiler flags. Was this done on purpose?
Replying to casella:
NLSanalyticJacobianDisable
is outdated and already removed but forgotten in the flag description. Fixed in #PR1264.Replying to casella:
The debug flags do change the behavior of the module, which is used in the different pipe-lines. So currently you can not achieve the later behavior. So I need to create different modules for that.
Replying to casella:
Fixed in #PR1264.