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

Reduce duplication of 1d base state -> 3d MultiFab calculations #99

Open
harpolea opened this issue Sep 13, 2019 · 5 comments
Open

Reduce duplication of 1d base state -> 3d MultiFab calculations #99

harpolea opened this issue Sep 13, 2019 · 5 comments
Assignees
Labels

Comments

@harpolea
Copy link
Member

harpolea commented Sep 13, 2019

Routines offloaded to the GPU now take the 1d base state mapped to a 3d MultiFab. This mapping is often done within the C++ wrapper function of these routines, which is likely to lead to lots of duplication, the same quantities being mapped repeatedly by different functions. It might be more efficient to do the mapping once (e.g. just after the base state is changed) and carrying this around rather than computing it on the fly every time it's needed.

@harpolea harpolea added the GPU label Sep 13, 2019
@ajnonaka
Copy link
Contributor

One tricky part is that some of the X_cart temporary multifabs are filled with things like "rho0", where rho0 is passed in to a function and could be rho0_old, rho0_new, or some temporarily created rho_nph.

@harpolea
Copy link
Member Author

That's true. I wasn't thinking that this should be done for all of the X_carts, but I certainly noticed that there are an awful lot of w0_carts created, which seems rather inefficient

@ajnonaka
Copy link
Contributor

agreed about w0_cart. makes the code much cleaner too, less to pass around if w0_cart is part of the MAESTRO class.

@ajnonaka
Copy link
Contributor

I finished the first part of cleaning up w0_cart. w0_cart is now part of the MAESTRO class. the next step is to eliminate the calls that fill in w0_cart from w0. I think the idea is to fill in w0_cart from w0 immediately after make_w0 is called, and only then.

@ajnonaka
Copy link
Contributor

ok done with eliminating unnecessary calls to fill w0_cart from w0. Still other base state arrays to consider.

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

No branches or pull requests

2 participants