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

Hyperelastic RMT code with updated modular precision #767

Open
wants to merge 545 commits into
base: master
Choose a base branch
from

Conversation

mrodrig6
Copy link
Member

@mrodrig6 mrodrig6 commented Dec 21, 2024

Type of change

  • New feature (non-breaking change which adds functionality)
  • Something else

Scope

  • This PR comprises a set of related changes with a common goal

If you cannot check the above box, please split your PR into multiple PRs that each have a common goal.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Tested the code on NCSA Delta and passed the full test suite and most example cases.

Provide instructions so we can reproduce.
Ran on 2 GPUs with one CPU each on an interactive node
./mfc.sh test -j 8 --max-attempt 3 -- -c delta

Test Configuration:

  • What computers and compilers did you use to test this:

Checklist

  • I have added comments for the new code
  • I added Doxygen docstrings to the new code
  • I have made corresponding changes to the documentation (docs/)
  • I have added regression tests to the test suite so that people can verify in the future that the feature is behaving as expected
  • I have added example cases in examples/ that demonstrate my new feature performing as expected.
    They run to completion and demonstrate "interesting physics"
  • I ran ./mfc.sh format before committing my code
  • New and existing tests pass locally with my changes, including with GPU capability enabled (both NVIDIA hardware with NVHPC compilers and AMD hardware with CRAY compilers) and disabled
  • This PR does not introduce any repeated code (it follows the DRY principle)
  • I cannot think of a way to condense this code and reduce any introduced additional line count

If your code changes any code source files (anything in src/simulation)

To make sure the code is performing as expected on GPU devices, I have:

  • Checked that the code compiles using NVHPC compilers
  • Checked that the code compiles using CRAY compilers
  • Ran the code on either V100, A100, or H100 GPUs and ensured the new feature performed as expected (the GPU results match the CPU results)
  • Ran the code on MI200+ GPUs and ensure the new features performed as expected (the GPU results match the CPU results)
  • Enclosed the new feature via nvtx ranges so that they can be identified in profiles
  • Ran a Nsight Systems profile using ./mfc.sh run XXXX --gpu -t simulation --nsys, and have attached the output file (.nsys-rep) and plain text results to this PR
  • Ran an Omniperf profile using ./mfc.sh run XXXX --gpu -t simulation --omniperf, and have attached the output file and plain text results to this PR.
  • Ran my code using various numbers of different GPUs (1, 2, and 8, for example) in parallel and made sure that the results scale similarly to what happens if you run without the new code/feature

mrodrig6 and others added 30 commits June 30, 2024 13:16
…dded hypo to 6-eq model in m_global_params for pre,sim,post_process to expand sys_size
do l = 0, p
do k = 0, n
do j = 0, m
do l = 0, p - 2
Copy link
Member

Choose a reason for hiding this comment

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

where does the -2 come from? is this fd_order - 2 = 2? if so, `fd_order refers to something used in post-processing and probes, not in the simulation code for finite differencing during simulation (though I would understand the confusion).

Copy link
Member Author

Choose a reason for hiding this comment

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

This is due to boundary conditions that have not been coded for RMT and connected to the s_populate_variables_buffers issue below.. I will investigate this further.

Copy link
Member

Choose a reason for hiding this comment

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

can you put something in m_checker then that stops MFC when it detects that hyperelasticity is used with a BC it does not support?

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, I can definitely do that.

@sbryngelson
Copy link
Member

@mrodrig6 @mcarcana Hyperelasticity has no tests in the test suite... can you add them, or this somehow intentional?

@sbryngelson sbryngelson added the enhancement New feature or request label Dec 21, 2024
@sbryngelson
Copy link
Member

sbryngelson commented Dec 22, 2024

The chemistry cases are failing... I'm wondering if one of our merges, we/I messed up chemistry. I suspect so. @mrodrig6

Update: nevermind, was just failing a couple example cases and I read the output wrong.

@sbryngelson
Copy link
Member

sbryngelson commented Dec 23, 2024

@mrodrig6 I think I fixed everything that was breaking the CI.

Two to-dos that I cannot seem to do myself:

  • Need new CI tests for hyperelasticity
  • Need to resolve the remaining review comments I left above that haven't been resolved yet. Any questions on that just let me know.

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 4.93827% with 77 lines in your changes missing coverage. Please review.

Project coverage is 44.55%. Comparing base (b4d2b58) to head (27c4f96).

Files with missing lines Patch % Lines
src/simulation/m_boundary_conditions.fpp 0.00% 48 Missing and 6 partials ⚠️
src/post_process/m_start_up.f90 20.00% 7 Missing and 1 partial ⚠️
src/common/m_variables_conversion.fpp 20.00% 4 Missing ⚠️
src/pre_process/m_assign_variables.fpp 0.00% 4 Missing ⚠️
src/simulation/m_hyperelastic.fpp 0.00% 3 Missing ⚠️
src/simulation/m_rhs.fpp 25.00% 2 Missing and 1 partial ⚠️
src/pre_process/m_patches.fpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #767      +/-   ##
==========================================
- Coverage   44.72%   44.55%   -0.17%     
==========================================
  Files          62       62              
  Lines       17555    17612      +57     
  Branches     2044     2050       +6     
==========================================
- Hits         7851     7847       -4     
- Misses       8439     8494      +55     
- Partials     1265     1271       +6     

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

@sbryngelson sbryngelson requested a review from ChrisZYJ December 24, 2024 01:35
@sbryngelson
Copy link
Member

requesting code review from @ChrisZYJ

@mrodrig6
Copy link
Member Author

@mrodrig6 @mcarcana Hyperelasticity has no tests in the test suite... can you add them, or this somehow intentional?

Added just now, but as examples. I need to verify the examples first.

@ChrisZYJ
Copy link
Contributor

@mrodrig6 Could you please take a look at issue #771? It would be very helpful if you could identify the error and implement a quick fix. If not, I'm happy to help revert your previous PR's changes to the hypoelasticity module - it seems that would solve the problem. (It appears your previous PR changed how finite difference coefficients are computed, but didn't add new functionality for hypoelasticity. Please correct me if I'm wrong.)

@sbryngelson sbryngelson mentioned this pull request Dec 24, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

6 participants