[OpenMP][Tools][Tests][NFC] Address flaky archer tests

Adding more concurrent threads significantly increases the
chance that the data race can be observed during testing.
This commit is contained in:
Joachim Protze 2021-07-29 17:54:01 +02:00
parent 95ef464ac9
commit 4acc2f29a2
8 changed files with 8 additions and 8 deletions

View File

@ -19,7 +19,7 @@
int main(int argc, char *argv[]) {
int var = 0;
#pragma omp parallel num_threads(2) shared(var)
#pragma omp parallel num_threads(8) shared(var)
{
#pragma omp critical
{

View File

@ -22,7 +22,7 @@ int main(int argc, char *argv[]) {
omp_nest_lock_t lock;
omp_init_nest_lock(&lock);
#pragma omp parallel num_threads(2) shared(var)
#pragma omp parallel num_threads(8) shared(var)
{
omp_set_nest_lock(&lock);
omp_set_nest_lock(&lock);

View File

@ -22,7 +22,7 @@ int main(int argc, char *argv[]) {
omp_lock_t lock;
omp_init_lock(&lock);
#pragma omp parallel num_threads(2) shared(var)
#pragma omp parallel num_threads(8) shared(var)
{
omp_set_lock(&lock);
// Dummy locking.

View File

@ -19,7 +19,7 @@
int main(int argc, char *argv[]) {
int var = 0;
#pragma omp parallel num_threads(2) shared(var)
#pragma omp parallel num_threads(8) shared(var)
{ var++; }
int error = (var != 2);

View File

@ -21,7 +21,7 @@
int main(int argc, char *argv[]) {
int var = 0, a = 0;
#pragma omp parallel num_threads(2) shared(var, a)
#pragma omp parallel num_threads(8) shared(var, a)
#pragma omp master
{
#pragma omp task shared(var, a) depend(out : var)

View File

@ -21,7 +21,7 @@
int main(int argc, char *argv[]) {
int var = 0, a = 0;
#pragma omp parallel num_threads(2) shared(var, a)
#pragma omp parallel num_threads(8) shared(var, a)
#pragma omp master
{
#pragma omp task shared(var, a)

View File

@ -21,7 +21,7 @@
int main(int argc, char *argv[]) {
int var = 0, a = 0;
#pragma omp parallel num_threads(2) shared(var, a)
#pragma omp parallel num_threads(8) shared(var, a)
#pragma omp master
{
#pragma omp task shared(var, a)

View File

@ -17,7 +17,7 @@
#include <stdio.h>
#include <unistd.h>
#define NUM_THREADS 2
#define NUM_THREADS 8
int main(int argc, char *argv[]) {
int var = 0;