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

convert some CTU hydro routines to C++ #731

Merged
merged 141 commits into from
Feb 12, 2020
Merged

convert some CTU hydro routines to C++ #731

merged 141 commits into from
Feb 12, 2020

Conversation

zingale
Copy link
Member

@zingale zingale commented Jan 12, 2020

PR summary

This converts the CTU consup for hydro (not radiation) , the flattening routines, and src_to_prim to C++

PR checklist

  • test suite needs to be run on this PR
  • this PR will change answers in the test suite
  • all functions have docstrings as per the coding conventions
  • the CHANGES file has been updated
  • if appropriate, this change is described in the docs

@zingale zingale changed the base branch from master to development January 12, 2020 23:38
@zingale
Copy link
Member Author

zingale commented Feb 9, 2020

all CPU tests pass
need to do the GPU tests too

@zingale
Copy link
Member Author

zingale commented Feb 9, 2020

GPU works for everything except wdmerger. This is a hybrid hydro issue. We get:

0: copyout Memcpy (host=0x7ffecdac3520, dev=0x7f2af7025400, size=24) FAILED: 719(unspecified launch failure)```

@zingale
Copy link
Member Author

zingale commented Feb 10, 2020

The issue is the call to position_c

@zingale
Copy link
Member Author

zingale commented Feb 11, 2020

GPU tests now pass:
http://groot.astro.sunysb.edu/Castro/test-suite/gpu/2020-02-10-001/index.html

CPU tests pass too (note: the failures are because of changes on development not merged into this):
http://groot.astro.sunysb.edu/Castro/test-suite/gfortran/2020-02-10-005/index.html

this is ready to be merged

{
flatn_arr(i,j,k) = flatn_arr(i,j,k) * flatg_arr(i,j,k);

if (Radiation::flatten_pp_threshold > 0.0) {
Copy link
Member

Choose a reason for hiding this comment

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

We cannot directly read class member variables in the lambdas on the device. For now we'll need to make a local copy of this variable outside the parallel for.

if ( q_arr(i-1,j,k,QU) + q_arr(i,j-1,k,QV) + q_arr(i,j,k-1,QW) >
q_arr(i+1,j,k,QU) + q_arr(i,j+1,k,QV) + q_arr(i,j,k+1,QW) ) {

if (q_arr(i,j,k,QPRES) < Radiation::flatten_pp_threshold * q_arr(i,j,k,QPTOT)) {
Copy link
Member

Choose a reason for hiding this comment

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

Same comment for this one :-)

@zingale zingale merged commit b6bf050 into development Feb 12, 2020
@zingale zingale deleted the cxx-hydro branch February 12, 2020 20:35
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.

2 participants