Skip to content

[OpenMP][Flang] Workaround omp_lib error #123666

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

Merged
merged 1 commit into from
Jan 21, 2025
Merged

Conversation

jplehr
Copy link
Contributor

@jplehr jplehr commented Jan 20, 2025

It appears that omp_lib is not correctly (or maybe not at all?) found from the build directory. This made a few buildbots break after PR#121356 landed.
This is a workaround to unblock the buildbots.

https://lab.llvm.org/staging/#/builders/130/builds/12654
https://lab.llvm.org/buildbot/#/builders/140/builds/15102
https://lab.llvm.org/staging/#/builders/105/builds/13855

It appears that omp_lib is not correctly (or maybe not at all?) found
from the build directory. This made a few buildbots break after
PR#121356 landed.
This is a workaround to unblock the buildbots.
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir flang:openmp labels Jan 20, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 20, 2025

@llvm/pr-subscribers-flang-openmp

@llvm/pr-subscribers-flang-fir-hlfir

Author: Jan Patrick Lehr (jplehr)

Changes

It appears that omp_lib is not correctly (or maybe not at all?) found from the build directory. This made a few buildbots break after PR#121356 landed.
This is a workaround to unblock the buildbots.

https://lab.llvm.org/staging/#/builders/130/builds/12654
https://lab.llvm.org/buildbot/#/builders/140/builds/15102
https://lab.llvm.org/staging/#/builders/105/builds/13855


Full diff: https://github.com/llvm/llvm-project/pull/123666.diff

1 Files Affected:

  • (modified) flang/test/Lower/OpenMP/Todo/allocate-clause-allocator.f90 (+2-1)
diff --git a/flang/test/Lower/OpenMP/Todo/allocate-clause-allocator.f90 b/flang/test/Lower/OpenMP/Todo/allocate-clause-allocator.f90
index d33bdf9f9a8db2..90158a61f75039 100644
--- a/flang/test/Lower/OpenMP/Todo/allocate-clause-allocator.f90
+++ b/flang/test/Lower/OpenMP/Todo/allocate-clause-allocator.f90
@@ -4,7 +4,8 @@
 ! CHECK: not yet implemented: Unhandled clause allocate in omp.parallel
 ! CHECK: LLVM Translation failed for operation: omp.parallel
 program p
-  use omp_lib
+  !use omp_lib
+  integer(8),parameter::omp_default_mem_alloc=1_8
   integer :: x
   integer :: a
   integer :: i

@kparzysz
Copy link
Contributor

This is a problem that comes back over and over again. The module files are not updated correctly when they need to be, but the need for update may be hard for cmake to figure out automatically. Maybe they should be regenerated from scratch every time in target libomp-mod..?

@jplehr
Copy link
Contributor Author

jplehr commented Jan 20, 2025

Hmm... I looked around and it appears that the .mod files are built and an installed version of the compiler can compile the test case. it seems that just the build-tree executable is not able to find the module file.
I think I also did not see any other use of omp_lib in the test case directory.

@jplehr
Copy link
Contributor Author

jplehr commented Jan 20, 2025

I looked around and it appears that the .mod files are built

Scratch that. I just checked again and the .mod file is indeed missing from the build tree.

@dpalermo dpalermo merged commit afced70 into llvm:main Jan 21, 2025
12 checks passed
@tblah
Copy link
Contributor

tblah commented Jan 21, 2025

Thanks for fixing this

jplehr added a commit that referenced this pull request Jan 21, 2025
After the crude workaround in
#123666, @mjklemm suggested
this change instead to address the issue.
Local testing did not show errors, so I'm inclined to land it and see
what the buildbots think.
github-actions bot pushed a commit to arm/arm-toolchain that referenced this pull request Jan 21, 2025
After the crude workaround in
llvm/llvm-project#123666, @mjklemm suggested
this change instead to address the issue.
Local testing did not show errors, so I'm inclined to land it and see
what the buildbots think.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang:openmp flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants