Hi Edward.

I wont make that change.

I will keep the clean implementation as it is.

Best
Troels

2014-06-11 15:52 GMT+02:00 Edward d'Auvergne <[email protected]>:
> By the way, I just obtained a ~10% speed up using your profiling
> script test_suite/shared_data/dispersion/profiling/profiling_cr72.py
> if I send in the original parameter vector R20A, R20B, and dw arrays
> and check these values instead of the full structures.  See the diff
> below for ideas.  With a little more polish and more numpy ufunc
> usage, you should be able to squeeze more speed out of the CR72 model
> still.
>
> Regards,
>
> Edward
>
>
> P. S.  Here is the diff:
>
> """
> Index: lib/dispersion/cr72.py
> ===================================================================
> --- lib/dispersion/cr72.py      (revision 23841)
> +++ lib/dispersion/cr72.py      (working copy)
> @@ -92,13 +92,13 @@
>  """
>
>  # Python module imports.
> -from numpy import arccosh, array, cos, cosh, isfinite, fabs, min,
> max, sqrt, subtract, sum
> +from numpy import arccosh, array, cos, cosh, isfinite, fabs, min,
> max, sqrt, subtract, sum, multiply
>  from numpy.ma import fix_invalid, masked_greater_equal, masked_less,
> masked_where
>
>  # Repetitive calculations (to speed up calculations).
>  eta_scale = 2.0**(-3.0/2.0)
>
> -def r2eff_CR72(r20a=None, r20b=None, pA=None, dw=None, kex=None,
> cpmg_frqs=None, back_calc=None, num_points=None):
> +def r2eff_CR72(r20a_orig=None, r20b_orig=None, r20a=None, r20b=None,
> pA=None, dw_orig=None, dw=None, kex=None, cpmg_frqs=None,
> back_calc=None, num_points=None):
>      """Calculate the R2eff values for the CR72 model.
>
>      See the module docstring for details.
> @@ -133,7 +133,7 @@
>              return
>
>      # Test if dw is zero. Wait for replacement, since this is spin specific.
> -    if min(fabs(dw)) == 0.0:
> +    if min(fabs(dw_orig)) == 0.0:
>          t_dw_zero = True
>          mask_dw_zero = masked_where(dw == 0.0, dw)
>
> @@ -147,7 +147,7 @@
>      k_AB = pB * kex
>
>      # The Psi and zeta values.
> -    if sum(r20a - r20b) != 0.0:
> +    if sum(r20a_orig - r20b_orig) != 0.0:
>          fact = r20a - r20b - k_BA + k_AB
>          Psi = fact**2 - dw2 + 4.0*pA*pB*kex**2
>          zeta = 2.0*dw * fact
> @@ -182,7 +182,8 @@
>          return
>
>      # Calculate R2eff. This uses the temporary buffer and fill
> directly to back_calc.
> -    subtract(r20_kex, cpmg_frqs * arccosh( fact ), out=back_calc)
> +    multiply(cpmg_frqs, arccosh(fact), out=back_calc)
> +    subtract(r20_kex, back_calc, out=back_calc)
>
>      # Replace data in array.
>      # If dw is zero.
> Index: target_functions/relax_disp.py
> ===================================================================
> --- target_functions/relax_disp.py      (revision 23841)
> +++ target_functions/relax_disp.py      (working copy)
> @@ -567,7 +567,7 @@
>          self.r20b_struct[:] = multiply.outer(
> asarray(R20B).reshape(self.NE, self.NS, self.NM), self.no_nd_struct )
>
>          ## Back calculate the R2eff values.
> -        r2eff_CR72(r20a=self.r20a_struct, r20b=self.r20b_struct,
> pA=pA, dw=self.dw_struct, kex=kex, cpmg_frqs=self.cpmg_frqs_a,
> back_calc=self.back_calc_a, num_points=self.num_disp_points_a)
> +        r2eff_CR72(r20a_orig=R20A, r20b_orig=R20B,
> r20a=self.r20a_struct, r20b=self.r20b_struct, pA=pA, dw_orig=dw,
> dw=self.dw_struct, kex=kex, cpmg_frqs=self.cpmg_frqs_a,
> back_calc=self.back_calc_a, num_points=self.num_disp_points_a)
>
>          # Clean the data for all values, which is left over at the
> end of arrays.
>          self.back_calc_a = self.back_calc_a*self.disp_struct
> Index: test_suite/shared_data/dispersion/profiling/profiling_cr72.py
> ===================================================================
> --- test_suite/shared_data/dispersion/profiling/profiling_cr72.py
>  (revision 23841)
> +++ test_suite/shared_data/dispersion/profiling/profiling_cr72.py
>  (working copy)
> @@ -55,7 +55,7 @@
>  def main():
>      if True:
>          # Nr of iterations.
> -        nr_iter = 1
> +        nr_iter = 10000
>
>          # Print statistics.
>          verbose = True
> @@ -275,7 +275,7 @@
>                      back_calc = array([0.0]*len(cpmg_frqs[ei][mi][oi]))
>
>                      # Initialise call to function.
> -                    r2eff_CR72(r20a=r20a, r20b=r20b, pA=pA,
> dw=dw_frq, kex=kex, cpmg_frqs=array(cpmg_frqs[ei][mi][oi]),
> back_calc=back_calc, num_points=len(back_calc))
> +                    r2eff_CR72(r20a_orig=R20A, r20b_orig=R20B,
> r20a=r20a, r20b=r20b, pA=pA, dw_orig=dw_frq, dw=dw_frq, kex=kex,
> cpmg_frqs=array(cpmg_frqs[ei][mi][oi]), back_calc=back_calc,
> num_points=len(back_calc))
>
>                      for oi in range(len(self.offset)):
>                          for di in range(len(self.points[mi])):
> @@ -505,4 +505,4 @@
>      model = C1.calc(params)
>      print(model)
>
> -#test_reshape()
> \ No newline at end of file
> +#test_reshape()
> """
>
>
>
> On 11 June 2014 15:45, Edward d'Auvergne <[email protected]> wrote:
>> You wait until you see what happens with your multiple offset R1rho data ;)
>>
>> On 11 June 2014 15:42, Troels Emtekær Linnet <[email protected]> wrote:
>>> The progress is EXTREME.
>>>
>>> Per spin, I am now 1.5 X faster per spin calculation.
>>> Per cluster of 100, I am now 33X faster.
>>>
>>> Go one more version up, and it is 64 X faster.
>>>
>>> WOW!
>>>
>>>
>>>
>>> ----
>>> Checked on MacBook Pro
>>> 2.4 GHz Intel Core i5
>>> 8 GB 1067 Mhz DDR3 RAM.
>>>
>>> Timing for:
>>> 3 fields
>>> ('sfrq: ', 600000000.0, 'number of cpmg frq', 15, array([ 2., 6., 10.,
>>> 14., 18., 22., 26., 30., 34., 38., 42., 46., 50., 54., 58.]))
>>> ('sfrq: ', 800000000.0, 'number of cpmg frq', 20, array([ 2., 6., 10.,
>>> 14., 18., 22., 26., 30., 34., 38., 42., 46., 50., 54., 58., 62., 66.,
>>> 70., 74., 78.]))
>>> ('sfrq: ', 900000000.0, 'number of cpmg frq', 22, array([ 2., 6., 10.,
>>> 14., 18., 22., 26., 30., 34., 38., 42., 46., 50., 54., 58., 62., 66.,
>>> 70., 74., 78., 82., 86.]))
>>>
>>> iterations of function call: 1000
>>>
>>> Timed for simulating 1 or 100 clustered spins.
>>>
>>> Find tags:
>>> svn ls "^/tags"
>>> svn switch ^/tags/3.2.2
>>>
>>> ##############################################################################################
>>>    ncalls  tottime  percall  cumtime  percall filename:lineno(function)
>>>
>>> ############################
>>> For disp_spin_speed r23841 #
>>> ############################
>>> 1 spin:
>>>         1    0.000    0.000    0.373    0.373 <string>:1(<module>)
>>>         1    0.001    0.001    0.373    0.373 pf:427(single)
>>>      1000    0.002    0.000    0.366    0.000 pf:413(calc)
>>>      1000    0.012    0.000    0.363    0.000 
>>> relax_disp.py:994(func_CR72_full)
>>>      1000    0.027    0.000    0.345    0.000 
>>> relax_disp.py:545(calc_CR72_chi2)
>>>      1003    0.148    0.000    0.260    0.000 cr72.py:101(r2eff_CR72)
>>>      7043    0.059    0.000    0.059    0.000 {method 'reduce' of
>>> 'numpy.ufunc' objects}
>>>      1000    0.004    0.000    0.052    0.000 core.py:1701(masked_where)
>>>      3006    0.006    0.000    0.036    0.000 fromnumeric.py:1621(sum)
>>>      3006    0.004    0.000    0.028    0.000 _methods.py:23(_sum)
>>>      3000    0.024    0.000    0.024    0.000 {method 'outer' of
>>> 'numpy.ufunc' objects}
>>>      1000    0.013    0.000    0.024    0.000 chi2.py:72(chi2_rankN)
>>>      1000    0.002    0.000    0.024    0.000 {method 'view' of
>>> 'numpy.ndarray' objects}
>>>      2006    0.003    0.000    0.023    0.000 fromnumeric.py:2132(amin)
>>>      1000    0.003    0.000    0.021    0.000 
>>> core.py:2774(__array_finalize__)
>>>
>>> 100 spins:
>>>         1    0.000    0.000    1.630    1.630 <string>:1(<module>)
>>>         1    0.003    0.003    1.630    1.630 pf:449(cluster)
>>>      1000    0.004    0.000    1.532    0.002 pf:413(calc)
>>>      1000    0.020    0.000    1.528    0.002 
>>> relax_disp.py:994(func_CR72_full)
>>>      1000    0.073    0.000    1.495    0.001 
>>> relax_disp.py:545(calc_CR72_chi2)
>>>      1300    1.071    0.001    1.285    0.001 cr72.py:101(r2eff_CR72)
>>>      8528    0.131    0.000    0.131    0.000 {method 'reduce' of
>>> 'numpy.ufunc' objects}
>>>         1    0.000    0.000    0.094    0.094 pf:106(__init__)
>>>      3000    0.083    0.000    0.083    0.000 {method 'outer' of
>>> 'numpy.ufunc' objects}
>>>      3600    0.009    0.000    0.082    0.000 fromnumeric.py:1621(sum)
>>>      1000    0.055    0.000    0.079    0.000 chi2.py:72(chi2_rankN)
>>>      1000    0.006    0.000    0.078    0.000 core.py:1701(masked_where)
>>>         1    0.019    0.019    0.069    0.069 pf:173(return_r2eff_arrays)
>>>      3600    0.006    0.000    0.067    0.000 _methods.py:23(_sum)
>>>      2600    0.006    0.000    0.049    0.000 fromnumeric.py:2132(amin)
>>>      2600    0.005    0.000    0.042    0.000 _methods.py:19(_amin)
>>>      1000    0.004    0.000    0.032    0.000 {method 'view' of
>>> 'numpy.ndarray' objects}
>>>
>>>
>>> ############################
>>> For disp_spin_speed r23806 #
>>> ############################
>>> 1 spin:
>>>         1    0.000    0.000    0.546    0.546 <string>:1(<module>)
>>>         1    0.002    0.002    0.546    0.546 pf:427(single)
>>>      1000    0.003    0.000    0.538    0.001 pf:413(calc)
>>>      1000    0.015    0.000    0.535    0.001 
>>> relax_disp.py:989(func_CR72_full)
>>>      1000    0.042    0.000    0.513    0.001 
>>> relax_disp.py:523(calc_CR72_chi2)
>>>      1003    0.142    0.000    0.365    0.000 cr72.py:101(r2eff_CR72)
>>>      2003    0.055    0.000    0.181    0.000 numeric.py:2056(allclose)
>>>     10046    0.083    0.000    0.083    0.000 {method 'reduce' of
>>> 'numpy.ufunc' objects}
>>>      3000    0.045    0.000    0.076    0.000 shape_base.py:761(tile)
>>>      4015    0.006    0.000    0.053    0.000 fromnumeric.py:1762(any)
>>>      4015    0.004    0.000    0.039    0.000 {method 'any' of
>>> 'numpy.ndarray' objects}
>>>      4015    0.005    0.000    0.035    0.000 _methods.py:31(_any)
>>>      2003    0.003    0.000    0.028    0.000 fromnumeric.py:1842(all)
>>>      1000    0.014    0.000    0.026    0.000 chi2.py:72(chi2_rankN)
>>>      2003    0.004    0.000    0.026    0.000 fromnumeric.py:1621(sum)
>>>      4138    0.012    0.000    0.025    0.000 numeric.py:2320(seterr)
>>>      2003    0.002    0.000    0.020    0.000 {method 'all' of
>>> 'numpy.ndarray' objects}
>>>      2003    0.003    0.000    0.019    0.000 _methods.py:23(_sum)
>>>      2003    0.003    0.000    0.018    0.000 _methods.py:35(_all)
>>>     14046    0.016    0.000    0.016    0.000 {numpy.core.multiarray.array}
>>>
>>> 100 spins:
>>>         1    0.000    0.000    2.036    2.036 <string>:1(<module>)
>>>         1    0.003    0.003    2.036    2.036 pf:449(cluster)
>>>      1000    0.004    0.000    1.905    0.002 pf:413(calc)
>>>      1000    0.022    0.000    1.901    0.002 
>>> relax_disp.py:989(func_CR72_full)
>>>      1000    0.098    0.000    1.865    0.002 
>>> relax_disp.py:523(calc_CR72_chi2)
>>>      1300    0.986    0.001    1.511    0.001 cr72.py:101(r2eff_CR72)
>>>      2300    0.238    0.000    0.434    0.000 numeric.py:2056(allclose)
>>>      3000    0.058    0.000    0.238    0.000 shape_base.py:761(tile)
>>>      4000    0.154    0.000    0.154    0.000 {method 'repeat' of
>>> 'numpy.ndarray' objects}
>>>     11828    0.147    0.000    0.147    0.000 {method 'reduce' of
>>> 'numpy.ufunc' objects}
>>>         1    0.000    0.000    0.129    0.129 pf:106(__init__)
>>>         1    0.021    0.021    0.098    0.098 pf:173(return_r2eff_arrays)
>>>      1000    0.054    0.000    0.078    0.000 chi2.py:72(chi2_rankN)
>>>      4609    0.008    0.000    0.073    0.000 fromnumeric.py:1762(any)
>>>      2300    0.007    0.000    0.055    0.000 fromnumeric.py:1621(sum)
>>>      4609    0.005    0.000    0.054    0.000 {method 'any' of
>>> 'numpy.ndarray' objects}
>>>      4609    0.006    0.000    0.049    0.000 _methods.py:31(_any)
>>>      2300    0.004    0.000    0.044    0.000 _methods.py:23(_sum)
>>>      2300    0.005    0.000    0.039    0.000 fromnumeric.py:1842(all)
>>>      4732    0.016    0.000    0.035    0.000 numeric.py:2320(seterr)
>>>      4600    0.032    0.000    0.032    0.000 {abs}
>>>      1301    0.004    0.000    0.030    0.000 fromnumeric.py:2048(amax)
>>>     17016    0.028    0.000    0.028    0.000 {numpy.core.multiarray.array}
>>>
>>> ############################
>>> For trunk           r23785 #
>>> ############################
>>> 1 spin:
>>>         1    0.000    0.000    0.572    0.572 <string>:1(<module>)
>>>         1    0.002    0.002    0.572    0.572 pf:427(single)
>>>      1000    0.002    0.000    0.565    0.001 pf:413(calc)
>>>      1000    0.013    0.000    0.563    0.001 
>>> relax_disp.py:908(func_CR72_full)
>>>      1000    0.061    0.000    0.543    0.001 
>>> relax_disp.py:456(calc_CR72_chi2)
>>>      3003    0.294    0.000    0.400    0.000 cr72.py:100(r2eff_CR72)
>>>     12036    0.100    0.000    0.100    0.000 {method 'reduce' of
>>> 'numpy.ufunc' objects}
>>>      3000    0.042    0.000    0.078    0.000 chi2.py:32(chi2)
>>>      6003    0.011    0.000    0.072    0.000 fromnumeric.py:1621(sum)
>>>      6003    0.008    0.000    0.055    0.000 _methods.py:23(_sum)
>>>      3003    0.005    0.000    0.037    0.000 fromnumeric.py:2048(amax)
>>>      3003    0.004    0.000    0.033    0.000 fromnumeric.py:2132(amin)
>>>      3003    0.004    0.000    0.032    0.000 _methods.py:15(_amax)
>>>      3003    0.004    0.000    0.029    0.000 _methods.py:19(_amin)
>>>      6003    0.006    0.000    0.006    0.000 {isinstance}
>>>
>>> 100 spins:
>>>         1    0.000    0.000   53.864   53.864 <string>:1(<module>)
>>>         1    0.004    0.004   53.864   53.864 pf:449(cluster)
>>>      1000    0.005    0.000   53.777    0.054 pf:413(calc)
>>>      1000    0.022    0.000   53.772    0.054 
>>> relax_disp.py:908(func_CR72_full)
>>>      1000    6.340    0.006   53.735    0.054 
>>> relax_disp.py:456(calc_CR72_chi2)
>>>    300300   28.936    0.000   39.278    0.000 cr72.py:100(r2eff_CR72)
>>>   1200927    9.811    0.000    9.811    0.000 {method 'reduce' of
>>> 'numpy.ufunc' objects}
>>>    300000    4.227    0.000    7.738    0.000 chi2.py:32(chi2)
>>>    600300    1.047    0.000    7.051    0.000 fromnumeric.py:1621(sum)
>>>    600300    0.752    0.000    5.434    0.000 _methods.py:23(_sum)
>>>    300300    0.445    0.000    3.580    0.000 fromnumeric.py:2048(amax)
>>>    300300    0.413    0.000    3.221    0.000 fromnumeric.py:2132(amin)
>>>    300300    0.431    0.000    3.134    0.000 _methods.py:15(_amax)
>>>    300300    0.383    0.000    2.808    0.000 _methods.py:19(_amin)
>>>    600300    0.570    0.000    0.570    0.000 {isinstance}
>>>
>>>
>>> ############################
>>> For tag 3.2.2              #
>>> svn switch ^/tags/3.2.2    #
>>> ############################
>>>
>>> 1 spin:
>>>         1    0.000    0.000    0.569    0.569 <string>:1(<module>)
>>>         1    0.002    0.002    0.569    0.569 pf:427(single)
>>>      1000    0.002    0.000    0.562    0.001 pf:413(calc)
>>>      1000    0.005    0.000    0.560    0.001 
>>> relax_disp.py:907(func_CR72_full)
>>>      1000    0.062    0.000    0.555    0.001 
>>> relax_disp.py:456(calc_CR72_chi2)
>>>      3003    0.299    0.000    0.407    0.000 cr72.py:100(r2eff_CR72)
>>>     12036    0.103    0.000    0.103    0.000 {method 'reduce' of
>>> 'numpy.ufunc' objects}
>>>      3000    0.044    0.000    0.082    0.000 chi2.py:32(chi2)
>>>      6003    0.011    0.000    0.074    0.000 fromnumeric.py:1621(sum)
>>>      6003    0.008    0.000    0.057    0.000 _methods.py:23(_sum)
>>>      3003    0.005    0.000    0.037    0.000 fromnumeric.py:2048(amax)
>>>      3003    0.004    0.000    0.034    0.000 fromnumeric.py:2132(amin)
>>>      3003    0.004    0.000    0.033    0.000 _methods.py:15(_amax)
>>>      3003    0.004    0.000    0.029    0.000 _methods.py:19(_amin)
>>>      6003    0.006    0.000    0.006    0.000 {isinstance}
>>>
>>> 100 spins:
>>>         1    0.000    0.000   53.987   53.987 <string>:1(<module>)
>>>         1    0.004    0.004   53.987   53.987 pf:449(cluster)
>>>      1000    0.004    0.000   53.907    0.054 pf:413(calc)
>>>      1000    0.008    0.000   53.903    0.054 
>>> relax_disp.py:907(func_CR72_full)
>>>      1000    6.367    0.006   53.895    0.054 
>>> relax_disp.py:456(calc_CR72_chi2)
>>>    300300   28.870    0.000   39.278    0.000 cr72.py:100(r2eff_CR72)
>>>   1200927    9.917    0.000    9.917    0.000 {method 'reduce' of
>>> 'numpy.ufunc' objects}
>>>    300000    4.283    0.000    7.853    0.000 chi2.py:32(chi2)
>>>    600300    1.066    0.000    7.154    0.000 fromnumeric.py:1621(sum)
>>>    600300    0.745    0.000    5.516    0.000 _methods.py:23(_sum)
>>>    300300    0.447    0.000    3.565    0.000 fromnumeric.py:2048(amax)
>>>    300300    0.417    0.000    3.259    0.000 fromnumeric.py:2132(amin)
>>>    300300    0.422    0.000    3.118    0.000 _methods.py:15(_amax)
>>>    300300    0.392    0.000    2.841    0.000 _methods.py:19(_amin)
>>>    600300    0.572    0.000    0.572    0.000 {isinstance}
>>>
>>> ############################
>>> For tag 3.2.1              #
>>> svn switch ^/tags/3.2.1    #
>>> ############################
>>> 1 spin:
>>>         1    0.000    0.000    1.021    1.021 <string>:1(<module>)
>>>         1    0.002    0.002    1.021    1.021 pf:427(single)
>>>      1000    0.002    0.000    1.014    0.001 pf:413(calc)
>>>      1000    0.005    0.000    1.012    0.001 
>>> relax_disp.py:907(func_CR72_full)
>>>      1000    0.055    0.000    1.007    0.001 
>>> relax_disp.py:456(calc_CR72_chi2)
>>>      3003    0.861    0.000    0.864    0.000 cr72.py:98(r2eff_CR72)
>>>      3000    0.043    0.000    0.084    0.000 chi2.py:32(chi2)
>>>      3000    0.006    0.000    0.042    0.000 fromnumeric.py:1621(sum)
>>>      3000    0.004    0.000    0.032    0.000 _methods.py:23(_sum)
>>>      3027    0.028    0.000    0.028    0.000 {method 'reduce' of
>>> 'numpy.ufunc' objects}
>>>      8049    0.007    0.000    0.007    0.000 {range}
>>>         1    0.000    0.000    0.006    0.006 pf:106(__init__)
>>>         3    0.000    0.000    0.004    0.001 numeric.py:1509(array_repr)
>>>         3    0.000    0.000    0.004    0.001 
>>> arrayprint.py:343(array2string)
>>>         3    0.000    0.000    0.004    0.001 
>>> arrayprint.py:233(_array2string)
>>>      3000    0.004    0.000    0.004    0.000 {isinstance}
>>>
>>> 100 spins:
>>>         1    0.000    0.000  104.086  104.086 <string>:1(<module>)
>>>         1    0.004    0.004  104.086  104.086 pf:449(cluster)
>>>      1000    0.004    0.000  103.944    0.104 pf:413(calc)
>>>      1000    0.009    0.000  103.940    0.104 
>>> relax_disp.py:907(func_CR72_full)
>>>      1000    6.057    0.006  103.931    0.104 
>>> relax_disp.py:456(calc_CR72_chi2)
>>>    300300   88.604    0.000   88.888    0.000 cr72.py:98(r2eff_CR72)
>>>    300000    4.408    0.000    8.695    0.000 chi2.py:32(chi2)
>>>    300000    0.627    0.000    4.287    0.000 fromnumeric.py:1621(sum)
>>>    300000    0.458    0.000    3.296    0.000 _methods.py:23(_sum)
>>>    300027    2.839    0.000    2.839    0.000 {method 'reduce' of
>>> 'numpy.ufunc' objects}
>>>    703722    0.672    0.000    0.672    0.000 {range}
>>>    300000    0.364    0.000    0.364    0.000 {isinstance}
>>>         1    0.000    0.000    0.139    0.139 pf:106(__init__)
>>>
>>>
>>> ################# System information ######################
>>> Processor fabric:  Uni-processor.
>>>
>>>
>>> Hardware information:
>>>     Machine:                 x86_64
>>>     Processor:               i386
>>>     Processor name:          Intel(R) Core(TM) i5-2435M CPU @ 2.40GHz
>>>     Endianness:              little
>>>     Total RAM size:          2048.0 Mb
>>>     Total swap size:         6144.0 Mb
>>>
>>> Operating system information:
>>>     System:                  Darwin
>>>     Release:                 13.2.0
>>>     Version:                 Darwin Kernel Version 13.2.0: Thu Apr 17
>>> 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64
>>>     Mac version:             10.9.3 (, , ) x86_64
>>>     Distribution:
>>>     Full platform string:    Darwin-13.2.0-x86_64-i386-64bit
>>>
>>> Python information:
>>>     Architecture:            64bit
>>>     Python version:          2.7.6
>>>     Python branch:
>>>     Python build:            default, Apr 11 2014 11:55:30
>>>     Python compiler:         GCC 4.2.1 (Apple Inc. build 5666) (dot 3)
>>>     Libc version:
>>>     Python implementation:   CPython
>>>     Python revision:
>>>     Python executable:
>>> /Users/tlinnet/Library/Enthought/Canopy_64bit/User/bin/python
>>>     Python flags:            sys.flags(debug=0, py3k_warning=0,
>>> division_warning=0, division_new=0, inspect=0, interactive=0,
>>> optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0,
>>> ignore_environment=0, tabcheck=0, verbose=0, unicode=0,
>>> bytes_warning=0, hash_randomization=0)
>>>     Python float info:
>>> sys.float_info(max=1.7976931348623157e+308, max_exp=1024,
>>> max_10_exp=308, min=2.2250738585072014e-308, min_exp=-1021,
>>> min_10_exp=-307, dig=15, mant_dig=53, epsilon=2.220446049250313e-16,
>>> radix=2, rounds=1)
>>>     Python module path:      ['/Users/tlinnet/software/relax_trunk',
>>> '/Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python27.zip',
>>> '/Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7',
>>> '/Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/plat-darwin',
>>> '/Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/plat-mac',
>>> '/Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/plat-mac/lib-scriptpackages',
>>> '/Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/lib-tk',
>>> '/Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/lib-old',
>>> '/Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/lib-dynload',
>>> '/Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages',
>>> '/Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/PIL',
>>> '/Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages']
>>>
>>> Python packages and modules (most are optional):
>>>
>>> Name               Installed    Version                        Path
>>> minfx              True         1.0.6
>>> /Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/minfx
>>> bmrblib            True         1.0.3
>>> /Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/bmrblib
>>> numpy              True         1.8.0
>>> /Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy
>>> scipy              True         0.13.3
>>> /Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/scipy
>>> wxPython           True         2.9.2.4 osx-cocoa (classic)
>>> /Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/wx
>>> matplotlib         True         1.3.1
>>> /Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/matplotlib
>>> mpi4py             False
>>> epydoc             True         3.0.1
>>> /Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/epydoc
>>> optparse           True         1.5.3
>>> /Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/optparse.pyc
>>> readline           True
>>> /Users/tlinnet/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/readline.so
>>> profile            True
>>> /Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/profile.pyc
>>> bz2                True
>>> /Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/lib-dynload/bz2.so
>>> gzip               True
>>> /Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/gzip.pyc
>>> io                 True
>>> /Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/io.pyc
>>> xml                True         0.8.4 (internal)
>>> /Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/xml/__init__.pyc
>>> xml.dom.minidom    True
>>> /Applications/Canopy.app/appdata/canopy-1.4.0.1938.macosx-x86_64/Canopy.app/Contents/lib/python2.7/xml/dom/minidom.pyc
>>>
>>> relax information:
>>>     Version:                 repository checkout r23785
>>> svn+ssh://svn.gna.org/svn/relax/trunk
>>>     Processor fabric:        Uni-processor.
>>>
>>> relax C modules:
>>>
>>> Module                        Compiled    File type
>>>                                   Path
>>> target_functions.relax_fit    True        2-way ['Mach-O 64-bit bundle
>>> x86_64', 'Mach-O bundle i386']
>>> /Users/tlinnet/software/relax_trunk/target_functions/relax_fit.so
>>>
>>> 2014-06-11 15:38 GMT+02:00 Troels Emtekær Linnet <[email protected]>:
>>>> Hi Ed.
>>>>
>>>> I am now faster than trunk per spin, even if I replaces the cr72.py file.
>>>>
>>>> 10000 iterations:
>>>>
>>>> BRANCH:
>>>>         1    0.000    0.000    4.060    4.060 <string>:1(<module>)
>>>>         1    0.016    0.016    4.060    4.060 pf:427(single)
>>>>     10000    0.028    0.000    4.038    0.000 pf:413(calc)
>>>>     10000    0.133    0.000    4.010    0.000 
>>>> relax_disp.py:994(func_CR72_full)
>>>>     10000    0.301    0.000    3.803    0.000 
>>>> relax_disp.py:545(calc_CR72_chi2)
>>>>     10003    1.629    0.000    2.862    0.000 cr72.py:101(r2eff_CR72)
>>>>     70043    0.647    0.000    0.647    0.000 {method 'reduce' of
>>>> 'numpy.ufunc' objects}
>>>>     10000    0.042    0.000    0.572    0.000 core.py:1701(masked_where)
>>>>     30006    0.061    0.000    0.395    0.000 fromnumeric.py:1621(sum)
>>>>     30006    0.040    0.000    0.305    0.000 _methods.py:23(_sum)
>>>>     10000    0.142    0.000    0.269    0.000 chi2.py:72(chi2_rankN)
>>>>     30000    0.267    0.000    0.267    0.000 {method 'outer' of
>>>> 'numpy.ufunc' objects}
>>>>     10000    0.026    0.000    0.262    0.000 {method 'view' of
>>>> 'numpy.ndarray' objects}
>>>>     20006    0.032    0.000    0.250    0.000 fromnumeric.py:2132(amin)
>>>>
>>>> TRUNK, with new CR72.
>>>>         1    0.000    0.000    6.585    6.585 <string>:1(<module>)
>>>>         1    0.016    0.016    6.585    6.585 pf:427(single)
>>>>     10000    0.026    0.000    6.562    0.001 pf:413(calc)
>>>>     10000    0.133    0.000    6.536    0.001 
>>>> relax_disp.py:908(func_CR72_full)
>>>>     10000    0.601    0.000    6.327    0.001 
>>>> relax_disp.py:456(calc_CR72_chi2)
>>>>     30003    3.153    0.000    4.907    0.000 cr72.py:101(r2eff_CR72)
>>>>    180042    1.356    0.000    1.356    0.000 {method 'reduce' of
>>>> 'numpy.ufunc' objects}
>>>>     90006    0.165    0.000    1.108    0.000 fromnumeric.py:1621(sum)
>>>>     90006    0.109    0.000    0.792    0.000 _methods.py:23(_sum)
>>>>     30000    0.423    0.000    0.775    0.000 chi2.py:32(chi2)
>>>>     60006    0.096    0.000    0.647    0.000 fromnumeric.py:2132(amin)
>>>>     60006    0.074    0.000    0.483    0.000 _methods.py:19(_amin)
>>>>     30003    0.044    0.000    0.350    0.000 fromnumeric.py:2048(amax)
>>>>
>>>> TRUNK, with original CR72.
>>>>         1    0.000    0.000    5.994    5.994 <string>:1(<module>)
>>>>         1    0.018    0.018    5.994    5.994 pf:427(single)
>>>>     10000    0.027    0.000    5.971    0.001 pf:413(calc)
>>>>     10000    0.142    0.000    5.944    0.001 
>>>> relax_disp.py:908(func_CR72_full)
>>>>     10000    0.639    0.000    5.722    0.001 
>>>> relax_disp.py:456(calc_CR72_chi2)
>>>>     30003    3.093    0.000    4.205    0.000 cr72.py:100(r2eff_CR72)
>>>>    120036    1.051    0.000    1.051    0.000 {method 'reduce' of
>>>> 'numpy.ufunc' objects}
>>>>     30000    0.455    0.000    0.830    0.000 chi2.py:32(chi2)
>>>>     60003    0.113    0.000    0.755    0.000 fromnumeric.py:1621(sum)
>>>>     60003    0.078    0.000    0.580    0.000 _methods.py:23(_sum)
>>>>     30003    0.049    0.000    0.382    0.000 fromnumeric.py:2048(amax)
>>>>     30003    0.048    0.000    0.350    0.000 fromnumeric.py:2132(amin)
>>>>     30003    0.045    0.000    0.333    0.000 _methods.py:15(_amax)
>>>>     30003    0.041    0.000    0.302    0.000 _methods.py:19(_amin)
>>>>     60003    0.061    0.000    0.061    0.000 {isinstance}
>>>>     20002    0.061    0.000    0.061    0.000 {method 'flatten' of
>>>> 'numpy.ndarray' objects}
>>>>     50046    0.048    0.000    0.048    0.000 {range}
>>>
>>> _______________________________________________
>>> relax (http://www.nmr-relax.com)
>>>
>>> This is the relax-devel mailing list
>>> [email protected]
>>>
>>> To unsubscribe from this list, get a password
>>> reminder, or change your subscription options,
>>> visit the list information page at
>>> https://mail.gna.org/listinfo/relax-devel

_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

Reply via email to