Skip to content

Implemented new kernel interface for compositional properties #1698

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

Merged
merged 4 commits into from
Dec 21, 2021

Conversation

francoishamon
Copy link
Contributor

This PR implements a simple kernel interface for the compositional property updates:

  • Component fractions
  • Phase volume fractions
  • Phase mobilities (FV and mimetic)
  • Total mass densities (wells)

with a base class that contains the various launch functions, and derived classes implementing the compute functions. The goal is to make the extension to thermal easier using callbacks in the compute functions. The non-local terms (fluxes, etc) will be done in #1696, and the well kernels in another PR.

The downside is that I am no longer able to use explicit instantiation with this approach.

The PR is ready for ready for review, and passes the integrated tests on Quartz and Lassen (no rebaseline necessary).

Copy link
Contributor

@klevzoff klevzoff left a comment

Choose a reason for hiding this comment

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

LGTM!

@francoishamon francoishamon added ci: run CUDA builds Allows to triggers (costly) CUDA jobs and removed flag: ready for review labels Dec 14, 2021
@francoishamon francoishamon merged commit 1f4067c into develop Dec 21, 2021
@francoishamon francoishamon deleted the feature/hamon/propertiesKernel branch December 21, 2021 02:49
@mkhait
Copy link
Contributor

mkhait commented Dec 21, 2021

"The downside is that I am no longer able to use explicit instantiation with this approach"

@francoishamon, why is that downside? I always thought its a benefit )

@francoishamon
Copy link
Contributor Author

francoishamon commented Dec 21, 2021

@mkhait Previously, in the compositional solver, we were explicitly instantiating the templated functions (mainly the launch functions) in the cpp files to speed up compilation (particularly for the GPU builds that take forever). But now, with the new kernel classes, it has become harder to do and I removed many of these explicit template instantiations.

I don't know enough about compilation to provide a more detailed answer :) and experts will jump in to add details. The long term approach that we want to follow is to use just-in-time compilation to speed up our builds, as in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run CUDA builds Allows to triggers (costly) CUDA jobs type: cleanup / refactor Non-functional change (NFC)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants