[HIP] [Build] cmake could not find hip-targets.cmake

Issue #61 resolved
acxz created an issue

When trying to compile magma with the HIP flag I am getting the following error:
Downstream Archlinux issue: https://github.com/rocm-arch/hipmagma/issues/5

==> Starting build()...
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.
  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 11.3.0
-- The CXX compiler identification is Clang 14.0.0
-- The Fortran compiler identification is GNU 11.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc-11 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/hipcc - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran-11 - skipped
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Performing Test COMPILER_SUPPORTS_C99
-- Performing Test COMPILER_SUPPORTS_C99 - Success
-- Detecting Fortran/C Interface
-- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp=libomp  
-- Found OpenMP_Fortran: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Found OpenMP
--     OpenMP_C_FLAGS   -fopenmp
--     OpenMP_CXX_FLAGS -fopenmp=libomp
CMake Error at /opt/rocm/hip/lib/cmake/hip/hip-config.cmake:199 (include):
  include could not find requested file:
    /opt/rocm/hip/lib/cmake/hip/hip-targets.cmake
Call Stack (most recent call first):
  CMakeLists.txt:315 (find_package)

Built using HIP version 5.2.1

OS: Archlinux

Seems like other people using HIP are running into this issue as well:
Upstream HIP issue: https://github.com/ROCm-Developer-Tools/HIP/issues/2787

Comments (2)

  1. Stan Tomov

    Looks like this issue is not directly linked to MAGMA, or maybe is already fixed through cmake and hip developments, as with current master (and about to be released MAGMA v2.7) we do not see these problems. Therefore we are closing this issue. Please reopen if you still observe it.

    Note that currently MAGMA requires cmake of at least 3.18:

    cmake_minimum_required( VERSION 3.18 )

    HIP MAGMA installs without problem with HIP 5.2.22212.

  2. Log in to comment