Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory allocation bug in ImplicitUpdate #164

Merged
merged 1 commit into from
Aug 16, 2024
Merged

Fix memory allocation bug in ImplicitUpdate #164

merged 1 commit into from
Aug 16, 2024

Conversation

hugary1995
Copy link
Collaborator

We have been allocating unnecessary 2nd derivative storage for the implicit model solved by ImplicitUpdate. This PR fixes that bug.

Copy link

github-actions bot commented Aug 16, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-08-16 15:57 UTC

@reverendbedford
Copy link
Owner

Syntax check

No syntax error, good job! 💜

Copy link

Test Results (ubuntu-latest-Release-ON)

    3 files  ±0      3 suites  ±0   32s ⏱️ -2s
  517 tests ±0    517 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 150 runs  ±0  3 150 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 245694d. ± Comparison against base commit 884615b.

Copy link

Test Results (macos-12-Debug-ON)

    3 files  ±0      3 suites  ±0   1m 24s ⏱️ -13s
  517 tests ±0    517 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 152 runs  ±0  3 152 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 245694d. ± Comparison against base commit 884615b.

Copy link

Test Results (ubuntu-latest-Debug-ON)

    3 files  ±0      3 suites  ±0   1m 22s ⏱️ -6s
  517 tests ±0    517 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 152 runs  ±0  3 152 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 245694d. ± Comparison against base commit 884615b.

Copy link

Test Results (macos-12-Release-ON)

    3 files  ±0      3 suites  ±0   56s ⏱️ -15s
  517 tests ±0    517 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 150 runs  ±0  3 150 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 245694d. ± Comparison against base commit 884615b.

Copy link

Python Binding Test Results (macos-12)

76 tests  ±0   52 ✅ ±0   1s ⏱️ -2s
 1 suites ±0   24 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 245694d. ± Comparison against base commit 884615b.

Copy link

Python Binding Test Results (ubuntu-latest)

76 tests  ±0   52 ✅ ±0   1s ⏱️ ±0s
 1 suites ±0   24 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 245694d. ± Comparison against base commit 884615b.

Copy link

Test Results (macos-12-Release-OFF)

    3 files  ±0      3 suites  ±0   43s ⏱️ -2s
  517 tests ±0    517 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 150 runs  ±0  3 150 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 245694d. ± Comparison against base commit 884615b.

Copy link

Test Results (ubuntu-latest-Release-OFF)

    3 files  ±0      3 suites  ±0   32s ⏱️ -2s
  517 tests ±0    517 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 150 runs  ±0  3 150 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 245694d. ± Comparison against base commit 884615b.

@reverendbedford
Copy link
Owner

Coverage after merging oom into main will be

94.24%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src/neml2/base
   CrossRef.cxx83.87%100%75%100%
   DiagnosticsInterface.cxx71.70%100%66.67%72.73%59, 62–64, 75, 78–80, 83, 86–88
   EnumSelection.cxx100%100%100%100%
   Factory.cxx98.21%100%100%97.83%46
   HITParser.cxx100%100%100%100%
   NEML2Object.cxx91.67%100%100%90%35
   OptionCollection.cxx100%100%100%100%
   OptionSet.cxx100%100%100%100%
   Registry.cxx75%100%66.67%76.92%38, 40–41, 56, 58–59
   Settings.cxx96.49%100%100%96.36%121, 126
src/neml2/drivers
   Driver.cxx91.67%100%100%90%39
   TransientDriver.cxx99%100%100%98.91%102, 272
src/neml2/drivers/solid_mechanics
   LargeDeformationIncrementalSolidMechanicsDriver.cxx94.67%100%100%94.37%63, 81, 83–84
   SolidMechanicsDriver.cxx99.11%100%100%99.07%77
src/neml2/misc
   error.cxx100%100%100%100%
   math.cxx95.74%100%93.55%96.18%249, 315, 317–318, 341, 343
   parser_utils.cxx98.46%100%100%98.18%64
   types.cxx100%100%100%100%
   utils.cxx90.91%100%100%88.24%52, 60
src/neml2/models
   ArrheniusParameter.cxx97.22%100%100%96.97%54
   BackwardEulerTimeIntegration.cxx92.59%100%75%97.62%56
   BufferStore.cxx73.33%100%66.67%75%36, 38, 40
   ComposedModel.cxx91.98%100%100%91.44%233, 235, 367, 375, 377–378, 386–387, 390, 392, 394, 396–399, 406, 417, 62, 99
   ConstantParameter.cxx52.11%100%40.74%88.24%43, 61
   CopyVariable.cxx54.05%100%38.89%95%46
   Data.cxx90%100%100%87.50%35
   ForwardEulerTimeIntegration.cxx86.27%100%66.67%92.31%55, 64, 96
   ImplicitUpdate.cxx95.51%100%100%95.18%122, 135, 172, 48
   InputParameter.cxx52.05%100%37.04%94.74%42
   LinearCombination.cxx94.44%100%75%100%
   LinearInterpolation.cxx92.86%100%77.78%96.97%41
   Model.cxx96.50%100%97.83%96.33%246, 317, 52, 525, 557, 588, 615, 617–619, 621–622, 645
   NonlinearParameter.cxx61.90%100%55.56%100%
   ParameterStore.cxx73.68%100%37.04%85.06%112, 138, 185, 187–188, 191–192, 199, 57, 59–61, 89
   RotationMatrix.cxx96%100%100%95.45%45
   SR2Invariant.cxx92.59%100%100%92.31%119, 144, 159–160, 77, 93
   VariableRate.cxx90.74%100%66.67%97.62%53
   VariableStore.cxx100%100%100%100%
   WR2ExplicitExponentialTimeIntegration.cxx79.17%100%75%79.55%50, 59, 66, 68–72, 93
   WR2ImplicitExponentialTimeIntegration.cxx96.08%100%100%95.74%57, 66
src/neml2/models/crystallography
   CrystalGeometry.cxx98.46%100%100%98.25%197, 59
   CubicCrystal.cxx93.75%100%100%92.86%51
   MillerIndex.cxx100%100%100%100%
   crystallography.cxx98.28%100%100%98.08%127
src/neml2/models/crystallography/user_tensors
   FillMillerIndex.cxx94.44%100%100%93.33%44
   SymmetryFromOrbifold.cxx93.33%100%100%92.31%47
src/neml2/models/solid_mechanics
   AssociativeIsotropicPlasticHardening.cxx96.67%100%100%96.30%50
   AssociativeKinematicPlasticHardening.cxx96.88%100%100%96.55%52
   AssociativePlasticFlow.cxx96.55%100%100%96.15%50
   ChabochePlasticHardening.cxx97.96%100%100%97.83%66
   Eigenstrain.cxx90.91%100%100%88.89%38
   Elasticity.cxx96%100%100%95.65%52
   FlowRule.cxx92.31%100%100%90.91%40
   GTNYieldFunction.cxx99.50%100%100%99.49%75
   GursonCavitation.cxx96.97%100%100%96.67%49
   IsotropicHardening.cxx93.33%100%100%92.31%42
   IsotropicMandelStress.cxx93.33%100%100%92.31%40
   KinematicHardening.cxx93.33%100%100%92.31%42
   KocksMeckingActivationEnergy.cxx97.73%100%100%97.56%63
   KocksMeckingFlowSwitch.cxx97.83%100%100%97.67%60
   KocksMeckingFlowViscosity.cxx98.86%100%100%98.82%65
   KocksMeckingRateSensitivity.cxx98.28%100%100%98.18%54
   KocksMeckingYieldStress.cxx96.88%100%100%96.55%47
   LinearIsotropicElasticity.cxx97.73%100%100%97.56%50
   LinearIsotropicHardening.cxx95.24%100%100%94.44%42
   LinearKinematicHardening.cxx95.24%100%100%94.44%43
   MandelStress.cxx93.33%100%100%92.31%42
   MixedControlSetup.cxx98.18%100%100%98.04%64
   Normality.cxx98.18%100%100%98.04%52
   OlevskySinteringStress.cxx96.97%100%100%96.67%54
   PerzynaPlasticFlowRate.cxx97.22%100%100%96.97%49
   PlasticFlowRate.cxx92.86%100%100%91.67%41
   RateIndependentPlasticFlowConstraint.cxx96.97%100%100%96.67%47
   ThermalEigenstrain.cxx96.30%100%100%95.83%51
   VoceIsotropicHardening.cxx96.30%100%100%95.83%47
   YieldFunction.cxx97.50%100%100%97.30%53
src/neml2/models/solid_mechanics/crystal_plasticity
   ElasticStrainRate.cxx97.67%100%100%97.50%62
   FixOrientation.cxx96.97%100%100%96.67%55
   LinearSingleSlipHardeningRule.cxx95.45%100%100%94.74%44
   OrientationRate.cxx97.67%100%100%97.50%62
   PlasticDeformationRate.cxx97.44%100%100%97.22%62
   PlasticVorticity.cxx97.37%100%100%97.14%61
   PowerLawSlipRule.cxx97.06%100%100%96.77%51
   ResolvedShear.cxx97.50%100%100%97.30%59
   SingleSlipHardeningRule.cxx95.24%100%100%94.74%52
   SingleSlipStrengthMap.cxx96%100%100%95.45%49
   SlipRule.cxx95.83%100%100%95.45%55
   SlipStrengthMap.cxx94.12%100%100%93.33%47
   SumSlipRates.cxx96.77%100%100%96.43%55
   VoceSingleSlipHardeningRule.cxx96.43%100%100%96%48
src/neml2/solvers
   Newton.cxx90.38%100%100%88.89%40, 59, 61–62, 64
   NewtonWithLineSearch.cxx90.20%100%100%89.36%53, 89–92
   NewtonWithTrustRegion.cxx88.68%100%100%87.76%109, 149–155, 182–184, 78
   NonlinearSolver.cxx94.44%100%100%93.75%45
   NonlinearSystem.cxx89.60%100%93.75%88.99%104–105, 124–125, 166, 168–170, 51, 85, 95–96
   Solver.cxx91.67%100%100%90%39
   TrustRegionSubProblem.cxx100%100%100%100%
src/neml2/tensors
   LabeledAxis.cxx80.63%100%91.67%79.29%137, 153, 157–159, 179, 189, 216, 268, 270, 272–274, 276–278, 280–281, 299, 312–313, 317, 335, 351, 357, 360, 367, 370–372, 374–378, 381, 384–386, 389–390
   LabeledAxisAccessor.cxx97.33%100%100%96.61%109–110
   LabeledMatrix.cxx100%100%100%100%
   LabeledTensor.cxx66.67%100%52.63%80.70%134, 136, 141, 143–144, 169, 171, 176, 178–179, 183, 185, 318, 329, 68–70, 72, 76, 78–80
   LabeledTensor3D.cxx100%100%100%100%
   LabeledVector.cxx94.12%100%100%92.86%50
   Quaternion.cxx100%100%100%100%
   R2.cxx80%100%75%81.82%54, 56
   R2Base.cxx100%100%100%100%
   R3.cxx100%100%100%100%
   R4.cxx89.74%100%87.50%90.32%42–43, 45
   Rot.cxx94.44%100%90.91%95.08%38–39, 41
   SR2.cxx100%100%100%100%
   SSR4.cxx87.67%100%81.25%89.47%124, 126, 130, 132, 136, 138
   SWR4.cxx100%100%100%100%
   

Copy link

Test Results (macos-12-Debug-OFF)

    3 files  ±0      3 suites  ±0   1m 23s ⏱️ -7s
  517 tests ±0    517 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 152 runs  ±0  3 152 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 245694d. ± Comparison against base commit 884615b.

Copy link

Test Results (ubuntu-latest-Debug-OFF)

    3 files  ±0      3 suites  ±0   1m 22s ⏱️ -4s
  517 tests ±0    517 ✅ ±0  0 💤 ±0  0 ❌ ±0 
3 152 runs  ±0  3 152 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 245694d. ± Comparison against base commit 884615b.

@reverendbedford reverendbedford merged commit 7a33bf6 into main Aug 16, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants