hpsim/OGL

installation errors related to does not support platform specification, but platform

klausbu opened this issue · 2 comments

I got the following error related to the AMDDeviceLibs_DIR when using:

cmake -DGINKGO_BUILD_HIP=ON -DGINKGO_BUILD_OMP=ON

CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


-- The C compiler identification is GNU 11.4.1
-- The CXX compiler identification is GNU 11.4.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test OGL_C_COVERAGE_SUPPORTED
-- Performing Test OGL_C_COVERAGE_SUPPORTED - Success
-- Performing Test OGL_C_TSAN_SUPPORTED
-- Performing Test OGL_C_TSAN_SUPPORTED - Failed
-- Performing Test OGL_C_ASAN_SUPPORTED
-- Performing Test OGL_C_ASAN_SUPPORTED - Failed
-- Performing Test OGL_C_LSAN_SUPPORTED
-- Performing Test OGL_C_LSAN_SUPPORTED - Failed
-- Performing Test OGL_C_UBSAN_SUPPORTED
-- Performing Test OGL_C_UBSAN_SUPPORTED - Failed
-- Performing Test OGL_CXX_COVERAGE_SUPPORTED
-- Performing Test OGL_CXX_COVERAGE_SUPPORTED - Success
-- Performing Test OGL_CXX_TSAN_SUPPORTED
-- Performing Test OGL_CXX_TSAN_SUPPORTED - Failed
-- Performing Test OGL_CXX_ASAN_SUPPORTED
-- Performing Test OGL_CXX_ASAN_SUPPORTED - Failed
-- Performing Test OGL_CXX_LSAN_SUPPORTED
-- Performing Test OGL_CXX_LSAN_SUPPORTED - Failed
-- Performing Test OGL_CXX_UBSAN_SUPPORTED
-- Performing Test OGL_CXX_UBSAN_SUPPORTED - Failed
-- Performing Test OGL_HIP_COVERAGE_SUPPORTED
-- Performing Test OGL_HIP_COVERAGE_SUPPORTED - Success
-- Performing Test OGL_HIP_TSAN_SUPPORTED
-- Performing Test OGL_HIP_TSAN_SUPPORTED - Failed
-- Performing Test OGL_HIP_ASAN_SUPPORTED
-- Performing Test OGL_HIP_ASAN_SUPPORTED - Failed
-- Performing Test OGL_HIP_LSAN_SUPPORTED
-- Performing Test OGL_HIP_LSAN_SUPPORTED - Failed
-- Performing Test OGL_HIP_UBSAN_SUPPORTED
-- Performing Test OGL_HIP_UBSAN_SUPPORTED - Failed
-- Looking for C++ include cxxabi.h
-- Looking for C++ include cxxabi.h - found
-- The C compiler identification is GNU 11.4.1
-- The CXX compiler identification is GNU 11.4.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/klaus/OpenFOAM/ThirdParty-v2206/OGL-dev/third_party/ginkgo/download
[ 11%] Creating directories for 'ginkgo_external'
[ 22%] Performing download step (git clone) for 'ginkgo_external'
Klone nach 'src'...
Branch 'sparse-communicator' folgt nun 'origin/sparse-communicator'.
Zu neuem Branch 'sparse-communicator' gewechselt
[ 33%] Performing update step for 'ginkgo_external'
HEAD ist jetzt bei 672caab3d remove overloaded to avoid c++17 dependency
[ 44%] No patch step for 'ginkgo_external'
[ 55%] Performing configure step for 'ginkgo_external'
-- The C compiler identification is GNU 11.4.1
-- The CXX compiler identification is GNU 11.4.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found hipconfig: /opt/rocm/hip/bin/hipconfig
-- Could NOT find PAPI (missing: PAPI_LIBRARY PAPI_INCLUDE_DIR sde) (Required is at least version "7.0.1.0")
-- HIP platform set to amd
-- Found HIP: /opt/rocm/hip (found version "5.7.0-0") 
CMake Error at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package):
  By not providing "FindAMDDeviceLibs.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "AMDDeviceLibs", but CMake did not find one.

  Could not find a package configuration file provided by "AMDDeviceLibs"
  with any of the following names:

    AMDDeviceLibsConfig.cmake
    amddevicelibs-config.cmake

  Add the installation prefix of "AMDDeviceLibs" to CMAKE_PREFIX_PATH or set
  "AMDDeviceLibs_DIR" to a directory containing one of the above files.  If
  "AMDDeviceLibs" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  /opt/rocm-5.7.0/lib/cmake/hip/hip-config-amd.cmake:67 (find_dependency)
  /opt/rocm/hip/lib/cmake/hip/hip-config.cmake:150 (include)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package)
  /opt/rocm/hipblas/lib/cmake/hipblas-config.cmake:90 (find_dependency)
  cmake/hip.cmake:167 (find_package)
  CMakeLists.txt:104 (include)


-- Configuring incomplete, errors occurred!
See also "/home/klaus/OpenFOAM/ThirdParty-v2206/OGL-dev/third_party/ginkgo/build/CMakeFiles/CMakeOutput.log".
gmake[2]: *** [CMakeFiles/ginkgo_external.dir/build.make:93: ginkgo_external-prefix/src/ginkgo_external-stamp/ginkgo_external-configure] Fehler 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ginkgo_external.dir/all] Fehler 2
gmake: *** [Makefile:91: all] Fehler 2
CMake Error at cmake/package_helpers.cmake:46 (message):
  Build step for ginkgo_external/download failed: 2
Call Stack (most recent call first):
  third_party/ginkgo/CMakeLists.txt:2 (ginkgo_load_git_package)


-- Configuring incomplete, errors occurred!
See also "/home/klaus/OpenFOAM/ThirdParty-v2206/OGL-dev/CMakeFiles/CMakeOutput.log".
See also "/home/klaus/OpenFOAM/ThirdParty-v2206/OGL-dev/CMakeFiles/CMakeError.log".

I tried to set the AMDDeviceLibs_DIR to /opt/rocm/lib/cmake/AMDDeviceLibs using:

cmake -DGINKGO_BUILD_HIP=ON -DGINKGO_BUILD_OMP=ON -AMDDeviceLibs_DIR=/opt/rocm/lib/cmake/AMDDeviceLibs which seemed to work but results in another error:

CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error: Error: generator platform: MDDeviceLibs_DIR=/opt/rocm/lib/cmake/AMDDeviceLibs
Does not match the platform used previously: 
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
[klaus@localhost OGL-dev]$ cmake -DGINKGO_BUILD_HIP=ON -DGINKGO_BUILD_OMP=ON -AMDDeviceLibs_DIR=/opt/rocm/lib/cmake/AMDDeviceLibs
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error at CMakeLists.txt:3 (project):
  Generator

    Unix Makefiles

  does not support platform specification, but platform

    MDDeviceLibs_DIR=/opt/rocm/lib/cmake/AMDDeviceLibs

  was specified.


CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/home/klaus/OpenFOAM/ThirdParty-v2206/OGL-dev/CMakeFiles/CMakeOutput.log".
See also "/home/klaus/OpenFOAM/ThirdParty-v2206/OGL-dev/CMakeFiles/CMakeError.log".

Can this be fixed? I am using ROCM 5.7.1 for RHEL and a gfx1031

Hello @klausbu and thanks for reporting this. Your report somehow went unrecognized and I am sorry that it took me so long to come back to you. This seems to be an issue on the Ginkgo side, also we experienced issues with gfx10 series GPUs, see ginkgo-project/ginkgo#1429. I'll investigate this issue and try to come back to you.

@klausbu Here is some more information, first maybe it was a typo in the issue but make sure to use -DAMDDeviceLibs_DIR=/opt/rocm/lib/cmake/AMDDeviceLibs instead of -AMDD... additionally it might be better to use /opt/rocm/ for the CMAKE_PREFIX_PATH to avoid potentially having to add other libraries. And finally, on the Ginkgo side the HIP support is currently improved, thus once ginkgo-project/ginkgo#1334 is merged things might be more stable.