cholla-hydro / cholla

A GPU-based hydro code
https://github.com/cholla-hydro/cholla/wiki
MIT License
66 stars 32 forks source link

Issues Found by Compute Sanitizer #197

Closed bcaddy closed 10 months ago

bcaddy commented 2 years ago

I ran the Compute Sanitizer on all the various builds and discovered some issues. Most of them appear to be uninitialized memory accesses in the HLLC solver but initializing all the arrays in the integrator with memset or a kernel didn't resolve the errors. Below is a table of which builds failed which checks and what initial conditions were used. Note that I pretty much just used Sod for all of them so a more appropriate set of initial conditions could show more errors.

Build Failed Checks Initial Conditions
Hydro initcheck Sod
Cooling initcheck Sod
Cosmology initcheck, memcheck Sod
Disk failed to run Disk
Gravity initcheck Sod
Particles initcheck, memcheck Sod

See PR #196 for the script to run the compute sanitizer.

bcaddy commented 2 years ago

I looked into this again as part of my MHD debugging. I don't know what I did wrong the first time but initializing the memory did fix the initcheck errors in my MHD branch. Presumably it will with the other builds/branches and I'll include initialization as part of my next MHD PR.

The non-initcheck issues remain.