-
Notifications
You must be signed in to change notification settings - Fork 97
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
get rid of global / managed runtime parameters #2685
Comments
We will need to separately do the same for Microphysics, but we can do that after this. |
Note: for GPU kernels, we will need to pass the parameter struct as a lambda-captured copy down through any GPU functions we call in each kernel. |
actually, it looks like in |
most of the infrastructure is now in place for this. |
This addresses the first part of #2685 Depends on AMReX-Astro/Microphysics#1422
we will be able to do this on Intel / SYCL: we will still want to do #2701 |
GPU compilers seem to have trouble with managed-memory runtime parameters, so we should remove them.
The idea is that we will have the current python script define a set of structs for each namespace and then a parent struct,
params
that has each namespace struct. E.g.:We will then make
params run_params
a static member variable of theCastro
class. This would allow us to access it anywhere.If we want to simplify things, we could do something like:
to just access the hydro parameters.
Currently all of the Castro runtime parameters are parmparsed in separate headers, like
castro_queries.H
that are all included inintiialize_cpp_runparams()
.We can implement this a bit at a time. Here's an outline:
parse_castro_params.py
to create the struct's for each namespace and the parent struct. These can all be in a single header. This is done in PR start of moving runtime parameters to structs #2688.modifyIn theparse_castro_params.py
to also create a "sync" function that initializes the runtime parameter structs by setting the value from the global version. This is temporary.*_queries.H
, also set the struct version of the parameter. This is done in PR start of moving runtime parameters to structs #2688.read_params()
orCastro_setup.cpp
, also update the structThe text was updated successfully, but these errors were encountered: