This was the case even though BOUT++ and PETSc compiled fine without issues. BOUT++ did show a Found BLAS: 1 during compilation as well.
It turns out Cray systems have BLAS implicitly linked which makes CMake need a different than usual routine for finding BLAS. This is from FindBLAS.cmake:
# On compilers that implicitly link BLAS (i.e. CrayPrgEnv) we used a
# placeholder for empty BLAS_LIBRARIES to get through our logic above.
if(BLAS_LIBRARIES STREQUAL "BLAS_LIBRARIES-PLACEHOLDER-FOR-EMPTY-LIBRARIES")
set(BLAS_LIBRARIES "")
endif()
It turns out that you need to tell CMake explicitly what compiler you use and this resolves the issue. I think from this it is able to figure out it is in a Cray environment and activate the above workaround (this is a guess). You can achieve this by ensuring you use the CMake flag -DCMAKE_CXX_COMPILER=CC in Hermes-3 (and presumably in other applications too) just like in the BOUT++ CMake command.
Added a hint to the readme based on an issue I had in compiling Hermes-3 where CMake gave me the following message:
This was the case even though BOUT++ and PETSc compiled fine without issues. BOUT++ did show a
Found BLAS: 1
during compilation as well.It turns out Cray systems have BLAS implicitly linked which makes CMake need a different than usual routine for finding BLAS. This is from FindBLAS.cmake:
This is further explained here: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/2312
It turns out that you need to tell CMake explicitly what compiler you use and this resolves the issue. I think from this it is able to figure out it is in a Cray environment and activate the above workaround (this is a guess). You can achieve this by ensuring you use the CMake flag
-DCMAKE_CXX_COMPILER=CC
in Hermes-3 (and presumably in other applications too) just like in the BOUT++ CMake command.