Improving Performance of AD Material Models in MOOSE with Many Parameters #32776
Replies: 3 comments 13 replies
-
|
Hello
Yes it's possible it will help. The best way to gather more information on this would be to profile before optimizing: You will need to re-compile in oprof mode
You can investigate that by using finite difference preconditioning btw. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @GiudGiud,
Thanks for the tip—I tried using finite difference preconditioning, and it successfully resolved the convergence failures I was seeing. |
Beta Was this translation helpful? Give feedback.
-
In my case I have around 7000 nodes, with each having 3 dof.
Which PETSc options are recommended for handling large-scale problems with a high number of nodes? |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Check these boxes if you have followed the posting rules.
Question
Hi Moose Team,
I converted my original (non-AD) material model to an AD version by replacing types like
RealandRankTwoTensorwithADRealandADRankTwoTensor, and by using the appropriate getters such asgetADMaterialProperty.However, the AD implementation is significantly slower—around 10-15× compared to the original non-AD version. I have
automatic_scaling = trueenabled in both cases.The material model also includes around 20–25 input parameters (see: https://github.com/apatra6/rhocp/blob/main/src/materials/DDJ2StressUpdate.C). I’ve also read that AD performance can degrade with a large number of parameters (https://doi.org/10.1080/00295450.2020.1838877).
Would it help to convert variables that do not contribute to the Jacobian and constant variables from
ADRealback toRealto improve performance?More generally, could anyone suggest strategies to speed up the AD version? I need it for multiapp phase-field fracture simulations, where the non-AD version tends to fail, likely due to Jacobian-related issues.
Thanks,
Vikram Roy
Beta Was this translation helpful? Give feedback.
All reactions