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

Add file and line to error message #3985

Merged
merged 1 commit into from
May 5, 2021
Merged

Add file and line to error message #3985

merged 1 commit into from
May 5, 2021

Conversation

Rombur
Copy link
Member

@Rombur Rombur commented Apr 29, 2021

Add file and line to error message fromKOKKOS_EXPECTS, KOKKOS_ENSURES, andKOKKOS_ASSERT. This makes it a lot simpler to find where the error has been triggered from.

core/src/impl/Kokkos_Error.hpp Outdated Show resolved Hide resolved
core/src/impl/Kokkos_Error.hpp Outdated Show resolved Hide resolved
nliber
nliber previously requested changes Apr 30, 2021
@@ -47,6 +47,7 @@

#include <string>
#include <iosfwd>
#include <cstdio>
Copy link
Contributor

Choose a reason for hiding this comment

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

What do we need stdio for?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, I have remove it.

"Kokkos contract violation:\n " \
" Expected precondition `" #__VA_ARGS__ "` evaluated false."); \
} \
#define KOKKOS_IMPL_STRINGIFY(x) #x
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the right header for KOKKOS_IMPL_STRINGIFY and KOKKOS_IMPL_TOSTRING?

(It might be, because this is the only place it is used, and we can always move it later if we need it again. I'm just asking.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I had the same dilemma when I wrote this. I've put that here since it's the only place it is used. If it's useful somewhere else later on we can always move it.

Copy link
Contributor

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@dalg24 dalg24 dismissed nliber’s stale review May 5, 2021 22:44

Changes requested have been addressed

@dalg24 dalg24 merged commit a9a73fd into kokkos:develop May 5, 2021
@Rombur Rombur deleted the error branch May 13, 2021 19:28
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.

None yet

5 participants