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

Inconsistent behavior between CPU and GPU for liebendorf deleptonization and cooling #184

Merged
merged 15 commits into from
Dec 13, 2023

Conversation

carlnotsagan
Copy link
Collaborator

@carlnotsagan carlnotsagan commented Nov 7, 2023

Issue:

when using cooling_function with SASW/homologous problem. returns error:

:0: : block: [3,0,0], thread: [0,0,0] Assertion View bounds error of view p.density failed.

after first step

this backtraces to:

the cooling function

Host function was being called from device function leading to issues on GPU.


Steps Taken:

  • moved units calls outside of device kernels and saved as reals for call within kernel

@carlnotsagan carlnotsagan requested a review from mari2895 November 7, 2023 19:07
src/phoebus_driver.cpp Outdated Show resolved Hide resolved
@carlnotsagan carlnotsagan changed the title Typo relating to cooling function bool View size error when using cooling with SASW Nov 7, 2023
@Yurlungur
Copy link
Collaborator

@carlnotsagan do you encounter the same issue when running lightbulb with @mari2895 's CCSN problem initialization? If not maybe it has to do with changes in the SASW branch? Can you share the code for SASW in a PR?

@carlnotsagan carlnotsagan changed the title View size error when using cooling with SASW View size error when using cooling with SASW and homologous Nov 8, 2023
@carlnotsagan carlnotsagan changed the title View size error when using cooling with SASW and homologous Inconsistent behavior between CPU and GPU for liebendorf deleptonization and cooling Nov 21, 2023
Copy link
Collaborator

@Yurlungur Yurlungur left a comment

Choose a reason for hiding this comment

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

@mari2895 can you briefly skim this to make sure you agree? Then I will merge.

@carlnotsagan
Copy link
Collaborator Author

thanks for merging main, should be all good now

@Yurlungur
Copy link
Collaborator

Looks like tests are still failing?

@carlnotsagan
Copy link
Collaborator Author

looking into the fails. something to do with a reference to pmb

@@ -39,7 +39,8 @@ TaskStatus LightBulbCalcTau(MeshBlockData<Real> *rc) {
IndexRange jb = rc->GetBoundsJ(IndexDomain::interior);
IndexRange kb = rc->GetBoundsK(IndexDomain::interior);

auto &unit_conv = params.Get<phoebus::UnitConversions>("unit_conv");
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Yurlungur should not auto &unit_conv = params.Get<phoebus::UnitConversions>("unit_conv"); be working?

Comment on lines 193 to 201
// Code to CGS
const Real density_conversion_factor = unit_conv.GetMassDensityCodeToCGS();
const Real temperature_conversion_factor = unit_conv.GetTemperatureCodeToCGS();
const Real length_conversion_factor = unit_conv.GetLengthCodeToCGS();

// CGS to code
const Real energy_conversion_factor = unit_conv.GetEnergyCGSToCode();
const Real mass_conversion_factor = unit_conv.GetMassCGSToCode();
const Real time_conversion_factor = unit_conv.GetTimeCGSToCode();
Copy link
Collaborator

Choose a reason for hiding this comment

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

These lines probably don't need to be here, because the same definitions are above in the same function.

@Yurlungur Yurlungur merged commit 44f0637 into main Dec 13, 2023
2 checks passed
@Yurlungur Yurlungur deleted the fix_typo_cooling branch December 13, 2023 23:45
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.

3 participants