Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

OpenMP and TBB tests should run serially #1168

Closed
alliepiper opened this issue May 26, 2020 · 1 comment · Fixed by #1184
Closed

OpenMP and TBB tests should run serially #1168

alliepiper opened this issue May 26, 2020 · 1 comment · Fixed by #1184
Assignees
Labels
only: cmake CMake changes only. Doesn't need internal NVIDIA CI.

Comments

@alliepiper
Copy link
Collaborator

alliepiper commented May 26, 2020

Issue

Running the OpenMP (GCC 7.5) tests in parallel using the ctest -jXX option is much, much slower than running them one at a time. This OMP thread scheduling implementation doesn't seem to take other processes into account.

CTest Parallelism (cpp.omp.cpp14) CPU Time (s) Walltime (mm:ss)
-j1 597 1:16
-j2 33574 46:42

Fix incoming

I've set https://cmake.org/cmake/help/v3.10/prop_test/RUN_SERIAL.html
on the OMP tests in my changes for #1159.

Other backends

TBB

TBB has some scaling issues, but doesn't fall off a cliff at -j2. On a 6-core x 2-SMT CPU, TBB scales well for a small number of processes:

CTest Parallelism (cpp.omp.cpp14) Walltime (s)
-j1 81
-j2 55
-j4 45
-j6 50
-j8 60
-j12 68

Since CMake doesn't offer parallelism properties with finer control than RUN_SERIAL and all of the parallel configs are faster than -j1, we should just leave this as-is. These tests will continue to run at the requested parallelism.

After discussion with @griwes and @brycelelbach, TBB tests should also be marked RUN_SERIAL. The increased runtime is worth ensuring that the individual test processes will run at full threaded parallelism.

CUDA

CUDA scales very favorably with more CPUs, at least in the range I can test. On the same CPU as above while running tests on both GV100 and GP100:

CTest Parallelism (cpp.cuda.cpp14) Walltime (s)
-j1 (a "Very Long Time")
-j6 208
-j8 199
-j10 197
-j12 176

These tests will continue to run at the requested parallelism.

@alliepiper alliepiper self-assigned this May 26, 2020
alliepiper added a commit to alliepiper/thrust that referenced this issue May 29, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
alliepiper added a commit to alliepiper/thrust that referenced this issue May 29, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue May 30, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue May 30, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 1, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
@brycelelbach
Copy link
Collaborator

We should probably invoke ctest in serial for TBB too.

@alliepiper alliepiper changed the title OpenMP tests should run serially OpenMP and TBB tests should run serially Jun 3, 2020
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 8, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 8, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 8, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 9, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 9, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
@alliepiper alliepiper added the only: cmake CMake changes only. Doesn't need internal NVIDIA CI. label Jun 10, 2020
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 10, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 11, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167: Disable arches 53, 62, 72 by default.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP and TBB tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING
  - THRUST_ENABLE_EXAMPLE_FILECHECK

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Removed common_variables.cmake and simplified FileCheck hooks.
  - Set THRUST_ENABLE_EXAMPLE_FILECHECK to turn on FileCheck validation
  - Automatically detect and set THRUST_FILECHECK_EXECUTABLE if installed
    and filechecking is enabled.
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit to alliepiper/thrust that referenced this issue Jun 26, 2020
Fixes NVIDIA#1159.

Also fixes or works around these issues:
- WAR NVIDIA#1167:
  - Disable arches 53, 62, 72 for RDC-required tests, print warning
  - Error when ENABLE_RDC for tests/examples is set with a no-RDC arch.
- Fixes NVIDIA#1168: Set RUN_SERIAL on OpenMP and TBB tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR NVIDIA#1174: remove warning promotion from tbb.cuda targets.
- WAR NVIDIA#976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
alliepiper added a commit that referenced this issue Jun 26, 2020
Fixes #1159.

Also fixes or works around these issues:
- WAR #1167:
  - Disable arches 53, 62, 72 for RDC-required tests, print warning
  - Error when ENABLE_RDC for tests/examples is set with a no-RDC arch.
- Fixes #1168: Set RUN_SERIAL on OpenMP and TBB tests.
- WAR ccache/ccache#598:
  nvcc flags `s/-Werror all-warnings/-Xcudafe --promote_warnings/g`
- WAR #1174: remove warning promotion from tbb.cuda targets.
- WAR #976: Add options to enable/disable tests, examples, header_tests:
  - THRUST_ENABLE_TESTING
  - THRUST_ENABLE_EXAMPLES
  - THRUST_ENABLE_HEADER_TESTING

Summary:
- Bump CMake requirement to 3.15
  - Needed for CUDA_COMPILER_ID generator expression.
  - Removed workarounds for older CMake versions.
- Removed warning flag specific to for C++98.
- Dialects are now configured through target properties. Add new
  THRUST_CPP_DIALECT option for single config mode, and remove logic
  that modified CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD.
- Move testing related CMake code to `testing/CMakeLists.txt`
- Move example related CMake code to `examples/CMakeLists.txt`
- Move header testing related CMake code to
    `cmake/ThrustHeaderTesting.cmake`
- Move CUDA configuration logic to `cmake/ThrustCUDAConfig.cmake`.
- Explicitly `include(cmake/*.cmake)` files rather than searching
    CMAKE_MODULE_PATH -- we only want to use the ones in the repo.
- Added ThrustMultiConfig.cmake
  - Handle MultiConfig (and single config) logic.
- Added ThrustBuildTargetList.cmake
  - Builds the THRUST_TARGETS list, which contains one interface target
      for each enabled host/device/dialect configuration.
- Added ThrustBuildCompilerTargets.cmake
  - Move warning flag, etc setup into it, bind compile interfaces to
      targets instead of global variables.
- Renamed common_variables.cmake to ThrustCommonVariables.cmake
- Removed THRUST_TREAT_FILE_AS_CXX
  - This worked by setting a cmake SOURCE_FILE property, which no longer
    works since multiconfig may build the same source file with both CXX
    and CUDA.
  - Instead, the `.cu` files are wrapped in a `.cpp` file that does
    nothing but include the `.cu` file. The `.cpp` files are then added
    to the CXX targets as sources.
  - See `cmake/ThrustUtilities.cmake` for implementation.
- Fix bug in thrust-config.cmake where an internal var was not cached as
  expected.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
only: cmake CMake changes only. Doesn't need internal NVIDIA CI.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants