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

Add deal.II example (with Kokkos) #1461

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

Conversation

peterrum
Copy link
Collaborator

@peterrum peterrum commented Feb 2, 2024

As suggested in #1436 (comment), this PR adds a deal.II example using Kokkos. The matrix-free infrastructure in deal.II that uses Kokkos is not as mature so that I only run BP1 (without overintegration) and BP5.

std::cout << "--n_refinements number of refinements (0-)" << std::endl;
std::cout << "--fe_degree polynomial degree (1-)" << std::endl;
std::cout << "--print_timings name of benchmark (0, 1)" << std::endl;
std::cout << "--resource name of resource (e.g., /cpu/self/avx/blocked)" << std::endl;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jeremylt I am wondering whether it is possible to extract the resource information from Kokkos and pass it to libCEED or what the best approach is to keep them in sync?

Copy link
Member

Choose a reason for hiding this comment

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

All libCEED backends can accept CPU pointers for vectors, so what we do in PETSc is

  1. Create the user requested libCEED backend

  2. Request the preferred memory space (CEED_MEM_HOST or CEED_MEM_DEVICE) of this libCEED backend

  3. Set PETSc to use the requested memory space

I think a simpler version of this could be to request the libCEED backend's preferred memory space and hand off pointers in that memory space.

// Set up libCEED

Comment on lines +54 to +55
// TESTARGS(name="BP1") --resource {ceed_resource} --bp BP1 --fe_degree 2 --print_timings 0
// TESTARGS(name="BP4") --resource {ceed_resource} --bp BP4 --fe_degree 3 --print_timings 0
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// TESTARGS(name="BP1") --resource {ceed_resource} --bp BP1 --fe_degree 2 --print_timings 0
// TESTARGS(name="BP4") --resource {ceed_resource} --bp BP4 --fe_degree 3 --print_timings 0
//TESTARGS(name="BP1") --resource {ceed_resource} --bp BP1 --fe_degree 2 --print_timings 0
//TESTARGS(name="BP4") --resource {ceed_resource} --bp BP4 --fe_degree 3 --print_timings 0

CI breaks if these comments aren't formatted like this

Comment on lines +53 to +54
// TESTARGS(name="BP1") --resource {ceed_resource} --bp BP1 --fe_degree 2 --print_timings 0
// TESTARGS(name="BP4") --resource {ceed_resource} --bp BP5 --fe_degree 3 --print_timings 0
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// TESTARGS(name="BP1") --resource {ceed_resource} --bp BP1 --fe_degree 2 --print_timings 0
// TESTARGS(name="BP4") --resource {ceed_resource} --bp BP5 --fe_degree 3 --print_timings 0
//TESTARGS(name="BP1") --resource {ceed_resource} --bp BP1 --fe_degree 2 --print_timings 0
//TESTARGS(name="BP4") --resource {ceed_resource} --bp BP5 --fe_degree 3 --print_timings 0

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

Successfully merging this pull request may close these issues.

None yet

2 participants