Skip to content

Conversation

@ebchin
Copy link
Member

@ebchin ebchin commented Sep 10, 2025

This is an attempt to bring the dFEM functionality online in smaller, more easily reviewable chunks.

This first PR enables required dFEM functionality to solve a forward explicit dynamics problem. Parameters, jvp, and vjp functionality will likely be the next chunk.

Note: waiting for #1469 to merge before merging this one in

@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.06%. Comparing base (db9409c) to head (02d085e).
⚠️ Report is 15 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1465      +/-   ##
===========================================
+ Coverage    92.03%   92.06%   +0.03%     
===========================================
  Files          199      200       +1     
  Lines        25212    25356     +144     
===========================================
+ Hits         23203    23344     +141     
- Misses        2009     2012       +3     
Flag Coverage Δ
unittests 92.06% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ebchin ebchin self-assigned this Sep 17, 2025
@ebchin ebchin requested a review from tupek2 September 17, 2025 19:10

set(SERAC_ENABLE_CODEVELOP ON CACHE BOOL "")

set(SERAC_DISABLE_TRIBOL ON CACHE BOOL "")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo, it would be better to unset TRIBOL_DIR here, or at least rename this var to SERAC_ENABLE_TRIBOL to avoid double-negative

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a separate tribol-related PR up soon that will eliminate the need for this variable.

@ebchin ebchin changed the base branch from develop to task/update_tpls_for_enzyme September 28, 2025 04:33
Base automatically changed from task/update_tpls_for_enzyme to develop October 2, 2025 15:56
@ebchin ebchin added ready for review Ready for active inspection by reviewers gpu GPU related labels Oct 6, 2025
Copy link
Member

@btalamini btalamini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work!

#
# SPDX-License-Identifier: (BSD-3-Clause)

if(SMITH_USE_DFEM)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like SMITH_USE_DFEM isn't associated with any package, but rather its to enable or disable certain tests/ examples. maybe SMITH_ENABLE_DFEM is more appropriate?

i still don't fully understand the difference between dfem and enzyme, so maybe this question doesn't make any sense, but could we use SMITH_USE_ENZYME here?

also last question, could this option be removed once #1477 merges?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this bugged me too. I like SMITH_ENABLE_DFEM more, but it looks so out of place here: https://github.com/LLNL/smith/blob/develop/src/smith/smith_config.hpp.in#L32-L55. Also, we can make it go away once #1477 is merged. Maybe we just keep it as SMITH_USE_DFEM for now and get rid the variable when #1477 merges?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more thoughts:

Re: SMITH_USE_ENZYME, you could use dFEM without Enzyme, so it doesn't quite make sense here.

Also, IMO, using the SMITH_ENABLE_DFEM name would make sense at the CMake level (i.e. do conditional header includes instead of doing a #cmakedefine SMITH_USE_DFEM), but it breaks the header check in CI.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its fine to leave it as is then, and we can remove it later. may be worth creating an issue to track it

Copy link
Collaborator

@chapman39 chapman39 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just had a couple questions about SMITH_USE_DFEM option (see above) besides that lgtm

Co-authored-by: Alex Tyler Chapman <100869159+chapman39@users.noreply.github.com>
Copy link
Collaborator

@chapman39 chapman39 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty @ebchin !

@ebchin ebchin merged commit 50825a5 into develop Nov 12, 2025
10 checks passed
@ebchin ebchin deleted the feature/dfem-explicit-dynamics-gpu branch November 12, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gpu GPU related ready for review Ready for active inspection by reviewers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants