[Openmp-commits] [flang] [llvm] [openmp] [OpenMP][Flang] Add integer-kind wrappers to omp_lib (PR #213505)
via Openmp-commits
openmp-commits at lists.llvm.org
Mon Aug 24 07:26:37 PDT 2026
shivaramaarao wrote:
> GHCP noticed this, feel free to disregard if it’s not relevant. Could we include the new wrapper implementations in an installed linkable artifact? With `LIBOMP_FORTRAN_MODULES_ONLY=ON`, `omp_lib.mod` is installed but no object or library provides the wrapper symbols, so a default-integer omp_set_num_threads caller fails to link on `_QMomp_libPomp_set_num_threads_i4`. Could we also add a link test for this configuration?
Hi,
Thanks for the input.
could you please let me know how to reproduce the issue. I tried the following
a) built llvm with cmake option -DLIBOMP_FORTRAN_MODULES_ONLY=ON
this built all the module files but not libomp
when I tried the following program
```
program main
use omp_lib
call omp_set_num_threads(4)
end program
```
$flang -fopenmp t.f90
/usr/bin/x86_64-linux-gnu-ld.bfd: cannot find -lomp: No such file or directory
flang-24: error: linker command failed with exit code 1 (use -v to see invocation)
$flang t.f90
flang t.f90
/usr/bin/x86_64-linux-gnu-ld.bfd: /home/shivaram/llvm_commit_fuzzer/lib/clang/24/lib/x86_64-unknown-linux-gnu/libflang_rt.runtime.a(omp_lib_impl.F90.o): in function `_QMomp_libPomp_set_num_threads_i1':
FIRModule:(.text+0x5): undefined reference to `omp_set_num_threads'
are you referring to any of these issues?
https://github.com/llvm/llvm-project/pull/213505
More information about the Openmp-commits
mailing list