Closed SimeonEhrig closed 3 years ago
@psychocoderHPC Ready for review
From the review in our developer meeting today:
LD_LIBRARY_PATH
problem@SimeonEhrig Do you tested this PR with nvcc as CUDA compiler too? I working on moving alpaka 0.7.0 to cupla and integrated your changes. When try to use cmake with CUDA I get
cmake ../cupla -DCMAKE_INSTALL_PREFIX=$HOME/lib/cupla -Dcupla_BUILD_EXAMPLES=ON -DALPAKA_ACC_GPU_CUDA_ENABLE=ON
...
List of compiler flags added by alpaka
device compiler:
$<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr>;$<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe=--display_error_number>;$<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe=--diag_suppress=esa_on_defaulted_function_ignored>
-- Configuring done
CMake Error in CMakeLists.txt:
No known features for CUDA compiler
""
version .
@SimeonEhrig Do you tested this PR with nvcc as CUDA compiler too? I working on moving alpaka 0.7.0 to cupla and integrated your changes. When try to use cmake with CUDA I get
cmake ../cupla -DCMAKE_INSTALL_PREFIX=$HOME/lib/cupla -Dcupla_BUILD_EXAMPLES=ON -DALPAKA_ACC_GPU_CUDA_ENABLE=ON ... List of compiler flags added by alpaka device compiler: $<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr>;$<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe=--display_error_number>;$<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe=--diag_suppress=esa_on_defaulted_function_ignored> -- Configuring done CMake Error in CMakeLists.txt: No known features for CUDA compiler "" version .
This error happens only with alpaka 0.7.0
so ignore it for now.
@SimeonEhrig Do you tested this PR with nvcc as CUDA compiler too? I working on moving alpaka 0.7.0 to cupla and integrated your changes. When try to use cmake with CUDA I get
cmake ../cupla -DCMAKE_INSTALL_PREFIX=$HOME/lib/cupla -Dcupla_BUILD_EXAMPLES=ON -DALPAKA_ACC_GPU_CUDA_ENABLE=ON ... List of compiler flags added by alpaka device compiler: $<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr>;$<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe=--display_error_number>;$<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe=--diag_suppress=esa_on_defaulted_function_ignored> -- Configuring done CMake Error in CMakeLists.txt: No known features for CUDA compiler "" version .
This error happens only with
alpaka 0.7.0
so ignore it for now.
We can't ignore alpaka 0.7.0
. This PR should become part of cupla 0.4.0
which bases on alpaka 0.7.0
.
@SimeonEhrig Do you tested this PR with nvcc as CUDA compiler too? I working on moving alpaka 0.7.0 to cupla and integrated your changes. When try to use cmake with CUDA I get
cmake ../cupla -DCMAKE_INSTALL_PREFIX=$HOME/lib/cupla -Dcupla_BUILD_EXAMPLES=ON -DALPAKA_ACC_GPU_CUDA_ENABLE=ON ... List of compiler flags added by alpaka device compiler: $<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr>;$<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe=--display_error_number>;$<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe=--diag_suppress=esa_on_defaulted_function_ignored> -- Configuring done CMake Error in CMakeLists.txt: No known features for CUDA compiler "" version .
This error happens only with
alpaka 0.7.0
so ignore it for now.We can't ignore
alpaka 0.7.0
. This PR should become part ofcupla 0.4.0
which bases onalpaka 0.7.0
.
I played a little bit more with the error. If I install alpaka and use -Dcupla_ALPAKA_PROVIDER=external
all works fine.
It could be that the issue will be solved with https://github.com/Kitware/CMake/commit/a3cafa4237930d1ec1bcbdddc8a9c592e32458ca but this is currently in no release available.
I tested the latest master branch from CMake, the issue still exists, therefore something else is wrong :-(
We will not merge this PR directly, if #213 is merged this PR will be merged automatically.
force to build libcupla as archive file -> makes no sense to use shared lib, because libcupla is strongly depend of the build parameter of the project and avoids
LD_LIBRARY_PATH
problem
FWIW, in CMSSW we have been building cupla as a shared library, even though we are not using it in production yet. The rationale is that it would be linked to from many different shared libraries, so using a static archive would duplicate it into each shared library that uses it.
force to build libcupla as archive file -> makes no sense to use shared lib, because libcupla is strongly depend of the build parameter of the project and avoids
LD_LIBRARY_PATH
problemFWIW, in CMSSW we have been building cupla as a shared library, even though we are not using it in production yet. The rationale is that it would be linked to from many different shared libraries, so using a static archive would duplicate it into each shared library that uses it.
Good point. I opened an issue (#218 ) to address your comment.
The CMake is completely modernized. The main targets are
find_package()
add_subdirectory()
more commonAddress issue #158
TODO
add_subdirectory
find_package()