Menu

SVN archive Commit Log


Commit Date  
[r23734] by tlinnet

Made it easier to switch between single and cluster reporting in profiling script.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.

2014-06-08 17:48:29 Tree
[r23733] by tlinnet

Important fix for extracting the correct shape to create new arrays.

If using just one field, or having the same number of dispersion points, the shape would extend to the dispersion number.
It would report [ei][si][mi][oi][di] when calling ndarray.shape.

Shape always has to be reported as: [ei][si][mi][oi].

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.

2014-06-08 17:48:27 Tree
[r23732] by tlinnet

Re-inserted safety checks in lin/dispersion/cr72.py file.

This is re-inserted for the rank_1 cases.

This makes the unit-tests pass again.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.

2014-06-08 17:48:25 Tree
[r23731] by tlinnet

Fix for calculation of the larmor frequency per spin in profiling script.

The frq loop should also be up-shifted.
It was now extracted as 0.0.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.

2014-06-08 17:48:23 Tree
[r23730] by tlinnet

In profiling script, moved up the calculation of values one level.

This is to better see the output of the profiling iterations for cr72.py.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.

2014-06-08 11:14:38 Tree
[r23729] by tlinnet

Removing looping over exp and offset indicies in calc_chi2. They are always 0 anyway.

This brings a little speed.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.

----
Profiling.

1000 iterations
100 spins
3 sfrq
('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.]
))
('chi2 cluster:', 0.0)

TRUNK
ncalls tottime percall cumtime percall filename:lineno(function)
1000 5.221 0.005 53.578 0.054 relax_disp.py:456(calc_CR72_chi2)

BEFORE
ncalls tottime percall cumtime percall filename:lineno(function)
1000 14.871 0.015 43.084 0.043 relax_disp.py:494(calc_CR72_chi2)

AFTER removing looping over exp and offset indicies. They are always 0.
ncalls tottime percall cumtime percall filename:lineno(function)
1000 12.831 0.013 38.248 0.038 relax_disp.py:494(calc_CR72_chi2)

2014-06-08 11:14:36 Tree
[r23728] by tlinnet

Modified profiling script to calculate correct values when setting up R2eff values.

This is to test, that the return of chi2 gets zero.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.

2014-06-08 11:14:34 Tree
[r23727] by tlinnet

Moved the creation of special numpy structures outside target function.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.

2014-06-07 21:18:18 Tree
[r23726] by tlinnet

Added print out of chi2 to profile script.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.

2014-06-07 21:18:15 Tree
[r23725] by tlinnet

Altered profiling script to report cumulative timings and save to temporary files.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.

This indeed shows that the efficiency has gone down:

-----

Checked on MacBook Pro
2.4 GHz Intel Core i5
8 GB 1067 Mhz DDR3 RAM.
Python Distribution -- Python 2.7.3 |EPD 7.3-2 (32-bit)|

Timing for:
3 fields, [600. * 1E6, 800. * 1E6, 900. * 1E6]
('sfrq: ', 600000000.0, 'number of cpmg frq', 15)
('sfrq: ', 800000000.0, 'number of cpmg frq', 20)
('sfrq: ', 900000000.0, 'number of cpmg frq', 22)
iterations of function call: 1000

Timed for simulating 1 or 100 clustered spins.

For TRUNK

1 spin:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.434 0.434 <string>:1(<module>)
1 0.001 0.001 0.434 0.434 pf:354(single)
1000 0.002 0.000 0.432 0.000 pf:340(calc)
1000 0.007 0.000 0.429 0.000 relax_disp.py:908(func_CR72_full)
1000 0.054 0.000 0.416 0.000 relax_disp.py:456(calc_CR72_chi2)
3000 0.256 0.000 0.300 0.000 cr72.py:100(r2eff_CR

100 spins:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 42.035 42.035 <string>:1(<module>)
1 0.002 0.002 42.035 42.035 pf:378(cluster)
1000 0.004 0.000 41.957 0.042 pf:340(calc)
1000 0.011 0.000 41.953 0.042 relax_disp.py:908(func_CR72_full)
1000 5.378 0.005 41.928 0.042 relax_disp.py:456(calc_CR72_chi2)
300000 25.942 0.000 30.276 0.000 cr72.py:100(r2eff_CR72)
300000 4.362 0.000 5.903 0.000 chi2.py:32(chi2)

TESTING

1 spin:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.792 0.792 <string>:1(<module>)
1 0.001 0.001 0.792 0.792 pf:354(single)
1000 0.002 0.000 0.789 0.001 pf:340(calc)
1000 0.011 0.000 0.787 0.001 relax_disp.py:966(func_CR72_full)
1000 0.187 0.000 0.769 0.001 relax_disp.py:457(calc_CR72_chi2)
26013 0.290 0.000 0.290 0.000 {numpy.core.multiarray.array}
1000 0.147 0.000 0.198 0.000 cr72.py:101(r2eff_CR72)
2001 0.002 0.000 0.086 0.000 numeric.py:167(asarray)
3000 0.045 0.000 0.062 0.000 chi2.py:32(chi2)

100 spins:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 46.821 46.821 <string>:1(<module>)
1 0.002 0.002 46.821 46.821 pf:378(cluster)
1000 0.004 0.000 46.744 0.047 pf:340(calc)
1000 0.017 0.000 46.740 0.047 relax_disp.py:966(func_CR72_full)
1000 15.422 0.015 46.708 0.047 relax_disp.py:457(calc_CR72_chi2)
1511904 23.475 0.000 23.475 0.000 {numpy.core.multiarray.array}
300000 4.175 0.000 5.668 0.000 chi2.py:32(chi2)
2001 0.004 0.000 4.804 0.002 numeric.py:167(asarray)
1000 0.010 0.000 2.438 0.002 fromnumeric.py:1774(amax)
1000 0.006 0.000 2.428 0.002 fromnumeric.py:32(_wrapit)
300000 0.353 0.000 1.493 0.000 fromnumeric.py:1379(sum)
1000 1.281 0.001 1.444 0.001 cr72.py:101(r2eff_CR72)

2014-06-07 20:36:00 Tree
Older >
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.