-
Notifications
You must be signed in to change notification settings - Fork 10
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
assert error message is not usable #254
Comments
You're getting an out of bounds error on the GPU . In this case it's coming from an FYI this is about as nice an error as you can possibly get out of a GPU... |
Indeed i understood that. It's hard to follow as cuda gdb does not stop on it. I understand this is due ti the face we are on device section. Message could have been prettier if using printf as in the NDEBUG section. And even prettier if MSG was a FORMAT string that could be added to the printf argument and some variables (here index/dim) passed as argument to printf. But it is a large change as i understand from the code. |
My bad, I thought you were confused about the meaning of the message. When We could add As you mentioned short of rewriting all our errors to use |
I tried some patch but it became complicated when trying to use my macro in void checkIndices(...), need to convert printDimsAndIndices to method constructing a char[givensize]... which is not really C++ like... It is not that simple. |
Basically something like this, maybe I could have 2 macros, one with printf compatible msg and the original one... :
|
Yeah we'd definitely want two macros. The original one is used all over the place (all the GEOSX macros flow through LvArray), and while streams can be annoying they're less prone to error and more flexible than printf. |
Well...we don't really do any error checking inside a kernel except for range checking...do we? |
I don't really now, I just modified the macro and followed the called path, but indeed maybe I should not change all. I seem to have something working, I'll see if it's helpfull or not and submit a PR if it's worth it. |
When I run geosx I happen to have assert errors in LVArray that are not easy to understand as strings are not correctly built:
ArraySlice.hpp:294: std::enable_if<<expression>, T &>::type LvArray::ArraySlice<T, NDIM_TPARAM, USD_TPARAM, INDEX_TYPE>::operator[](INDEX_TYPE) const [with int U = 1; T = const int; int NDIM_TPARAM = 1; int USD_TPARAM = -1; INDEX_TYPE = int]: block: [31,0,0], thread: [4,0,0] Assertion `false && "EXP = " "index < 0 || index >= m_dims[ 0 ]" "MSG = " "\"Array Bounds Check Failed: index=\" << index << \" m_dims[0]=\" << m_dims[0]"` failed.
The text was updated successfully, but these errors were encountered: