From 0e2475593ef020606ca95b8a04f84ea0d771ee87 Mon Sep 17 00:00:00 2001 From: Olli Lupton Date: Fri, 26 Aug 2022 14:59:27 +0200 Subject: [PATCH] keep some optimisation of partial_piv_lu.cpp in debug builds e --- coreneuron/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/coreneuron/CMakeLists.txt b/coreneuron/CMakeLists.txt index c4143b48c..97d12e613 100644 --- a/coreneuron/CMakeLists.txt +++ b/coreneuron/CMakeLists.txt @@ -120,6 +120,14 @@ if(CORENRN_ENABLE_GPU) # OpenACC/OpenMP annotations. if(CORENRN_ENABLE_NMODL AND EXISTS ${CORENRN_MOD2CPP_INCLUDE}/partial_piv_lu/partial_piv_lu.cpp) list(APPEND CORENEURON_CODE_FILES ${CORENRN_MOD2CPP_INCLUDE}/partial_piv_lu/partial_piv_lu.cpp) + if(CORENRN_ENABLE_GPU + AND CORENRN_HAVE_NVHPC_COMPILER + AND CMAKE_BUILD_TYPE STREQUAL "Debug") + # In this case OpenAccHelper.cmake passes -gpu=debug, which makes these Eigen functions + # extremely slow. Downgrade that to -gpu=lineinfo for this file. + set_source_files_properties(${CORENRN_MOD2CPP_INCLUDE}/partial_piv_lu/partial_piv_lu.cpp + PROPERTIES COMPILE_FLAGS "-gpu=lineinfo,nodebug -O1") + endif() endif() endif()