Skip to content

Information Geometric Regularization #900

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

Draft
wants to merge 57 commits into
base: master
Choose a base branch
from

Conversation

wilfonba
Copy link
Contributor

@wilfonba wilfonba commented Jun 21, 2025

Description

This PR adds the basic functionality of IGR to the code base. It includes 3rd and 5th order reconstruction, viscous and inviscid simulations, 2D and 3D simulations, Jacobi and Gauss-Seidel iterative solves, and an optional pressure limiter. It does not include more advanced features like unified memory or downsampling of I/O files.

Note (6/21/25, 5pm) - The current implementation matches the GB code performance on A100 GPUs. The performance of this implementation is still lacking on AMD hardware.

Type of change

Please delete options that are not relevant.

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

Scope

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

How Has This Been Tested?

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
    Current implementation summary:
    newNV.csv
    GB Implementation summary (warm start iteration count is different)
    oldNV.csv
  • Ran a Rocprof Systems profile using ./mfc.sh run XXXX --gpu -t simulation --rsys --hip-trace, and have attached the output file and plain text results to this PR.
    Current Implementation Trace:
    newFrontier.csv
    GB Implementation Trace:
    oldFrontier.csv
  • 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

Copy link

codecov bot commented Jun 21, 2025

Codecov Report

Attention: Patch coverage is 47.12230% with 294 lines in your changes missing coverage. Please review.

Project coverage is 45.35%. Comparing base (a34f0ca) to head (554a2cf).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/simulation/m_rhs.fpp 45.07% 99 Missing and 46 partials ⚠️
src/common/m_boundary_common.fpp 48.05% 37 Missing and 3 partials ⚠️
src/simulation/m_time_steppers.fpp 36.53% 24 Missing and 9 partials ⚠️
src/common/m_variables_conversion.fpp 13.04% 16 Missing and 4 partials ⚠️
src/simulation/m_checker.fpp 44.11% 17 Missing and 2 partials ⚠️
src/simulation/m_sim_helpers.f90 33.33% 8 Missing and 4 partials ⚠️
src/common/m_checker_common.fpp 70.58% 4 Missing and 1 partial ⚠️
src/common/m_helper_basic.f90 57.14% 0 Missing and 3 partials ⚠️
src/post_process/m_start_up.f90 57.14% 2 Missing and 1 partial ⚠️
src/pre_process/m_patch_helper.fpp 50.00% 3 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #900      +/-   ##
==========================================
- Coverage   45.77%   45.35%   -0.42%     
==========================================
  Files          68       70       +2     
  Lines       18664    20231    +1567     
  Branches     2251     2385     +134     
==========================================
+ Hits         8543     9176     +633     
- Misses       8763     9567     +804     
- Partials     1358     1488     +130     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants