Index: /branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py
===================================================================
--- /branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py	(revision 968)
+++ /branches/reconfiguration/platforms/tsar_generic_iob/scripts/onerun.py	(revision 969)
@@ -9,4 +9,5 @@
 import argparse
 import multiprocessing
+import math
 
 def run(args):
@@ -117,15 +118,10 @@
     # OpenMP number of threads definition
     ompthreads = args.threads
-    if ompthreads < 0:
-        if os.environ.get('SOCLIB_GDB') != None:
-            ompthreads = 1
-
-        elif args.debug != None:
-            ompthreads = 1
-
-        else:
-            ompthreads = (args.x * args.y) / 4
-            cpucount = multiprocessing.cpu_count()
-            if ompthreads > cpucount: ompthreads = cpucount
+    if ompthreads < 1:
+        ompthreads = math.ceil(float(args.x * args.y) / 4)
+
+        # be nice and don't use all available processors
+        maxcpu = math.ceil(float(multiprocessing.cpu_count()) * 2/3)
+        if ompthreads > maxcpu: ompthreads = maxcpu
 
     command.extend(["-THREADS", str(ompthreads)])
@@ -191,5 +187,5 @@
 
     parser.add_argument(
-        '--threads', '-t', dest='threads', default=-1,
+        '--threads', '-t', type=int, dest='threads', default=1,
         help='number of OpenMP threads')
 
Index: /branches/reconfiguration/platforms/tsar_generic_iob/top.cpp
===================================================================
--- /branches/reconfiguration/platforms/tsar_generic_iob/top.cpp	(revision 968)
+++ /branches/reconfiguration/platforms/tsar_generic_iob/top.cpp	(revision 969)
@@ -154,4 +154,6 @@
 //               Parallelisation
 ///////////////////////////////////////////////////
+#define USE_OPENMP _OPENMP
+
 #if USE_OPENMP
 #include <omp.h>
