Commit 0319b7b5 authored by Emmanuel Thomé's avatar Emmanuel Thomé

commit cfa2c7d6 was incomplete

parent 129395d5
......@@ -1222,10 +1222,19 @@ calculateTaskN (int task, const char *prefix, int numdep, int nthreads,
T[j]->side = side;
T[j]->Np = Np;
}
for (j = 0; j < nthreads; j++)
pthread_create (&tid[j], NULL, one_thread, (void *) (T+j));
while (j > 0)
pthread_join (tid[--j], NULL);
if (nthreads > 1) {
for (j = 0; j < nthreads; j++)
pthread_create (&tid[j], NULL, one_thread, (void *) (T+j));
while (j > 0)
pthread_join (tid[--j], NULL);
} else {
/* I know it's eqiuvalent to the above. But on openbsd, where we
* have obscure failures that seem to be triggered by
* multithreading, it seems that it is not. So let's play it
* simple.
*/
one_thread((void*) T);
}
free (tid);
free (T);
}
......@@ -1418,7 +1427,7 @@ int main(int argc, char *argv[])
#ifdef __OpenBSD__
if (nthreads > 1) {
fprintf(stderr, "Warning: reducing number of threads to 1 for openbsd (unexplained failure https://ci.inria.fr/cado/job/compile-openbsd-59-amd64-random-integer/2775/console\n");
fprintf(stderr, "Warning: reducing number of threads to 1 for openbsd ; unexplained failure https://ci.inria.fr/cado/job/compile-openbsd-59-amd64-random-integer/2775/console\n");
nthreads=1;
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment