Skip to content

Commit

Permalink
Pass -Mnovect to avoid nvhpc/21.7 ICE for znorm.c (#1385)
Browse files Browse the repository at this point in the history
  • Loading branch information
olupton authored Jul 28, 2021
1 parent 669a504 commit b59f592
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/nrniv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,14 @@ set_source_files_properties(${NRN_NRNOC_SRC_DIR}/nrnversion.cpp PROPERTIES OBJEC
set_source_files_properties(${NRN_OC_SRC_DIR}/hocusr.cpp PROPERTIES OBJECT_DEPENDS
${PROJECT_BINARY_DIR}/src/oc/hocusr.h)

# NVHPC/21.7 cannot compile znorm.c with -O2 or above. See also:
# https://forums.developer.nvidia.com/t/nvc-21-7-regression-internal-compiler-error-can-only-coerce-indirect-args/184847
if(("${CMAKE_C_COMPILER_ID}" STREQUAL "PGI" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "NVHPC")
AND "${CMAKE_C_COMPILER_VERSION}" VERSION_GREATER_EQUAL 21.7)
set_source_files_properties(${PROJECT_SOURCE_DIR}/src/mesch/znorm.c PROPERTIES COMPILE_OPTIONS
-Mnovect)
endif()

if(NRN_ENABLE_MPI_DYNAMIC)
set_source_files_properties(${PROJECT_SOURCE_DIR}/src/nrnmpi/nrnmpi_dynam.cpp PROPERTIES
OBJECT_DEPENDS ${NRNMPI_DYNAMIC_INCLUDE_FILE})
Expand Down

0 comments on commit b59f592

Please sign in to comment.