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

Question: batched FE_Values reinit? #14872

Closed
GrahamBenHarper opened this issue Mar 10, 2023 · 4 comments
Closed

Question: batched FE_Values reinit? #14872

GrahamBenHarper opened this issue Mar 10, 2023 · 4 comments

Comments

@GrahamBenHarper
Copy link
Contributor

GrahamBenHarper commented Mar 10, 2023

I have a brief question related to FE_Values and GPUs. Usually there is some notion of "worksets" or batched computations, but when I look at step-64, it seems the main assembly routine consists of doing a reinit on each cell

for (const auto &cell : dof_handler.active_cell_iterators)
    if (cell->is_locally_owned())
      {
        cell_rhs = 0;
 
        fe_values.reinit(cell);
...

Have things like worksets or batched cell reinits been considered, or are these technical details hidden away under the interface? Thanks for your time :)

@masterleinad
Copy link
Member

The point of step-64 is the matrix-free interface on GPUs and assembling the right-hand side is not the focus but we could likely also use a matrix-free approach for that similar to what step-37 is doing, see https://www.dealii.org/current/doxygen/deal.II/step_37.html#LaplaceProblemassemble_rhs.

@GrahamBenHarper
Copy link
Contributor Author

Ah, that's exactly what I had in mind! Is that capability on GPUs currently possible, but not currently demonstrated in a tutorial program?

@masterleinad
Copy link
Member

Ah, that's exactly what I had in mind! Is that capability on GPUs currently possible, but not currently demonstrated in a tutorial program?

In the actual matrix-free operator, the cells are batched (avoiding write conflicts between dofs) internally already.

@GrahamBenHarper
Copy link
Contributor Author

Got it; that's what I assumed, but wanted to double-check. Thanks @masterleinad!

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

No branches or pull requests

2 participants