Skip to content

Conversation

rorth
Copy link
Collaborator

@rorth rorth commented May 5, 2025

When running the openmp testsuite on Solaris/amd64, many tests FAIL like

# | OMP: Error #11: Stack overflow detected for OpenMP thread #1

In a Debug build, I also get

# | Assertion failure at kmp_runtime.cpp(203): __kmp_gtid_get_specific() < 0 || __kmp_gtid_get_specific() == i.

Further investigation shows that just setting __kmp_gtid_mode to 3 massively reduces the number of failures.

Tested on amd64-pc-solaris2.11 and x86_64-pc-linux-gnu.

When running the `openmp` testsuite on Solaris/amd64, many tests `FAIL` like

```
# | OMP: Error llvm#11: Stack overflow detected for OpenMP thread #1
```

In a `Debug` build, I also get
```
# | Assertion failure at kmp_runtime.cpp(203): __kmp_gtid_get_specific() < 0 || __kmp_gtid_get_specific() == i.
```

Further investigation shows that just setting `__kmp_gtid_mode` to 3
massively reduced the number of failures.

Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.
@rorth rorth requested review from MaskRay and brad0 May 5, 2025 11:36
@llvmbot llvmbot added the openmp:libomp OpenMP host runtime label May 5, 2025
@rorth
Copy link
Collaborator Author

rorth commented May 5, 2025

@psumbera This is just the first in a series of patches fixing openmp on Solaris, first for amd64 where it already builds, then on sparcv9 where libomp.so doesn't currently link.

@rorth rorth merged commit d839839 into llvm:main May 6, 2025
11 checks passed
GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
When running the `openmp` testsuite on Solaris/amd64, many tests `FAIL`
like

```
# | OMP: Error llvm#11: Stack overflow detected for OpenMP thread llvm#1
```

In a `Debug` build, I also get
```
# | Assertion failure at kmp_runtime.cpp(203): __kmp_gtid_get_specific() < 0 || __kmp_gtid_get_specific() == i.
```

Further investigation shows that just setting `__kmp_gtid_mode` to 3
massively reduces the number of failures.

Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
openmp:libomp OpenMP host runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants