[Openmp-commits] [openmp] r322622 - [OMPT] Add Workaround for Intel Compiler Bug
Joachim Protze via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 17 02:06:06 PST 2018
Author: jprotze
Date: Wed Jan 17 02:06:06 2018
New Revision: 322622
URL: http://llvm.org/viewvc/llvm-project?rev=322622&view=rev
Log:
[OMPT] Add Workaround for Intel Compiler Bug
Add Workaround for Intel Compiler Bug with Case#: 03138964
A critical region within a nested task causes a segfault in icc 14-18:
int main()
{
#pragma omp parallel num_threads(2)
#pragma omp master
#pragma omp task
#pragma omp task
#pragma omp critical
printf("test\n");
}
When the critical region is in a separate function, the segault does not occur.
So we add noinline to make sure that the function call stays there.
Differential Revision: https://reviews.llvm.org/D41182
Modified:
openmp/trunk/runtime/test/ompt/tasks/task_types.c
openmp/trunk/runtime/test/ompt/tasks/task_types_serialized.c
Modified: openmp/trunk/runtime/test/ompt/tasks/task_types.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/tasks/task_types.c?rev=322622&r1=322621&r2=322622&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/tasks/task_types.c (original)
+++ openmp/trunk/runtime/test/ompt/tasks/task_types.c Wed Jan 17 02:06:06 2018
@@ -4,7 +4,7 @@
#include <omp.h>
#include <math.h>
-
+__attribute__ ((noinline)) // workaround for bug in icc
void print_task_type(int id)
{
#pragma omp critical
Modified: openmp/trunk/runtime/test/ompt/tasks/task_types_serialized.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/ompt/tasks/task_types_serialized.c?rev=322622&r1=322621&r2=322622&view=diff
==============================================================================
--- openmp/trunk/runtime/test/ompt/tasks/task_types_serialized.c (original)
+++ openmp/trunk/runtime/test/ompt/tasks/task_types_serialized.c Wed Jan 17 02:06:06 2018
@@ -4,6 +4,7 @@
#include "callback.h"
#include <omp.h>
+__attribute__ ((noinline)) // workaround for bug in icc
void print_task_type(int id)
{
#pragma omp critical
More information about the Openmp-commits
mailing list