Make global AD indexing with sparse container MOOSE default config #16091
Labels
C: Automatic Differentiation
Tickets pertaining the MetaPhysicL based forward mode AD system
C: Framework
P: normal
A defect affecting operation with a low possibility of significantly affects.
T: task
An enhancement to the software.
Reason
Pros:
DualNumber
math with an unseeded sparse container, you don't take much of a performance hit. You can see Speed up nonsparse AD initial setup significantly #16089 for an example of why nonsparse containers are a painCons:
Design
It's already done. Just have to change
MooseDefaultConfig.h
. I'm going to give users some time to give feedback before making this change. If I see enough concrete examples of global-sparse AD being slow relative to local-nonsparse AD, then I won't make the change. Unless that happens, however, I'm planning to make the change in January.An important note is that even if we change to global-sparse as the default config, nonsparse isn't going to disappear as a configure option, at least not for the foreseeable future and not without proper deprecation warnings (they would be compiler-time warnings).
Impact
I think I would probably spend a lot less time doing AD maintenance in a framework that was global-sparse-AD based. For example I've sunk a half-day into #16089 which I wouldn't have if we lived in a world of global-sparse-AD. Also if we were to one day deprecate the nonsparse code, our AD code base would get much simpler and it would be easier to do AD development. Moreover, I think it would positively impact users for the reasons mentioned above.
The text was updated successfully, but these errors were encountered: