<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/133075>133075</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Compilation failure for OpenMP on older family
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
KaruroChori
</td>
</tr>
</table>
<pre>
I tried compiling with `clang++-21 test.cpp -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target=nvptx64 -march=sm_60`
```c++
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
#pragma omp target parallel
{
printf("Hello\n");
}
return 0;
}
```
on an older card which is *sm_60*.
The compiler failed with this message:
```
fatal error: error in backend: PTX does not support "atomic" for orderings different than"NotAtomic" or "Monotonic" for sm_60 or older, but order is: "seq_cst".
clang++-21: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Debian clang version 21.0.0 (++20250324101504+0adc672ed4a2-1~exp1~20250324221624.2732)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-21/bin
clang++-21: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++-21: note: diagnostic msg: /tmp/test-sm_60-c20c2d.cpp
clang++-21: note: diagnostic msg: /tmp/test-c40dad.cpp
clang++-21: note: diagnostic msg: /tmp/test-sm_60-c20c2d.sh
```
I personally don't think it is a "real" bug, just that some features are not available on older cards, but since it asked for it, here I posted it.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykVU9v27gT_TT0ZSCDHsmyffBBieM2-KVN0PqH7a2gyJHEliK1JOWml372BSUnaXb3sohgCDRn-Dh_3huJEHRrifZsfcXWh4UYY-f8_n_Cj95dd87rRe3Uz_0tRK9JgXT9oI22LfzQsQNWcmmEbRleMbzKcAWRQlzKYYCscQPZ_mWR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