Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 769c0c4

Browse files
Disable vectorize in eigen in nmodl when gpu is enabled (#286)
* Bugfix issue #285 with nmodl issue #201 solution * Fix appending of acc --oacc Co-authored-by: Ioannis Magkanaris <[email protected]>
1 parent d6ae63f commit 769c0c4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ endif()
107107
# =============================================================================
108108
# Build option specific compiler flags
109109
# =============================================================================
110-
if(${CMAKE_C_COMPILER_ID} STREQUAL "PGI")
110+
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "PGI")
111111
add_definitions(-DSWAP_ENDIAN_DISABLE_ASM)
112+
# PGI with llvm code generation doesn't have necessary assembly intrinsic headers
113+
add_definitions(-DEIGEN_DONT_VECTORIZE=1)
112114
endif()
113115

114116
if(CORENRN_ENABLE_ISPC)
@@ -195,10 +197,9 @@ if(CORENRN_ENABLE_NMODL)
195197
endif()
196198
include_directories(${CORENRN_NMODL_INCLUDE})
197199
# set correct arguments for nmodl for cpu/gpu target
200+
set(CORENRN_NMODL_FLAGS "" CACHE STRING "Extra NMODL options such as passes")
198201
if(CORENRN_ENABLE_GPU)
199-
set(CORENRN_NMODL_FLAGS "acc --oacc" CACHE STRING "Extra NMODL options such as passes")
200-
else()
201-
set(CORENRN_NMODL_FLAGS "" CACHE STRING "Extra NMODL options such as passes")
202+
string(APPEND CORENRN_NMODL_FLAGS " acc --oacc")
202203
endif()
203204
separate_arguments(NMODL_EXTRA_FLAGS_LIST UNIX_COMMAND "${CORENRN_NMODL_FLAGS}")
204205
else()

0 commit comments

Comments
 (0)