<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/openmp/runtime/test/ompt/misc/interoperability.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[OpenMP][Test][NFC] output tool data as hex to improve readibility (#152757)</title>
<updated>2025-08-18T08:42:33+00:00</updated>
<author>
<name>Joachim</name>
<email>jenke@itc.rwth-aachen.de</email>
</author>
<published>2025-08-18T08:42:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=98dd1888bf0eaaece86c9d3ae4beeb089e7a2ea7'/>
<id>98dd1888bf0eaaece86c9d3ae4beeb089e7a2ea7</id>
<content type='text'>
Using hex format allows to better interpret IDs: 
the first digits represent the thread number, the last digits represent
the ID within a thread

The main change is in callback.h: PRIu64 -&gt; PRIx64

The patch also guards RUN/CHECK lines in openmp/runtime/tests/ompt with clang-format on/off comments and clang-formats the directory.

---------

Co-authored-by: Kaloyan Ignatov &lt;kaloyan.ignatov@rwth-aachen.de&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using hex format allows to better interpret IDs: 
the first digits represent the thread number, the last digits represent
the ID within a thread

The main change is in callback.h: PRIu64 -&gt; PRIx64

The patch also guards RUN/CHECK lines in openmp/runtime/tests/ompt with clang-format on/off comments and clang-formats the directory.

---------

Co-authored-by: Kaloyan Ignatov &lt;kaloyan.ignatov@rwth-aachen.de&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP][test] Make %p 0x prefix optional (#138514)</title>
<updated>2025-05-10T07:50:08+00:00</updated>
<author>
<name>Rainer Orth</name>
<email>ro@gcc.gnu.org</email>
</author>
<published>2025-05-10T07:50:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1b4f161978f334197eb6902872699d3e92060d66'/>
<id>1b4f161978f334197eb6902872699d3e92060d66</id>
<content type='text'>
Testing `openmp` on Solaris/amd64 shows a large number of failures, all
due to the same issue:

```
# .---command stderr------------
# | openmp/runtime/test/ompt/misc/interoperability.cpp:67:16: error: CHECK-SAME: expected string not found in input
# | // CHECK-SAME: parent_task_frame.reenter={{0x[0-f]+}}
# |                ^
# | &lt;stdin&gt;:5:101: note: scanning from here
# | 281474976710658: ompt_event_parallel_begin: parent_task_id=281474976710659, parent_task_frame.exit=0, parent_task_frame.reenter=7fffbedffe90, parallel_id=281474976710661, requested_team_size=2, codeptr_ra=408b8e, invoker=2
```

The testsuite expects pointers to be printed with a `0x` prefix when
using the `%p` format, while Solaris `libc` just prints them in hex
without a prefix.

However, this difference is completely benign. ISO C (up to C23,
7.23.6.1) states

```
p	The argument shall be a pointer to void or a pointer to a character
	type. The value of the pointer is converted to a sequence of printing
	characters, in an implementation-defined manner.
```

I saw two ways around this:

- replace every instance of `%p` with a macro (`KMP_PTR_FMT`, defined as
`"%p"` or `"0x%p" as appropriate), or
- adjust the testsuite to make the `0x` prefix optional

The second route seemed less intrusive and more readable, so that's what
this patch does. While large, it's also completely mechanical.

Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Testing `openmp` on Solaris/amd64 shows a large number of failures, all
due to the same issue:

```
# .---command stderr------------
# | openmp/runtime/test/ompt/misc/interoperability.cpp:67:16: error: CHECK-SAME: expected string not found in input
# | // CHECK-SAME: parent_task_frame.reenter={{0x[0-f]+}}
# |                ^
# | &lt;stdin&gt;:5:101: note: scanning from here
# | 281474976710658: ompt_event_parallel_begin: parent_task_id=281474976710659, parent_task_frame.exit=0, parent_task_frame.reenter=7fffbedffe90, parallel_id=281474976710661, requested_team_size=2, codeptr_ra=408b8e, invoker=2
```

The testsuite expects pointers to be printed with a `0x` prefix when
using the `%p` format, while Solaris `libc` just prints them in hex
without a prefix.

However, this difference is completely benign. ISO C (up to C23,
7.23.6.1) states

```
p	The argument shall be a pointer to void or a pointer to a character
	type. The value of the pointer is converted to a sequence of printing
	characters, in an implementation-defined manner.
```

I saw two ways around this:

- replace every instance of `%p` with a macro (`KMP_PTR_FMT`, defined as
`"%p"` or `"0x%p" as appropriate), or
- adjust the testsuite to make the `0x` prefix optional

The second route seemed less intrusive and more readable, so that's what
this patch does. While large, it's also completely mechanical.

Tested on `amd64-pc-solaris2.11` and `x86_64-pc-linux-gnu`.</pre>
</div>
</content>
</entry>
<entry>
<title>[OpenMP] Fix interoperability test compilation on OpenBSD (#119053)</title>
<updated>2024-12-09T16:13:37+00:00</updated>
<author>
<name>Brad Smith</name>
<email>brad@comstyle.com</email>
</author>
<published>2024-12-09T16:13:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ec27eb8c6b08fb9284ff7069cda85f3dd208a3f1'/>
<id>ec27eb8c6b08fb9284ff7069cda85f3dd208a3f1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add OMPT support for teams construct</title>
<updated>2019-08-03T02:38:53+00:00</updated>
<author>
<name>Hansang Bae</name>
<email>hansang.bae@intel.com</email>
</author>
<published>2019-08-03T02:38:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=67e93a1ae00f10450bfc1cfc1ca78498712f4b1f'/>
<id>67e93a1ae00f10450bfc1cfc1ca78498712f4b1f</id>
<content type='text'>
This change adds OMPT support for events from teams construct.

Differential Revision: https://reviews.llvm.org/D64025

llvm-svn: 367746
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change adds OMPT support for events from teams construct.

Differential Revision: https://reviews.llvm.org/D64025

llvm-svn: 367746
</pre>
</div>
</content>
</entry>
<entry>
<title>[OMPT] Handling of the events of initial-task-begin and initial-task-end</title>
<updated>2019-05-20T14:21:36+00:00</updated>
<author>
<name>Joachim Protze</name>
<email>protze@itc.rwth-aachen.de</email>
</author>
<published>2019-05-20T14:21:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=48b8a4b5190d94a8ab2d2f28eb42e2f15f61ef3f'/>
<id>48b8a4b5190d94a8ab2d2f28eb42e2f15f61ef3f</id>
<content type='text'>
OpenMP 5.0 says that the callback for the events initial-task-begin and
initial-task-end has to be ompt_callback_implicit_task.

Patch by Tim Cramer

Differential Revision: https://reviews.llvm.org/D58776

llvm-svn: 361157
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OpenMP 5.0 says that the callback for the events initial-task-begin and
initial-task-end has to be ompt_callback_implicit_task.

Patch by Tim Cramer

Differential Revision: https://reviews.llvm.org/D58776

llvm-svn: 361157
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix interoperability test compilation on FreeBSD</title>
<updated>2019-03-25T18:37:49+00:00</updated>
<author>
<name>Dimitry Andric</name>
<email>dimitry@andric.com</email>
</author>
<published>2019-03-25T18:37:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a70da7f29f9d5f227f12db5eec029f1fa2ab46bb'/>
<id>a70da7f29f9d5f227f12db5eec029f1fa2ab46bb</id>
<content type='text'>
Summary:
While building the 8.0 releases on FreeBSD, I encountered the following
error in the regression tests, where ompt/misc/interoperability.cpp
failed to compile, with:

```
projects/openmp/runtime/test/ompt/misc/interoperability.cpp:7:10: fatal error: 'alloca.h' file not found
#include &lt;alloca.h&gt;
         ^~~~~~~~~~
```

Like on NetBSD, alloca(3) is defined in &lt;stdlib.h&gt; instead.

Reviewers: emaste, jlpeyton, krytarowski, mgorny, protze.joachim

Reviewed By: jlpeyton

Subscribers: jdoerfert, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D59736

llvm-svn: 356936
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
While building the 8.0 releases on FreeBSD, I encountered the following
error in the regression tests, where ompt/misc/interoperability.cpp
failed to compile, with:

```
projects/openmp/runtime/test/ompt/misc/interoperability.cpp:7:10: fatal error: 'alloca.h' file not found
#include &lt;alloca.h&gt;
         ^~~~~~~~~~
```

Like on NetBSD, alloca(3) is defined in &lt;stdlib.h&gt; instead.

Reviewers: emaste, jlpeyton, krytarowski, mgorny, protze.joachim

Reviewed By: jlpeyton

Subscribers: jdoerfert, openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D59736

llvm-svn: 356936
</pre>
</div>
</content>
</entry>
<entry>
<title>[test] [runtime] Do not include alloca.h on NetBSD</title>
<updated>2018-12-11T15:39:30+00:00</updated>
<author>
<name>Michal Gorny</name>
<email>mgorny@gentoo.org</email>
</author>
<published>2018-12-11T15:39:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3815b9f5f912377b9ad53f728f99d9adeee2d5a7'/>
<id>3815b9f5f912377b9ad53f728f99d9adeee2d5a7</id>
<content type='text'>
On NetBSD, alloca() is in stdlib.h and there is no alloca.h.  Adjust
the includes appopriately.

Differential Revision: https://reviews.llvm.org/D55487

llvm-svn: 348856
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On NetBSD, alloca() is in stdlib.h and there is no alloca.h.  Adjust
the includes appopriately.

Differential Revision: https://reviews.llvm.org/D55487

llvm-svn: 348856
</pre>
</div>
</content>
</entry>
<entry>
<title>[OMPT] Use alloca() to force availability of frame pointer</title>
<updated>2018-07-02T09:13:38+00:00</updated>
<author>
<name>Joachim Protze</name>
<email>protze@itc.rwth-aachen.de</email>
</author>
<published>2018-07-02T09:13:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=04a00fc18c10ca59eafbd9195cd42021586b6fda'/>
<id>04a00fc18c10ca59eafbd9195cd42021586b6fda</id>
<content type='text'>
When compiling with icc, there is a problem with reenter frame addresses in
parallel_begin callbacks in the interoperability.c testcase. (The address is
not available. thus NULL)
Using alloca() forces availability of the frame pointer.

Patch provided by Simon Convent

Differential Revision: https://reviews.llvm.org/D48282

llvm-svn: 336088
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When compiling with icc, there is a problem with reenter frame addresses in
parallel_begin callbacks in the interoperability.c testcase. (The address is
not available. thus NULL)
Using alloca() forces availability of the frame pointer.

Patch provided by Simon Convent

Differential Revision: https://reviews.llvm.org/D48282

llvm-svn: 336088
</pre>
</div>
</content>
</entry>
<entry>
<title>[OMPT] Fix interoperability test with GCC</title>
<updated>2018-03-01T14:03:18+00:00</updated>
<author>
<name>Jonas Hahnfeld</name>
<email>hahnjo@hahnjo.de</email>
</author>
<published>2018-03-01T14:03:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b0f051ae63e02f135cf8550deefc3e349c77b546'/>
<id>b0f051ae63e02f135cf8550deefc3e349c77b546</id>
<content type='text'>
We have to ensure that the runtime is initialized _before_ waiting
for the two started threads to guarantee that the master threads
post their ompt_event_thread_begin before the worker threads. This
is not guaranteed in the parallel region where one worker thread
could start before the other master thread has invoked the callback.

The problem did not happen with Clang becauses the generated code
calls __kmpc_global_thread_num() and cashes its result for functions
that contain OpenMP pragmas.

Differential Revision: https://reviews.llvm.org/D43882

llvm-svn: 326435
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have to ensure that the runtime is initialized _before_ waiting
for the two started threads to guarantee that the master threads
post their ompt_event_thread_begin before the worker threads. This
is not guaranteed in the parallel region where one worker thread
could start before the other master thread has invoked the callback.

The problem did not happen with Clang becauses the generated code
calls __kmpc_global_thread_num() and cashes its result for functions
that contain OpenMP pragmas.

Differential Revision: https://reviews.llvm.org/D43882

llvm-svn: 326435
</pre>
</div>
</content>
</entry>
<entry>
<title>[OMPT] Add interoperability testcase</title>
<updated>2018-02-17T09:40:08+00:00</updated>
<author>
<name>Joachim Protze</name>
<email>protze@itc.rwth-aachen.de</email>
</author>
<published>2018-02-17T09:40:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=33db70d2d74c1ea9187bcb07ed0ebf5854233c9e'/>
<id>33db70d2d74c1ea9187bcb07ed0ebf5854233c9e</id>
<content type='text'>
Test whether OMPT-callbacks for two threads that initiate a parallel region are correct.

Differential Revision: https://reviews.llvm.org/D41942

llvm-svn: 325423
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Test whether OMPT-callbacks for two threads that initiate a parallel region are correct.

Differential Revision: https://reviews.llvm.org/D41942

llvm-svn: 325423
</pre>
</div>
</content>
</entry>
</feed>
