Index: Pi/XPU/PiXPU.py
===================================================================
--- Pi/XPU/PiXPU.py	(revision 104)
+++ Pi/XPU/PiXPU.py	(revision 105)
@@ -67,6 +67,8 @@
         print "Duration %s" % Duration
         print "Rate %s" % Rate
 
+
+        
 def DictionariesAPI():
     Marsaglia={'CONG':0,'SHR3':1,'MWC':2,'KISS':3}
     Computing={'INT32':0,'INT64':1,'FP32':2,'FP64':3}
@@ -452,10 +454,21 @@
 
     return(numpy.mean(MyDuration),numpy.median(MyDuration),numpy.std(MyDuration),numpy.min(MyDuration),numpy.max(MyDuration),numpy.mean(iterationsNew/MyDuration),numpy.median(iterationsNew/MyDuration),numpy.std(iterationsNew/MyDuration),numpy.max(iterationsNew/MyDuration),numpy.max(iterationsNew/MyDuration))
 
-def MetropolisOpenCL(circle,iterations,steps,blocks,threads,Device,
-                     RNG,ValueType):
+#def MetropolisOpenCL(circle,iterations,steps,blocks,threads,Device,
+#                     RNG,ValueType):
+def MetropolisOpenCL(MetroParamCL):
 
     import pyopencl as cl
+
+    iterations=MetroParamCL['Iterations']
+    steps=MetroParamCL['Steps']
+    blocks=MetroParamCL['Blocks']
+    threads=MetroParamCL['Threads']
+    Device=MetroParamCL['Device']
+    RNG=MetroParamCL['RNG']
+    ValueType=MetroParamCL['ValueType']
+
+    print iterations,steps,blocks,threads,Device,RNG,ValueType
     
     Marsaglia,Computing=DictionariesAPI()
     
@@ -785,7 +798,16 @@
                         print "Problem with (%i,%i) // computations on Cuda" % (Blocks,Threads)
                 elif GpuStyle=='OpenCL':
                     try:
-                        Inside,NewIterations,DurationItem=MetropolisOpenCL(circle,Iterations,1,Blocks,Threads,Devices[0],RNG,ValueType)
+                        MetroParamCL={}
+                        MetroParamCL['Iterations']=Iterations
+                        MetroParamCL['Steps']=1
+                        MetroParamCL['Blocks']=Blocks
+                        MetroParamCL['Threads']=Threads
+                        MetroParamCL['Device']=Devices[0]
+                        MetroParamCL['RNG']=RNG
+                        MetroParamCL['ValueType']=ValueType
+                    
+                        Inside,NewIterations,DurationItem=MetropolisOpenCL(MetroParamCL)
                     except:
                         print "Problem with (%i,%i) // computations on OpenCL" % (Blocks,Threads)            
                 Duration=numpy.append(Duration,time.time()-start)
@@ -798,8 +820,15 @@
                     print "Problem with (%i,%i) // computations on Cuda" % (Blocks,Threads)
             elif GpuStyle=='OpenCL':
                 try:
-                    
-                    Inside,NewIterations,Duration=MetropolisOpenCL(circle,Iterations,Redo,Blocks,Threads,Devices[0],RNG,ValueType)
+                    MetroParamCL={}
+                    MetroParamCL['Iterations']=Iterations
+                    MetroParamCL['Steps']=Redo
+                    MetroParamCL['Blocks']=Blocks
+                    MetroParamCL['Threads']=Threads
+                    MetroParamCL['Device']=Devices[0]
+                    MetroParamCL['RNG']=RNG
+                    MetroParamCL['ValueType']=ValueType
+                    Inside,NewIterations,Duration=MetropolisOpenCL(MetroParamCL)
                 except:
                     print "Problem with (%i,%i) // computations on OpenCL" % (Blocks,Threads)            
             Rate=NewIterations/Duration
