svn+ssh://bugman@.../svn/relax/branches/disp_spin_speed
........
r24323 | tlinnet | 2014-06-25 19:31:40 +0200 (Wed, 25 Jun 2014) | 3 lines
Implemented a dependency check for numpy einsum, so relax can still start.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24324 | tlinnet | 2014-06-25 19:31:45 +0200 (Wed, 25 Jun 2014) | 5 lines
Initiated lengthy profiling script, that shows that doing square numpy matrix_power on strided data, can speed up the calculation by factor 1.5.
The profiling script can quicly be turned into a unit test, and includes small helper functions to calculate how to stride through the data.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24325 | tlinnet | 2014-06-25 20:41:47 +0200 (Wed, 25 Jun 2014) | 7 lines
First try to implement function that will calculate the matrix exponential by striding through data.
Interestingly, it does not work. Theses systemtests will fail.
test_hansen_cpmg_data_to_ns_cpmg_2site_3D
test_hansen_cpmg_data_to_ns_cpmg_2site_3D_full
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24326 | tlinnet | 2014-06-25 20:41:49 +0200 (Wed, 25 Jun 2014) | 3 lines
Added matrix_power to the init file in lib/dispersion.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24335 | tlinnet | 2014-06-27 12:58:20 +0200 (Fri, 27 Jun 2014) | 3 lines
Deleted the printout in dep_check. The printouts are only used for the essential packages before calling sys.exit()
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24336 | tlinnet | 2014-06-27 12:58:22 +0200 (Fri, 27 Jun 2014) | 3 lines
Added to target function that experiment_type_setup() should not be initiated, if numpy.einsum is missing.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24337 | tlinnet | 2014-06-27 12:58:24 +0200 (Fri, 27 Jun 2014) | 8 lines
Added a numpy "out" argument check to dep_check.py.
This is for checking the out argument of:
numpy.multiply
numpy.add
numpy.subtract
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24338 | tlinnet | 2014-06-27 12:58:26 +0200 (Fri, 27 Jun 2014) | 10 lines
Added the missing "self.num_exp" to target function.
Testing on older system, this was failing the systemtest.
It is a wonder how these lines in __init__ could be performed without this?
self.end_index.append(self.num_exp * self.num_spins * self.num_frq)
if model in [MODEL_B14_FULL, MODEL_CR72_FULL, MODEL_NS_CPMG_2SITE_3D_FULL, MODEL_NS_CPMG_2SITE_STAR_FULL]:
self.end_index.append(2 * self.num_exp * self.num_spins * self.num_frq)
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24339 | tlinnet | 2014-06-27 12:58:29 +0200 (Fri, 27 Jun 2014) | 3 lines
Added a list of systemtests to skip, if numpy "out" argument is not available.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24340 | tlinnet | 2014-06-27 13:35:32 +0200 (Fri, 27 Jun 2014) | 6 lines
Fix for unit test passing on old numpy systems.
The error was:
ValueError: setting an array element with a sequence.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24341 | bugman | 2014-06-27 14:24:23 +0200 (Fri, 27 Jun 2014) | 5 lines
Expanded the dispersion target function class documentation.
The NE, NS, NM, NO, and ND notation is now explained.
........
r24342 | bugman | 2014-06-27 14:27:27 +0200 (Fri, 27 Jun 2014) | 3 lines
Added Ti and NT to the dispersion target function class documentation.
........
r24343 | bugman | 2014-06-27 14:52:08 +0200 (Fri, 27 Jun 2014) | 13 lines
Slight speed up of the 'B14' and 'B14 full' dispersion models by minimising repetitive maths.
Using the disp_profile_all.py script, the speed ups for these two models are:
100 single spins analysis:
B14: 3.944+/-0.032 -> 3.888+/-0.038, 1.014x faster.
B14 full: 4.037+/-0.040 -> 3.940+/-0.025, 1.025x faster.
Cluster of 100 spins analysis:
B14: 0.522+/-0.003 -> 0.507+/-0.008, 1.031x faster.
B14 full: 0.507+/-0.008 -> 0.487+/-0.007, 1.042x faster.
........
r24347 | tlinnet | 2014-06-27 17:09:42 +0200 (Fri, 27 Jun 2014) | 3 lines
Initial try to write up a 2x2 matrix by closed form.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24348 | tlinnet | 2014-06-27 17:09:45 +0200 (Fri, 27 Jun 2014) | 3 lines
Made the validation check in profiling of marix_power check all values.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24349 | tlinnet | 2014-06-27 17:12:25 +0200 (Fri, 27 Jun 2014) | 3 lines
Replaced all self.spins with self.NS in target function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24350 | tlinnet | 2014-06-27 17:14:34 +0200 (Fri, 27 Jun 2014) | 3 lines
Replaced all self.num_exp with self.NE in target function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24351 | tlinnet | 2014-06-27 17:16:16 +0200 (Fri, 27 Jun 2014) | 3 lines
Replaced all self.num_frq with self.NM in target function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24353 | bugman | 2014-06-27 17:53:53 +0200 (Fri, 27 Jun 2014) | 18 lines
A very small speed up to the CR72 dispersion models by minimising repetitive maths operations.
The k_BA and k_AB rates are used to simplify the Psi calculation, dropping from 3 to 2
multiplications and removing a squaring operation. The Dpos and Dneg value calculations have been
simplified to drop one multiplication operation. And the calculation of eta_scale / cpmg_frqs now
only occurs once rather than twice.
Using the disp_profile_all.py script, the speed ups for these two models are:
100 single spins analysis:
CR72: 1.608+/-0.025 -> 1.552+/-0.028, 1.036x faster.
CR72 full: 1.795+/-0.043 -> 1.705+/-0.024, 1.053x faster.
Cluster of 100 spins analysis:
CR72: 0.109+/-0.001 -> 0.107+/-0.001, 1.026x faster.
CR72 full: 0.114+/-0.004 -> 0.110+/-0.001, 1.034x faster.
........
r24357 | bugman | 2014-06-27 18:32:30 +0200 (Fri, 27 Jun 2014) | 5 lines
Removal of a tonne of unused imports in the lib.dispersion package.
These were identified using the command "pylint * --disable=all --enable=unused-import".
........
r24360 | bugman | 2014-06-27 19:01:21 +0200 (Fri, 27 Jun 2014) | 12 lines
A very small speed up to the MMQ CR72 dispersion model by minimising repetitive maths operations.
This matches the recent change for the CR72 model (r24353), though the Psi calculation was already
using the fast form. Using the disp_profile_all.py script, the speed ups are:
100 single spins analysis:
MMQ CR72: 4.276+/-0.066 -> 4.230+/-0.089, 1.011x faster.
Cluster of 100 spins analysis:
MMQ CR72: 0.883+/-0.015 -> 0.862+/-0.010, 1.024x faster.
........