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

Replace mfiter loops with the MF parallel for versions #1069

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marchdf
Copy link
Contributor

@marchdf marchdf commented May 21, 2024

Summary

Replace mfiter loops with the MF parallel for versions. These take care of a bunch of defaults for use, creates fused parallelfors for the GPU (nominally results in faster code), and generally simplifies the code.

I am looking for volunteers. I have annotated all the mfiter loops that can be simplified. I probably missed some and some might not be doable on a second glance. I did a couple to show how it is done and there are other examples in the code.

Annotations are // this one for mfiter loop canditates.

Also identified // needs openmp pragma? for loops not containing openmp and that maybe should.

I am using clang-format 18 to format the code, which causes the formatting check to break. But I am going to leave that alone so we don't waste resources and will fix the formatting later.

Pull request type

Please check the type of change introduced:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Checklist

This PR was tested by running:

  • the unit tests
    • on GPU
    • on CPU
  • the regression tests
    • on GPU
    • on CPU

amr-wind/core/Field.cpp Outdated Show resolved Hide resolved
@marchdf marchdf force-pushed the fused-mfiter branch 2 times, most recently from 05a9d3f to b898303 Compare July 8, 2024 19:42
@marchdf marchdf mentioned this pull request Jul 8, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants