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

Moving Levelset Calculation to Pre-Process #662

Merged
merged 6 commits into from
Nov 12, 2024

Conversation

anshgupta1234
Copy link
Contributor

@anshgupta1234 anshgupta1234 commented Oct 27, 2024

Description

This PR moves the calculation of levelsets to pre-process because it makes more sense + allows @haochey to add STL levelsets easily. It also re-generates golden files for IBM cases, because the minor differences in levelset

Type of change

  • Refactoring

Scope

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

How Has This Been Tested?

  • Old vs New, CPU
levelset-comparison.mp4
  • GPU testing (pending)

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 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 (Done with NVIDIA, not with AMD hardware yet)
  • 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

NOTE: Not sure if I have to do the profiles+GPU scaling, it's just moving the same computation around.

Copy link

codecov bot commented Oct 27, 2024

Codecov Report

Attention: Patch coverage is 41.31737% with 98 lines in your changes missing coverage. Please review.

Project coverage is 42.89%. Comparing base (3663d37) to head (8c9f10c).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/pre_process/m_compute_levelset.fpp 0.00% 35 Missing ⚠️
src/simulation/m_start_up.fpp 44.82% 27 Missing and 5 partials ⚠️
src/pre_process/m_data_output.fpp 74.35% 9 Missing and 1 partial ⚠️
src/simulation/m_ibm.fpp 18.18% 9 Missing ⚠️
src/pre_process/m_global_parameters.fpp 0.00% 3 Missing and 1 partial ⚠️
src/pre_process/m_initial_condition.fpp 33.33% 4 Missing ⚠️
src/common/m_mpi_common.fpp 77.77% 2 Missing ⚠️
src/pre_process/m_start_up.fpp 50.00% 1 Missing ⚠️
src/simulation/m_data_output.fpp 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #662      +/-   ##
==========================================
+ Coverage   42.85%   42.89%   +0.04%     
==========================================
  Files          61       61              
  Lines       16280    16297      +17     
  Branches     1891     1881      -10     
==========================================
+ Hits         6976     6991      +15     
- Misses       8259     8264       +5     
+ Partials     1045     1042       -3     

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

@sbryngelson
Copy link
Member

@anshgupta1234 try rebasing w/ master now that #700 is merged.

lowering tol for ib

even lower tolerance?

reversing unnecessary changes

Update m_start_up.fpp

Revert "even lower tolerance?"

This reverts commit a0e14da.

golden file update + formatting

add ib to 1e-10

Update case.py

delete these declare_globals?

Update m_ibm.fpp

vf->sf

Update m_ibm.fpp

Update m_ibm.fpp

mpi bug fix

maybe some more MPI fixes?

remove determine_IB_boundary
@anshgupta1234 anshgupta1234 marked this pull request as ready for review November 11, 2024 02:41
@sbryngelson
Copy link
Member

@henryleberre if you wouldn't mind having a quick look at this PR before merging.

@sbryngelson sbryngelson requested a review from wilfonba November 11, 2024 21:11
@sbryngelson sbryngelson merged commit daf3acd into MFlowCode:master Nov 12, 2024
24 of 25 checks passed
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.

3 participants