-
Notifications
You must be signed in to change notification settings - Fork 11.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Flang] [OpenMP] omp.distribute
unsupported but test passes
#112567
Labels
Comments
github-actions
bot
added
the
flang
Flang issues not falling into any other category
label
Oct 16, 2024
EugeneZelenko
added
flang:ir
crash
Prefer [crash-on-valid] or [crash-on-invalid]
flang:openmp
and removed
flang
Flang issues not falling into any other category
labels
Oct 16, 2024
@llvm/issue-subscribers-flang-ir Author: Luigi Crisci (Luigi-Crisci)
When compiling a simple fortran program, flang fails saying that `omp.distribute` is unsupported
```fortran
program vector_add
use omp_lib
implicit none
integer, dimension(100) :: a, b, c
integer :: i
!$omp target map(to: a, b) map(from: c)
!$omp teams
!$omp distribute parallel do simd
do i = 1, 100
c(i) = a(i) + b(i)
end do
!$omp end distribute parallel do simd
end program vector_add
However, running the ./build/bin/llvm-lit -v flang/test/Lower/OpenMP/distribute-parallel-do-simd.f90
-- Testing: 1 tests, 1 workers --
PASS: Flang :: Lower/OpenMP/distribute-parallel-do-simd.f90 (1 of 1)
Exit Code: 0
Command Output (stderr):
--
RUN: at line 4: bbc -fopenmp -emit-hlfir /software-local/sources/llvm-project/flang/test/Lower/OpenMP/distribute-parallel-do-simd.f90 -o - | /software-local/sources/llvm-project/build/bin/FileCheck /software-local/sources/llvm-project/flang/test/Lower/OpenMP/distribute-parallel-do-simd.f90
+ bbc -fopenmp -emit-hlfir /software-local/sources/llvm-project/flang/test/Lower/OpenMP/distribute-parallel-do-simd.f90 -o -
+ /software-local/sources/llvm-project/build/bin/FileCheck /software-local/sources/llvm-project/flang/test/Lower/OpenMP/distribute-parallel-do-simd.f90
RUN: at line 5: /software-local/sources/llvm-project/build/bin/flang -fc1 -fopenmp -emit-hlfir /software-local/sources/llvm-project/flang/test/Lower/OpenMP/distribute-parallel-do-simd.f90 -o - | /software-local/sources/llvm-project/build/bin/FileCheck /software-local/sources/llvm-project/flang/test/Lower/OpenMP/distribute-parallel-do-simd.f90
+ /software-local/sources/llvm-project/build/bin/flang -fc1 -fopenmp -emit-hlfir /software-local/sources/llvm-project/flang/test/Lower/OpenMP/distribute-parallel-do-simd.f90 -o -
+ /software-local/sources/llvm-project/build/bin/FileCheck /software-local/sources/llvm-project/flang/test/Lower/OpenMP/distribute-parallel-do-simd.f90
--
********************
Testing Time: 0.07s
Total Discovered Tests: 1
Passed: 1 (100.00%)
LLVM commit: 7033408 CC=gcc
CXX=g++
BUILD_TYPE=Release
TARGETS_TO_BUILD="AMDGPU;X86"
NUMTHREADS=$(nproc)
LLVM_PATH=$1
INSTALL_DIR=$2
CMAKE_OPTIONS="-DLLVM_ENABLE_PROJECTS=clang;flang;compiler-rt;lld \
-DLLVM_ENABLE_RUNTIMES=openmp;offload \
-DOPENMP_ENABLE_LIBOMPTARGET=ON \
-DLIBOMPTARGET_DEVICE_ARCHITECTURES=gfx908 \
-DLLVM_ENABLE_TESTS=ON \
-DFLANG_INCLUDE_TESTS=ON \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_CXX_COMPILER=$CXX \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_TARGETS_TO_BUILD=$TARGETS_TO_BUILD \
-DCLANG_ANALYZER_ENABLE_Z3_SOLVER=0 \
-DLLVM_INCLUDE_BENCHMARKS=0 \
-DLLVM_ENABLE_OCAMLDOC=OFF \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=OFF \
-DLLVM_ENABLE_DUMP=OFF \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR"
cmake -S $LLVM_PATH/llvm -B $LLVM_PATH/build -G Ninja $CMAKE_OPTIONS Is something breaking during the installation process? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When compiling a simple fortran program, flang fails saying that
omp.distribute
is unsupportedHowever, running the
distribute-parallel-do-simd.f90
test gives no errorLLVM commit: 7033408
LLVM build options:
Is something breaking during the installation process?
The text was updated successfully, but these errors were encountered: