Skip to content

Tweak code to avoid NVHPC 21.7 ICE#1385

Merged
alexsavulescu merged 1 commit intomasterfrom
olupton/nvhpc-21.7
Jul 28, 2021
Merged

Tweak code to avoid NVHPC 21.7 ICE#1385
alexsavulescu merged 1 commit intomasterfrom
olupton/nvhpc-21.7

Conversation

@olupton
Copy link
Copy Markdown
Collaborator

@olupton olupton commented Jul 27, 2021

Without this change then NEURON fails to compile with the latest NVIDIA HPC compiler release, 21.7. There is an internal compiler error in znorm.c, see https://forums.developer.nvidia.com/t/nvc-21-7-regression-internal-compiler-error-can-only-coerce-indirect-args/184847 for more information.

This change disables vectorisation optimisations for that file to sidestep the error, as suggested on the NVIDIA forums.

@olupton
Copy link
Copy Markdown
Collaborator Author

olupton commented Jul 27, 2021

Please don't merge yet, I might have an alternative fix.

Replaced a code change with a more targeted CMake change. Should be good to go.

@olupton olupton force-pushed the olupton/nvhpc-21.7 branch from 6da3a0b to 8098b21 Compare July 27, 2021 16:11
@olupton olupton force-pushed the olupton/nvhpc-21.7 branch from 8098b21 to b517297 Compare July 27, 2021 16:12
@olupton olupton requested a review from alexsavulescu July 27, 2021 16:52
Comment thread src/nrniv/CMakeLists.txt
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()
Copy link
Copy Markdown
Member

@pramodk pramodk Jul 27, 2021

Choose a reason for hiding this comment

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

Just for reference, see #901 : here intel compiled was causing deadlock with AVX-512.

Just an idea : as this issue is with the loop vectoriser, if writing loop in different form would avoid compiler internal error then that could be an option. Then we won't need to maintain cmake patches around.

@ferdonline
Copy link
Copy Markdown
Member

Just as a side note, I also found out about
#pragma loop novect
which could be applied only to affected loops. Anyway current fix is good and specific to Pgi.

@alexsavulescu alexsavulescu merged commit b59f592 into master Jul 28, 2021
@alexsavulescu alexsavulescu deleted the olupton/nvhpc-21.7 branch July 28, 2021 07:23
@alexsavulescu alexsavulescu mentioned this pull request Mar 22, 2022
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants