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

CMakeLists update for issue 148 #149

Merged
merged 7 commits into from
Mar 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ TRIBITS_ADD_OPTION_AND_DEFINE(
LIST(APPEND DEVICE_LIST "<Cuda,CudaUVMSpace>")
ENDIF()

IF( Trilinos_ENABLE_COMPLEX_DOUBLE AND ((NOT DEFINED CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS) OR (NOT CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS)) )
Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine, though it may be possible to turn OFF KokkosKernels_INST_COMPLEX_DOUBLE even if Trilinos_ENABLE_COMPLEX_DOUBLE is ON.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mhoemmen Thanks for the catch! I'm guessing most users use Trilinos_ENABLE_COMPLEX_DOUBLE so I think I should leave that and add a check for KokkosKernels_INST_COMPLEX_DOUBLE also, does this sound correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

@ndellingwood What about stand-alone builds? Does Trilinos_ENABLE_COMPLEX_DOUBLE even exist in that case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mhoemmen I'm not sure that kokkos-kernels has standalone CMake support, I think for standalone builds the Makefile system should be used but I may be wrong.

MESSAGE( WARNING "The CMake option CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS is either undefined or OFF. Please set CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=ON when building with CUDA and complex double enabled.")
ENDIF()

ENDIF()

IF(${Kokkos_ENABLE_Serial} OR ${Kokkos_ENABLE_Pthread} OR ${Kokkos_ENABLE_OpenMP})
Expand Down
17 changes: 16 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Building Kokkoskernels
example/buildlib/compileKokkosKernels.sh for your environment
and run it to generate the required makefiles.
- KOKKOS_DEVICES can be as below. You can remove any backend
that you don't need. If cuda backend is used, CXX compiler should point to ${KOKKOS_PATH}/config/nvcc_wrapper.
that you don't need. If cuda backend is used, CXX compiler should point to ${KOKKOS_PATH}/bin/nvcc_wrapper.
If you enable Cuda, a host space, either OpenMP or Serial should be enabled.
KOKKOS_DEVICES=OpenMP,Serial,Cuda

Expand All @@ -82,9 +82,24 @@ Building Kokkoskernels

For the architecture flags, run below command.
%: scripts/generate_makefile.bash --help

2. Run "make build-test" to compile the tests.


Comments for building Trilinos with Kokkoskernels
----------------------
- For Trilinos builds with the Cuda backend and complex double enabled with ETI,
the cmake option below may need to be set to avoid Error 127 errors:
CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=ON

If the option above is not set, a warning will be issued during configuration:

"The CMake option CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS is either
undefined or OFF. Please set
CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=ON when building with CUDA and
complex double enabled."


Using Kokkoskernels Test Drivers
--------------------------

Expand Down