Closed eugeneswalker closed 2 years ago
A few things to start.
There have been some fixes into chai for rocm builds, so I would try chai@develop instead, spack install -v chai@develop%clang@amd+rocm~benchmarks amdgpu_target=gfx900
Also, for +rocm builds, I would use the clang packaged with rocm instead of gcc. I have had trouble using different compilers aside from what rocm explicitly provides. Edit your compilers.yaml to include:
and build as spack install -v chai@develop%clang@amd+rocm~benchmarks amdgpu_target=gfx900
If 1 and 2 don't help then look in blt. According to you build log, you get a failure at CMake Error at /opt/spack/opt/spack/linux-ubuntu18.04-x86_64/gcc-7.5.0/blt-develop-bxagzdrqrv673ql54budx3nrjmc5hmkc/cmake/BLTPrivateMacros.cmake:526 . You can go there and add a few message statements as follows:
if (${_depends_on_hip})
# instead of leaving it up to CMake to decide
# Note: we don't do this when depending on just 'hip_runtime'
set(_hip_sources)
set(_non_hip_sources)
message(STATUS "-- YES DEPENDS ON HIP --")
blt_split_source_list_by_language(SOURCES ${arg_SOURCES}
C_LIST _hip_sources
Fortran_LIST _non_hip_sources)
set_source_files_properties( ${_hip_sources}
PROPERTIES
HIP_SOURCE_PROPERTY_FORMAT TRUE)
hip_add_library( ${arg_NAME} ${arg_SOURCES} ${arg_LIBRARY_TYPE} )
else() message(STATUS "-- NOT DEPENDS ON HIP --") message(STATUS "Variables: ${arg_NAME}, ${arg_LIBRARY_TYPE}, ${arg_SOURCES}, ${arg_HEADERS}") add_library( ${arg_NAME} ${arg_LIBRARY_TYPE} ${arg_SOURCES} ${arg_HEADERS} ) endif()
When I do this, the following is printed out (see below). Do you get the same? This can be a reasonable starting point to see why things seem to work for me on the corona machine but not on your machine.
-- -- NOT DEPENDS ON HIP -- -- Variables: chai, STATIC, ArrayManager.cpp, ArrayManager.hpp;ArrayManager.inl;ChaiMacros.hpp;ExecutionSpaces.hpp;ManagedArray.hpp;ManagedArray.inl;managed_ptr.hpp;PointerRecord.hpp;Types.hpp
Building
chai@2.1.1
with+rocm
fails usingspack@develop
(0924b209847e2d7284ff0ff2b234f8afd47e0921 fromFri Dec 11 14:16:28 2020 +0000
)System info:
Ubuntu 18.04
forx86_64
GCC 7.5.0
Concrete spec: chai-gq6pzg.yml.txt Build log: chai-build-out.txt
@dtaller @haampie @corbett5