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

Profiling::*Callee static variables declared in header #863

Closed
ibaned opened this issue Jun 5, 2017 · 1 comment
Closed

Profiling::*Callee static variables declared in header #863

ibaned opened this issue Jun 5, 2017 · 1 comment
Assignees
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Milestone

Comments

@ibaned
Copy link
Contributor

ibaned commented Jun 5, 2017

Declaring a static global variable in a header will cause it to be created in every single translation unit that includes that header. A whole "fake initialize" function was added to silence the compiler's warnings about this. Compiler warnings are telling you something important! These variable declarations should be moved into Kokkos_Profiling_Interface.cpp to avoid bloating the object files of everything that uses Kokkos.

@ibaned ibaned added the Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) label Jun 5, 2017
@ibaned ibaned self-assigned this Jun 5, 2017
ibaned added a commit that referenced this issue Jun 5, 2017
@ibaned
Copy link
Contributor Author

ibaned commented Jun 5, 2017

#865 fixes this

@ibaned ibaned modified the milestone: 2017-June-end Jun 14, 2017
@crtrott crtrott closed this as completed Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Projects
None yet
Development

No branches or pull requests

2 participants