2011-01-14 14:58:48 +01:00
|
|
|
Index: src/sort.c
|
|
|
|
===================================================================
|
2012-09-21 17:56:26 +02:00
|
|
|
--- src/sort.c.orig
|
|
|
|
+++ src/sort.c
|
|
|
|
@@ -5288,7 +5288,11 @@ main (int argc, char **argv)
|
2011-01-14 14:58:48 +01:00
|
|
|
{
|
|
|
|
if (!nthreads)
|
|
|
|
{
|
|
|
|
- unsigned long int np = num_processors (NPROC_CURRENT_OVERRIDABLE);
|
2012-09-21 17:56:26 +02:00
|
|
|
+ unsigned long int np;
|
|
|
|
+ if (getenv("OMP_NUM_THREADS"))
|
|
|
|
+ np = num_processors (NPROC_CURRENT_OVERRIDABLE);
|
|
|
|
+ else
|
|
|
|
+ np = 1;
|
|
|
|
nthreads = MIN (np, DEFAULT_MAX_THREADS);
|
2011-01-14 14:58:48 +01:00
|
|
|
}
|
|
|
|
|