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

Disable profiling as the default option when using MSVC #3066

Merged
merged 10 commits into from
Jun 1, 2020

Conversation

masterleinad
Copy link
Contributor

Partly following up on #2977. In particular, I also need da39c79 to compile with clang-cl.

@masterleinad
Copy link
Contributor Author

Retest this please.

@@ -48,6 +48,8 @@
// registration from Barthelemy Dagenais' (barthelemy@prologique.com)
// easyUnit framework.

#define GTEST_HAS_TR1_TUPLE 0
Copy link
Member

Choose a reason for hiding this comment

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

Did you consider conditionally adding the definition from CMake?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I'm indifferent about that.

Copy link
Member

Choose a reason for hiding this comment

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

You must

  • either clearly comment that you added that line and state why you did so (the commit message does not contain any useful information)
  • or conditionally add a compile definition to the kokkos_gtest target

Copy link
Member

Choose a reason for hiding this comment

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

I believe the right thing to do is the compile definition.
We already add -DGTEST_HAS_PTHREAD=0

# WORKAROUND FOR HIPCC
IF(Kokkos_ENABLE_HIP)
TARGET_COMPILE_DEFINITIONS(kokkos_gtest PUBLIC "-DGTEST_HAS_PTHREAD=0 --amdgpu-target=gfx906")
ELSE()
TARGET_COMPILE_DEFINITIONS(kokkos_gtest PUBLIC "-DGTEST_HAS_PTHREAD=0")
ENDIF()

@dalg24 dalg24 changed the title More MSVC cleanup Disable profiling as the default option when using MSVC May 27, 2020
@@ -13,7 +13,12 @@ KOKKOS_TPL_OPTION(LIBNUMA Off)
KOKKOS_TPL_OPTION(MEMKIND Off)
KOKKOS_TPL_OPTION(CUDA Off)
KOKKOS_TPL_OPTION(LIBRT Off)
KOKKOS_TPL_OPTION(LIBDL On)
MESSAGE(STATUS "COMPILER ID ${CMAKE_CXX_COMPILER_ID}")
IF (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
Copy link
Member

Choose a reason for hiding this comment

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

how about if(WIN32)? That would also catch the "we use nvcc as the compiler on windows" case

@codecov-commenter
Copy link

codecov-commenter commented May 28, 2020

Codecov Report

Merging #3066 into develop will increase coverage by 0.5%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #3066     +/-   ##
=========================================
+ Coverage     82.6%   83.1%   +0.5%     
=========================================
  Files          122     122             
  Lines         8074    8485    +411     
=========================================
+ Hits          6674    7058    +384     
- Misses        1400    1427     +27     
Flag Coverage Δ
#clang 81.5% <ø> (+<0.1%) ⬆️
#gcc 82.9% <ø> (-0.1%) ⬇️
Impacted Files Coverage Δ
containers/src/Kokkos_Vector.hpp 80.0% <0.0%> (-0.9%) ⬇️
core/src/impl/Kokkos_HostThreadTeam.cpp 96.0% <0.0%> (-0.8%) ⬇️
containers/src/Kokkos_StaticCrsGraph.hpp 95.6% <0.0%> (-0.6%) ⬇️
containers/src/Kokkos_Bitset.hpp 92.5% <0.0%> (-0.3%) ⬇️
containers/src/Kokkos_UnorderedMap.hpp 97.5% <0.0%> (-0.1%) ⬇️
core/src/Kokkos_View.hpp 93.4% <0.0%> (-0.1%) ⬇️
containers/src/Kokkos_DynRankView.hpp 92.4% <0.0%> (+0.1%) ⬆️
containers/src/Kokkos_DualView.hpp 77.5% <0.0%> (+0.5%) ⬆️
containers/src/Kokkos_ScatterView.hpp 92.2% <0.0%> (+0.9%) ⬆️
containers/src/Kokkos_OffsetView.hpp 96.4% <0.0%> (+0.9%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6881c64...a9b7cfa. Read the comment docs.

cmake/kokkos_tpls.cmake Outdated Show resolved Hide resolved
@dalg24 dalg24 dismissed crtrott’s stale review June 1, 2020 17:58

Comments have been addressed

@dalg24 dalg24 merged commit 74e1047 into kokkos:develop Jun 1, 2020
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

4 participants