Hello,
I am trying to build OpenBLAS with NVHPC on anIntel Sapphire Rapids system, and I am running into issues in cc.cmake.
With this setup, the following section is triggered:
|
if (${CORE} STREQUAL SAPPHIRERAPIDS) |
|
if (NOT DYNAMIC_ARCH) |
|
if (NOT NO_AVX512) |
|
if (${GCC_VERSION} VERSION_GREATER 11.0 OR ${GCC_VERSION} VERSION_EQUAL 11.0) |
|
set (CCOMMON_OPT "${CCOMMON_OPT} -march=sapphirerapids") |
|
else () |
|
set (CCOMMON_OPT "${CCOMMON_OPT} -march=skylake-avx512") |
|
endif() |
|
endif () |
|
endif () |
|
endif () |
However, when building with NVHPC, $GCC_VERSION is not defined. As a result CMake fails with an error like this :
CMake Error at cmake/cc.cmake:191 (if):
if given arguments:
"VERSION_GREATER" "11.0" "OR" "VERSION_EQUAL" "11.0"
Unknown arguments specified
It seems that this condition assumes a GNU compiler, and should probably only be evaluated when that is the case.
I believe similar issues may occur for other microarchitectures, such as:
- cooperlake :
|
if (${GCC_VERSION} VERSION_GREATER 10.1 OR ${GCC_VERSION} VERSION_EQUAL 10.1) |
- zen :
|
if (${GCC_VERSION} VERSION_GREATER 13.0 OR ${GCC_VERSION} VERSION_EQUAL 13.0) |
- a64fx when disabling SVE :
|
elseif (${GCC_VERSION} VERSION_GREATER 11.0 OR ${GCC_VERSION} VERSION_EQUAL 11.0) |
etc.
Whike looking further into the file, I also noticed that $GCC_VERSION is set even when the compiler is Intel LLVM :
This might contribute to inconsistent behavior accross compiler, and most likely implies missuse of this variable (testing against this value) somewhere else in the CMake files.
Best.
Hello,
I am trying to build OpenBLAS with NVHPC on anIntel Sapphire Rapids system, and I am running into issues in
cc.cmake.With this setup, the following section is triggered:
OpenBLAS/cmake/cc.cmake
Lines 188 to 198 in 02dc625
However, when building with NVHPC, $GCC_VERSION is not defined. As a result CMake fails with an error like this :
It seems that this condition assumes a GNU compiler, and should probably only be evaluated when that is the case.
I believe similar issues may occur for other microarchitectures, such as:
OpenBLAS/cmake/cc.cmake
Line 179 in 02dc625
OpenBLAS/cmake/cc.cmake
Line 204 in 02dc625
OpenBLAS/cmake/cc.cmake
Line 218 in 02dc625
etc.
Whike looking further into the file, I also noticed that
$GCC_VERSIONis set even when the compiler is Intel LLVM :OpenBLAS/cmake/cc.cmake
Line 36 in 02dc625
This might contribute to inconsistent behavior accross compiler, and most likely implies missuse of this variable (testing against this value) somewhere else in the CMake files.
Best.