-
Notifications
You must be signed in to change notification settings - Fork 47
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
base: main
Are you sure you want to change the base?
Conversation
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
-
Create the user requested libCEED backend
-
Request the preferred memory space (CEED_MEM_HOST or CEED_MEM_DEVICE) of this libCEED backend
-
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.
libCEED/examples/petsc/multigrid.c
Line 111 in e4483ef
// Set up libCEED |
// 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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
// 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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 |
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.