aomp icon indicating copy to clipboard operation
aomp copied to clipboard

[Issue]: build_trunk.sh build_project.sh breaks with "offload" argument

Open jychang48 opened this issue 1 year ago • 6 comments
trafficstars

Problem Description

Error log:

 =================  START build_trunk.sh ===================

COMPONENTS:prereq project

 =================  BUILDING COMPONENT prereq ===================

which: no ccache in (/share/modules/libffi/3.3/bin:/share/modules/python/3.10.14/bin:/share/modules/cmake/3.24.2/bin:/silica/jenkins/.local/bin:/silica/jenkins/bin:/share/opt/slurm/current/bin:/share/opt/thera/bin:/mnt/thera/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
WARNING: Using system cmake /share/modules/cmake/3.24.2/bin/cmake 
         consider building cmake with: ./build_prereq.sh cmake
which: no ccache in (/share/modules/libffi/3.3/bin:/share/modules/python/3.10.14/bin:/share/modules/cmake/3.24.2/bin:/silica/jenkins/.local/bin:/silica/jenkins/bin:/share/opt/slurm/current/bin:/share/opt/thera/bin:/mnt/thera/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
WARNING: Using system cmake /share/modules/cmake/3.24.2/bin/cmake 
         consider building cmake with: ./build_prereq.sh cmake
Thu Apr 25 01:04:48 CDT 2024
 =================  DONE INSTALLING COMPONENT prereq ===================

 =================  BUILDING COMPONENT project ===================

LLVM PROJECTS TO BUILD:clang;lld;llvm;flang

This is a FRESH START. ERASING any previous builds in /tmp/build/llvm-project
Use /mnt/thera/cicd/actions_work/ActionsRunner/ActionsRunner/atd_repos/aomp/trunk/build_project.sh nocmake or /mnt/thera/cicd/actions_work/ActionsRunner/ActionsRunner/atd_repos/aomp/trunk/build_project.sh install to avoid FRESH START.

 -----Running cmake ---- 
cmake /mnt/thera/cicd/actions_work/ActionsRunner/ActionsRunner/atd_repos/llvm-project/llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_LIT_ARGS=-vv --show-unsupported --show-xfail -j 32 -DCMAKE_INSTALL_PREFIX=/share/contrib-modules/Core/amd-trunk-dev/2024-04-25_18.0-0 -DCMAKE_BUILD_TYPE=Release -DCLANG_DEFAULT_LINKER=lld -DLLVM_BUILD_TESTS=ON -DLLVM_INCLUDE_TESTS=ON -DCLANG_INCLUDE_TESTS=ON -DLLVM_TARGETS_TO_BUILD='X86;AMDGPU' -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_RUNTIMES='openmp;compiler-rt;offload' -DCOMPILER_RT_BUILD_ORC=OFF -DCOMPILER_RT_BUILD_XRAY=OFF -DCOMPILER_RT_BUILD_MEMPROF=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=OFF -DCOMPILER_RT_BUILD_SANITIZERS=ON -DLLVM_ENABLE_PROJECTS='clang;lld;llvm;flang' -DLLVM_INSTALL_UTILS=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_STANDARD=17 -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF -DCLANG_DEFAULT_PIE_ON_LINUX=OFF -DLIBOMP_OMPT_SUPPORT=OFF
-- The C compiler identification is GNU 8.5.0
-- The CXX compiler identification is GNU 8.5.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- 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
-- Enabling MLIR as a dependency to flang
CMake Error at CMakeLists.txt:158 (message):
  Runtime "offload" is not a supported runtime.  Supported runtimes are:
  libc;libunwind;libcxxabi;pstl;libcxx;compiler-rt;openmp;llvm-libgcc


-- Configuring incomplete, errors occurred!
See also "/tmp/build/llvm-project/CMakeFiles/CMakeOutput.log".
ERROR cmake failed. Cmake flags
      -DCMAKE_INSTALL_PREFIX=/share/contrib-modules/Core/amd-trunk-dev/2024-04-25_18.0-0 -DCMAKE_BUILD_TYPE=Release -DCLANG_DEFAULT_LINKER=lld -DLLVM_BUILD_TESTS=ON -DLLVM_INCLUDE_TESTS=ON -DCLANG_INCLUDE_TESTS=ON -DLLVM_TARGETS_TO_BUILD='X86;AMDGPU' -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_RUNTIMES='openmp;compiler-rt;offload' -DCOMPILER_RT_BUILD_ORC=OFF -DCOMPILER_RT_BUILD_XRAY=OFF -DCOMPILER_RT_BUILD_MEMPROF=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=OFF -DCOMPILER_RT_BUILD_SANITIZERS=ON  -DLLVM_ENABLE_PROJECTS='clang;lld;llvm;flang' -DLLVM_INSTALL_UTILS=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_STANDARD=17 -DLIBOMPTARGET_BUILD_CUDA_PLUGIN=OFF -DCLANG_DEFAULT_PIE_ON_LINUX=OFF   -DLIBOMP_OMPT_SUPPORT=OFF 
 !!!  build_trunk.sh: BUILD FAILED FOR COMPONENT project !!!

Looks like it started to fail after this commit: https://github.com/ROCm/aomp/commit/ffdb1ff31b15f5c1aaa1ee0dde8d2ab430353e88

Operating System

RHEL 8.2 fedora

CPU

EPYC

GPU

AMD Instinct MI210

ROCm Version

ROCm 6.0.0

ROCm Component

No response

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

jychang48 avatar Apr 25 '24 18:04 jychang48

Your llvm-project may be out of date. What is the hash? Your llvm-project/offload should contain more than a Readme.

estewart08 avatar Apr 25 '24 18:04 estewart08

@estewart08 oh I am using the amd-trunk-dev branch in llvm-project, it only contains the README.md. We've been using this for fortran OpenMP work, is it safe to use the default llvm-project branch?

jychang48 avatar Apr 25 '24 18:04 jychang48

This issue will persist until the next merge from main happens and we catch up to trunk. If you are building ATD using build_trunk.sh, you will need to make the following changes to the script (reverting https://github.com/ROCm/aomp/pull/889) as there is no "offload" runtime in the ATD branch (yet):

--DLLVM_ENABLE_RUNTIMES='openmp;compiler-rt;offload'
+-DLLVM_ENABLE_RUNTIMES='openmp;compiler-rt' \

--DCOMPILER_RT_BUILD_SANITIZERS=ON
+-DCOMPILER_RT_BUILD_SANITIZERS=OFF \

dpalermo avatar Apr 25 '24 19:04 dpalermo

We are currently planning on doing a merge soon so this issue will go away either later this week or early next. amd-trunk-dev is not always in sync with main. We only sync up when we are at a good point to do so.

dpalermo avatar Apr 25 '24 19:04 dpalermo

@dpalermo thanks! I am okay waiting until the merge, this isn't urgent, I'd rather not add temporary patches in our workflow only to eventually remove them

jychang48 avatar Apr 25 '24 19:04 jychang48

I'll let you know when we are back in sync. For local development, our nightly amd-trunk-dev build just applies the above as a hot patch (diff file created just for this purpose) which we will stop applying once we are back in sync with main. We occasionally have situations were something like this is necessary.

dpalermo avatar Apr 25 '24 19:04 dpalermo