Index: TrouNoir/TrouNoir.py
===================================================================
--- TrouNoir/TrouNoir.py	(revision 234)
+++ TrouNoir/TrouNoir.py	(revision 235)
@@ -1758,6 +1758,7 @@
     Method=InputCL['Method']
     TrackPoints=InputCL['TrackPoints']
     Physics=InputCL['Physics']
+    Threads=InputCL['Threads']
 
     PhysicsList=DictionariesAPI()
     
@@ -1819,8 +1820,8 @@
                     numpy.float32(ExternalRadius),
                     numpy.float32(Angle),
                     numpy.int32(Line),
-                    grid=(zImage.shape[0]/32,zImage.shape[1]/32),
-                    block=(32,32,1))
+                    grid=(zImage.shape[0]/32,zImage.shape[1]/Threads),
+                    block=(Threads,Threads,1))
     elif Method=='EachCircle':
         EachCircleCU(zImageCU,fImageCU,
                    numpy.float32(Mass),
@@ -1828,8 +1829,8 @@
                    numpy.float32(ExternalRadius),
                    numpy.float32(Angle),
                    numpy.int32(Line),
-                   grid=(zImage.shape[0]/32/2,1),
-                   block=(32,1,1))
+                   grid=(zImage.shape[0]/Threads/2,1),
+                   block=(Threads,1,1))
     elif Method=='Original':
         OriginalCU(zImageCU,fImageCU,
                    numpy.uint32(zImage.shape[0]/2),
@@ -1847,8 +1848,8 @@
                      numpy.float32(ExternalRadius),
                      numpy.float32(Angle),
                      numpy.int32(Line),
-                     grid=(Trajectories.shape[0]/32,1),
-                     block=(32,1,1))
+                     grid=(Trajectories.shape[0]/Threads,1),
+                     block=(Threads,1,1))
         
         CircleCU(TrajectoriesCU,IdLastCU,zImageCU,fImageCU,
                  numpy.float32(Mass),
@@ -1856,8 +1857,8 @@
                  numpy.float32(ExternalRadius),
                  numpy.float32(Angle),
                  numpy.int32(Line),
-                 grid=(Trajectories.shape[0]/32,zImage.shape[0]*4/32),
-                 block=(32,32,1))
+                 grid=(Trajectories.shape[0]/Threads,zImage.shape[0]*4/Threads),
+                 block=(Threads,Threads,1))
     else:
         TrajectoryCU(TrajectoriesCU,IdLastCU,
                      numpy.float32(Mass),
@@ -1865,8 +1866,8 @@
                      numpy.float32(ExternalRadius),
                      numpy.float32(Angle),
                      numpy.int32(Line),
-                     grid=(Trajectories.shape[0]/32,1),
-                     block=(32,1,1))
+                     grid=(Trajectories.shape[0]/Threads,1),
+                     block=(Threads,1,1))
         
         PixelCU(zImageCU,fImageCU,TrajectoriesCU,IdLastCU,
                 numpy.uint32(Trajectories.shape[0]),
@@ -1875,8 +1876,8 @@
                 numpy.float32(ExternalRadius),
                 numpy.float32(Angle),
                 numpy.int32(Line),
-                grid=(zImage.shape[0]/32,zImage.shape[1]/32,1),
-                block=(32,32,1))
+                grid=(zImage.shape[0]/Threads,zImage.shape[1]/Threads,1),
+                block=(Threads,Threads,1))
 
     Context.synchronize()
 
@@ -1927,11 +1928,13 @@
     Physics='Einstein'
     # No output as image
     NoImage = False
+    # Threads in CUDA
+    Threads = 32
     
-    HowToUse='%s -h [Help] -b [BlackBodyEmission] -n [NoImage] -p <Einstein/Newton> -s <SizeInPixels> -m <Mass> -i <DiscInternalRadius> -x <DiscExternalRadius> -a <AngleAboveDisc> -d <DeviceId> -c <Greyscale/Red2Yellow> -g <CUDA/OpenCL> -t <EachPixel/TrajectoCircle/TrajectoPixel/EachCircle/Original> -v <FP32/FP64>'
+    HowToUse='%s -h [Help] -b [BlackBodyEmission] -n [NoImage] -p <Einstein/Newton> -s <SizeInPixels> -m <Mass> -i <DiscInternalRadius> -x <DiscExternalRadius> -a <AngleAboveDisc> -d <DeviceId> -c <Greyscale/Red2Yellow> -g <CUDA/OpenCL> -o <EachPixel/TrajectoCircle/TrajectoPixel/EachCircle/Original> -t <ThreadsInCuda> -v <FP32/FP64>'
 
     try:
-        opts, args = getopt.getopt(sys.argv[1:],"hbns:m:i:x:a:d:g:v:t:c:p:",["blackbody","noimage","camera","size=","mass=","internal=","external=","angle=","device=","gpustyle=","variabletype=","method=","colors=","physics="])
+        opts, args = getopt.getopt(sys.argv[1:],"hbns:m:i:x:a:d:g:v:o:t:c:p:",["blackbody","noimage","camera","size=","mass=","internal=","external=","angle=","device=","gpustyle=","variabletype=","method=","threads=","colors=","physics="])
     except getopt.GetoptError:
         print(HowToUse % sys.argv[0])
         sys.exit(2)
@@ -1994,8 +1997,10 @@
             BlackBody = True
         elif opt in ("-n", "--noimage"):
             NoImage = True
-        elif opt in ("-t", "--method"):
+        elif opt in ("-o", "--method"):
             Method = arg
+        elif opt in ("-t", "--threads"):
+            Threads = int(arg)
         elif opt in ("-c", "--colors"):
             Colors = arg
         elif opt in ("-p", "--physics"):
@@ -2069,6 +2074,7 @@
     InputCL['Method']=Method
     InputCL['TrackPoints']=TrackPoints
     InputCL['Physics']=Physics
+    InputCL['Threads']=Threads
 
     if GpuStyle=='OpenCL':
         duration=BlackHoleCL(zImage,fImage,InputCL)
Index: TrouNoir/BenchTrouNoir.sh
===================================================================
--- TrouNoir/BenchTrouNoir.sh	(revision 234)
+++ TrouNoir/BenchTrouNoir.sh	(revision 235)
@@ -15,21 +15,21 @@
 echo -e "Experience : $LINE $METHOD $DEVICE $GPU"
 seq $SEQ | while read POWER ; do
     SIZE=$((2**$POWER))
-    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -b -s $SIZE -t $METHOD >>$LOGFILE 2>&1 
+    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -b -s $SIZE -o $METHOD >>$LOGFILE 2>&1 
 done
 METHOD=TrajectoCircle
 echo -e "Experience : $LINE $METHOD" >>$LOGFILE
 echo -e "Experience : $LINE $METHOD $DEVICE $GPU"
 seq $SEQ | while read POWER ; do
     SIZE=$((2**$POWER))
-    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -b -s $SIZE -t $METHOD >>$LOGFILE 2>&1 
+    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -b -s $SIZE -o $METHOD >>$LOGFILE 2>&1 
 done
 METHOD=EachPixel
 echo -e "Experience : $LINE $METHOD" >>$LOGFILE
 echo -e "Experience : $LINE $METHOD $DEVICE $GPU"
 seq $SEQ | while read POWER ; do
     SIZE=$((2**$POWER))
-    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -b -s $SIZE -t $METHOD >>$LOGFILE 2>&1 
+    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -b -s $SIZE -o $METHOD >>$LOGFILE 2>&1 
 done
 LINE=MONO
 METHOD=TrajectoPixel
@@ -37,21 +37,21 @@
 echo -e "Experience : $LINE $METHOD $DEVICE $GPU"
 seq $SEQ | while read POWER ; do
     SIZE=$((2**$POWER))
-    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -s $SIZE -t $METHOD >>$LOGFILE 2>&1 
+    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -s $SIZE -o $METHOD >>$LOGFILE 2>&1 
 done
 METHOD=TrajectoCircle
 echo -e "Experience : $LINE $METHOD" >>$LOGFILE
 echo -e "Experience : $LINE $METHOD $DEVICE $GPU"
 seq $SEQ | while read POWER ; do
     SIZE=$((2**$POWER))
-    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -s $SIZE -t $METHOD >>$LOGFILE 2>&1 
+    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -s $SIZE -o $METHOD >>$LOGFILE 2>&1 
 done
 METHOD=EachPixel
 echo -e "Experience : $LINE $METHOD" >>$LOGFILE
 echo -e "Experience : $LINE $METHOD $DEVICE $GPU"
 seq $SEQ | while read POWER ; do
     SIZE=$((2**$POWER))
-    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -s $SIZE -t $METHOD >>$LOGFILE 2>&1 
+    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -s $SIZE -o $METHOD >>$LOGFILE 2>&1 
 done
 LINE=BB
 METHOD=EachCircle
@@ -59,7 +59,7 @@
 echo -e "Experience : $LINE $METHOD $DEVICE $GPU"
 seq $SEQ | while read POWER ; do
     SIZE=$((2**$POWER))
-    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -s $SIZE -t $METHOD >>$LOGFILE 2>&1 
+    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -s $SIZE -o $METHOD >>$LOGFILE 2>&1 
 done
 LINE=MONO
 METHOD=EachCircle
@@ -67,5 +67,5 @@
 echo -e "Experience : $LINE $METHOD $DEVICE $GPU"
 seq $SEQ | while read POWER ; do
     SIZE=$((2**$POWER))
-    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -s $SIZE -t $METHOD >>$LOGFILE 2>&1 
+    seq 1 1 10 | xargs -I TOTO /usr/bin/time python ./TrouNoir.py -d $DEVICE -g $GPU -n -s $SIZE -o $METHOD >>$LOGFILE 2>&1 
 done
