Microphysics icon indicating copy to clipboard operation
Microphysics copied to clipboard

what if we pass VODE failure message out of burn through burn_t

Open zingale opened this issue 3 years ago • 4 comments

Currently we don't dump out the burn failure when we are using CUDA, which makes debugging hard on GPUs.

What if we add a std::string to the burn_t that can hold the burn failure message and we can dump that out after a burn if we failed?

zingale avatar Jul 04 '21 13:07 zingale

I don't think we can get std::string to work. However here is one way to do it. Right now we are returning a simple success code of 0 or 1. Instead of treating it like a binary we can use the set of integers to help us. If we assign success == 0, then any non-zero number would correspond to some error code. Since the set of errors that can occur is constrained, we can assign a number to each failure known. Then we can have an enumerator or function on the host which assigns those integers to string error messages, and we can print out the string on the host side after the kernel ends.

maxpkatz avatar Jul 12 '21 15:07 maxpkatz

okay, that's better than what we have now, so I'll look into that

zingale avatar Jul 12 '21 16:07 zingale

Let's make sure to change the name of the field from success if we do that. I don't want anyone to have subtle errors because a user updated Microphysics but not Castro or vice versa, would be better if it doesn't compile so they know they need to update everything.

maxpkatz avatar Jul 12 '21 16:07 maxpkatz

I think with #1234 we will be able to do this

zingale avatar Jun 20 '23 16:06 zingale