用OMPT追踪基于任务的应用程序
我正在尝试使用OMPT跟踪基于任务的应用程序。
这些是我用来编译LLVM OpenMP运行时的编译选项:
cmake ../openmp -G "Unix Makefiles" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DOPENMP_ENABLE_LIBOMPTARGET=OFF -DLIBOMP_OMPT_OPTIONAL=ON
我使用的是Clang 13和官方GitHub Repo的最新LLVM OpenMP运行时。
My application is composed of several nested tasks using #pragma omp task depend (inout:some_vector[0:some_limit])
I registered several OMPT callbacks including ompt_callback_task_create
, ompt_callback_dependences
,ompt_callback_task_schedule
正常运行并给我想要的反馈。
但是,某些回调没有运行:ompt_callback_task_dependence
(任务之间存在依赖关系...)和ompt_callback_work
即使他们使用ompt_set_set_set_callback
返回代码5,对应于ompt_set_always
。
我该怎么做才能使这些回调工作?我在这里错过了什么吗?我还尝试使用不同的运行时间/编译器,没有任何结果。
任何帮助将不胜感激。
I am trying to use OMPT to trace a task-based application.
These are the compile options I used to compile the LLVM OpenMP runtime:
cmake ../openmp -G "Unix Makefiles" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DOPENMP_ENABLE_LIBOMPTARGET=OFF -DLIBOMP_OMPT_OPTIONAL=ON
I am using Clang 13 and the latest LLVM OpenMP runtime from the official github repo.
My application is composed of several nested tasks using #pragma omp task depend (inout:some_vector[0:some_limit])
I registered several OMPT callbacks including ompt_callback_task_create
, ompt_callback_dependences
, ompt_callback_task_schedule
that are running properly and giving me the wanted feedback.
However, some callbacks are not being run: ompt_callback_task_dependence
(while there is dependencies between tasks...) and ompt_callback_work
even if their registering with ompt_set_callback
returns code 5 which corresponds to ompt_set_always
.
What should I do to get those callback to work? Am I missing on something here? I also tried using different runtimes/compilers without any result.
Any help would be highly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果前任在继任者的创建之前完成,则可能不会提出
ompt_callback_task_dependence
事件。看看用> 1线的最小示例波纹管。
生产者线程创建“ A”并睡1 s。
同时,另一个线程会消耗“ A”并完成它。
然后,1 s。后来,生产者线程醒来并创建“ B”。
由于“ A”完成了,因此无需根据它来制作“ B”。
It is possible that an
ompt_callback_task_dependence
event is not raised if the predecessor completed before the successor' creation.Take a look at the minimal example bellow with >1 thread.
The producer thread creates 'A' and sleeps for 1 s.
In parallel, another thread consumes 'A' and completes it.
Then, 1 s. later, the producer thread wakes up and creates 'B'.
Since 'A' completed, there is no need to make 'B' depending on it.