Add -test-thread-monitor and -test-task-scheduler-init patches to fix FTBFS.
This commit is contained in:
parent
b72e2334bc
commit
7dab124ca2
12
tbb-2019-test-task-scheduler-init.patch
Normal file
12
tbb-2019-test-task-scheduler-init.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up tbb-2019_U8/src/test/test_task_scheduler_init.cpp.orig tbb-2019_U8/src/test/test_task_scheduler_init.cpp
|
||||||
|
--- tbb-2019_U8/src/test/test_task_scheduler_init.cpp.orig 2019-06-06 04:29:15.000000000 -0600
|
||||||
|
+++ tbb-2019_U8/src/test/test_task_scheduler_init.cpp 2019-08-26 12:08:19.547880295 -0600
|
||||||
|
@@ -285,7 +285,7 @@ namespace TestBlockingTerminateNS {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
void operator()() {
|
||||||
|
- const int numThreads = 4;
|
||||||
|
+ const int numThreads = 2;
|
||||||
|
tbb::task_scheduler_init init( numThreads );
|
||||||
|
Harness::SpinBarrier barrier( numThreads );
|
||||||
|
tbb::parallel_for( 0, numThreads, Body( barrier ) );
|
47
tbb-2019-test-thread-monitor.patch
Normal file
47
tbb-2019-test-thread-monitor.patch
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
--- tbb-2019_U8/src/rml/test/test_thread_monitor.cpp.orig 2019-06-06 04:29:15.000000000 -0600
|
||||||
|
+++ tbb-2019_U8/src/rml/test/test_thread_monitor.cpp 2019-08-27 11:36:44.253575223 -0600
|
||||||
|
@@ -33,21 +33,21 @@ public:
|
||||||
|
}
|
||||||
|
typedef rml::internal::thread_monitor thread_monitor;
|
||||||
|
thread_monitor monitor;
|
||||||
|
- volatile int request;
|
||||||
|
- volatile int ack;
|
||||||
|
- volatile unsigned clock;
|
||||||
|
- volatile unsigned stamp;
|
||||||
|
+ tbb::atomic<int> request;
|
||||||
|
+ tbb::atomic<int> ack;
|
||||||
|
+ tbb::atomic<unsigned> clock;
|
||||||
|
+ unsigned stamp;
|
||||||
|
ThreadState() : request(-1), ack(-1), clock(0) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
void ThreadState::loop() {
|
||||||
|
for(;;) {
|
||||||
|
- ++clock;
|
||||||
|
if( ack==request ) {
|
||||||
|
thread_monitor::cookie c;
|
||||||
|
monitor.prepare_wait(c);
|
||||||
|
if( ack==request ) {
|
||||||
|
REMARK("%p: request=%d ack=%d\n", this, request, ack );
|
||||||
|
+ ++clock;
|
||||||
|
monitor.commit_wait(c);
|
||||||
|
} else
|
||||||
|
monitor.cancel_wait();
|
||||||
|
@@ -60,7 +60,7 @@ void ThreadState::loop() {
|
||||||
|
rml::internal::thread_monitor::yield();
|
||||||
|
}
|
||||||
|
int r = request;
|
||||||
|
- ack = request;
|
||||||
|
+ ack = r;
|
||||||
|
if( !r ) return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -89,7 +89,7 @@ int TestMain () {
|
||||||
|
REPORT("Warning: thread %d not waiting\n",i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
- } while( t[i].stamp!=t[i].clock );
|
||||||
|
+ } while( t[i].stamp==0 || t[i].stamp!=t[i].clock );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
REMARK("notifying threads\n");
|
11
tbb.spec
11
tbb.spec
@ -23,6 +23,14 @@ Patch0: tbb-2019-dont-snip-Wall.patch
|
|||||||
# Make attributes of aliases match those on the aliased function.
|
# Make attributes of aliases match those on the aliased function.
|
||||||
Patch1: tbb-2019-attributes.patch
|
Patch1: tbb-2019-attributes.patch
|
||||||
|
|
||||||
|
# Fix test-thread-monitor, which had multiple bugs that could (and did, on
|
||||||
|
# ppc64le) result in a hang.
|
||||||
|
Patch2: tbb-2019-test-thread-monitor.patch
|
||||||
|
|
||||||
|
# Fix a test that builds a 4-thread barrier, but cannot guarantee that more
|
||||||
|
# than 2 threads will be available to use it.
|
||||||
|
Patch3: tbb-2019-test-task-scheduler-init.patch
|
||||||
|
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
@ -180,6 +188,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/cmake/%{name}/README.rst
|
|||||||
%{python3_sitearch}/__pycache__/TBB*
|
%{python3_sitearch}/__pycache__/TBB*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 27 2019 Jerry James <loganjerry@gmail.com> - 2019.8-3
|
||||||
|
- Add -test-thread-monitor and -test-task-scheduler-init patches to fix FTBFS
|
||||||
|
|
||||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2019.8-3
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2019.8-3
|
||||||
- Rebuilt for Python 3.8
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user