[r24659]
by
bugman
Merged revisions 24038-24039,24041-24042,24053-24057 via svnmerge from
svn+ssh://bugman@.../svn/relax/branches/disp_spin_speed
........
r24038 | tlinnet | 2014-06-17 15:08:26 +0200 (Tue, 17 Jun 2014) | 5 lines
Documentation fix for the initial data structure of cpmg_frqs, spin_lock_nu1, r1.
They were incorrect.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24039 | tlinnet | 2014-06-17 15:49:54 +0200 (Tue, 17 Jun 2014) | 3 lines
Fix for shortening the variables names.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24041 | tlinnet | 2014-06-17 16:51:45 +0200 (Tue, 17 Jun 2014) | 5 lines
First attempt to implement target function for ns_r1rho_2site.
But it does not work yet.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24042 | tlinnet | 2014-06-17 16:51:47 +0200 (Tue, 17 Jun 2014) | 5 lines
First attempt to implement lib function for ns r1rho 2site.
But it does not work yet.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24053 | tlinnet | 2014-06-17 19:04:51 +0200 (Tue, 17 Jun 2014) | 3 lines
Fatal fix for calling inv_relax_time from relax_time variable.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24054 | tlinnet | 2014-06-17 19:08:19 +0200 (Tue, 17 Jun 2014) | 3 lines
Removal of the temporary offset argument.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24055 | tlinnet | 2014-06-17 19:11:07 +0200 (Tue, 17 Jun 2014) | 3 lines
Documentation fix for the dimensionality of the input arrays.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24056 | tlinnet | 2014-06-17 19:27:10 +0200 (Tue, 17 Jun 2014) | 3 lines
Implemented the target function for ns r1rho 3site.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24057 | tlinnet | 2014-06-17 19:27:12 +0200 (Tue, 17 Jun 2014) | 3 lines
Implemented the lib function for ns r1rho 3site.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
|
2014-07-22 17:11:17
|
Tree
|
[r24658]
by
bugman
Merged revisions 24018-24019,24022-24023,24026-24027,24032-24036 via svnmerge from
svn+ssh://bugman@.../svn/relax/branches/disp_spin_speed
........
r24018 | tlinnet | 2014-06-17 11:56:43 +0200 (Tue, 17 Jun 2014) | 5 lines
Fix for systemtest: test_korzhnev_2005_all_data
The masking for replacing values was wrong.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24019 | tlinnet | 2014-06-17 11:56:45 +0200 (Tue, 17 Jun 2014) | 3 lines
Moved the cleaning of data points and replacing of values of out loop for model ns mmq 2site.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24022 | tlinnet | 2014-06-17 12:20:12 +0200 (Tue, 17 Jun 2014) | 6 lines
Fix for structure cleaning and value replacing for model mmq CR72.
System test: test_korzhnev_2005_all_data
revealed how this should be done properly.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24023 | tlinnet | 2014-06-17 12:20:15 +0200 (Tue, 17 Jun 2014) | 5 lines
Fix for systemtest test_korzhnev_2005_all_data_disp_speed_bug.
The precision is lowered, and now matches the original systemtest.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24026 | tlinnet | 2014-06-17 13:07:40 +0200 (Tue, 17 Jun 2014) | 3 lines
Replaced index to numpy array from example [0][si][mi][oi] to [0, si, mi, oi].
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24027 | tlinnet | 2014-06-17 13:07:42 +0200 (Tue, 17 Jun 2014) | 3 lines
More replacing of numpy index.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24032 | tlinnet | 2014-06-17 14:53:47 +0200 (Tue, 17 Jun 2014) | 3 lines
Documentation fix, where a double bracket "[[" has been copied into all lib functions.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24033 | tlinnet | 2014-06-17 14:53:49 +0200 (Tue, 17 Jun 2014) | 3 lines
More fixes for numpy index in lib functions.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24034 | tlinnet | 2014-06-17 14:53:50 +0200 (Tue, 17 Jun 2014) | 3 lines
Restructured target function for ns mmq 3site to the new API structure of higher dimensional data.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24035 | tlinnet | 2014-06-17 14:53:52 +0200 (Tue, 17 Jun 2014) | 3 lines
Reorded the lib function for ns mmq 3site to use higher dimensional data.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24036 | tlinnet | 2014-06-17 14:53:54 +0200 (Tue, 17 Jun 2014) | 3 lines
Documentation fix for which dimensionality number of points have.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
|
2014-07-22 17:08:41
|
Tree
|
[r24657]
by
bugman
Merged revisions 23949-23968,23986-24007,24010-24011,24013-24014 via svnmerge from
svn+ssh://bugman@.../svn/relax/branches/disp_spin_speed
........
r23949 | tlinnet | 2014-06-15 08:53:31 +0200 (Sun, 15 Jun 2014) | 8 lines
Methods to replace math domain errors in model ns_cpmg_2site_3d, has been replaced with numpy masks.
number of points has been removed, as the masks utility replaces this.
pB is now moved to be calculated inside. This makes the lib function simpler.
k_AB and k_BA is also now calculated here.
Magnetization vector is also now filled in lib function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23950 | tlinnet | 2014-06-15 08:53:34 +0200 (Sun, 15 Jun 2014) | 3 lines
Fix for unit tests of model ns cpmg 2site 3d to the reduced input to the lib function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23951 | tlinnet | 2014-06-15 08:53:36 +0200 (Sun, 15 Jun 2014) | 3 lines
Change to the target function to the model ns cpmg 2site 3d to use the reduced input to the lib function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23952 | tlinnet | 2014-06-15 08:53:38 +0200 (Sun, 15 Jun 2014) | 3 lines
Changed linked matrix/vector inner products into chained dot expressions.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23953 | tlinnet | 2014-06-15 08:53:40 +0200 (Sun, 15 Jun 2014) | 3 lines
Wrote the essential dot matrix up to be initiated earlier.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23954 | tlinnet | 2014-06-15 08:53:42 +0200 (Sun, 15 Jun 2014) | 3 lines
Lowered the number of dot iterations, by pre-prepare the dot matrix another round.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23955 | tlinnet | 2014-06-15 08:53:44 +0200 (Sun, 15 Jun 2014) | 3 lines
Turned Mint vector into a 7,1 matrix, so dimensions fit with evolution matrix.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23956 | tlinnet | 2014-06-15 08:53:45 +0200 (Sun, 15 Jun 2014) | 7 lines
Lowered the number of dot operations, by pre-preparing the evolution matrix another round.
The power is in system tests always even.
The trick to removing this for loop, would be to make a general multi dot function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23957 | tlinnet | 2014-06-15 15:15:11 +0200 (Sun, 15 Jun 2014) | 5 lines
Moved the bulk operation of model CPMG 2site 3d into the lib file.
This is to keep the API clean.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23958 | tlinnet | 2014-06-15 15:15:14 +0200 (Sun, 15 Jun 2014) | 3 lines
Changed the unit test of NS CPMG 2site 3D, after the input to the function has changed.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23959 | tlinnet | 2014-06-15 15:15:16 +0200 (Sun, 15 Jun 2014) | 5 lines
Changed the taget function for NS CPMG 2site 3D.
This reflects the new API layout.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23960 | tlinnet | 2014-06-15 15:15:18 +0200 (Sun, 15 Jun 2014) | 6 lines
Changed the lib function of NS CPMG 2site start, to get input of dw and r20a+r20b of higher dimensional type.
This is to move the main operations from the target function to the lib function, and
make the API code clean and consistent.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23961 | tlinnet | 2014-06-15 15:15:19 +0200 (Sun, 15 Jun 2014) | 3 lines
Changed the target function of NS CPMG 2site STAR, to reflect the input to the function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23962 | tlinnet | 2014-06-15 15:15:21 +0200 (Sun, 15 Jun 2014) | 3 lines
Removal of temporary printout.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23963 | tlinnet | 2014-06-15 15:15:23 +0200 (Sun, 15 Jun 2014) | 3 lines
Made the dot evolution structure faster for NS CPMG 2site 3D.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23964 | tlinnet | 2014-06-15 15:57:33 +0200 (Sun, 15 Jun 2014) | 5 lines
Implemented the BLAS method of dot product, which should be faster.
I cannot get the "out" argument to work.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23965 | tlinnet | 2014-06-15 16:22:42 +0200 (Sun, 15 Jun 2014) | 5 lines
Small fix for the dot method.
But the out argument does not work.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23966 | tlinnet | 2014-06-15 16:27:07 +0200 (Sun, 15 Jun 2014) | 5 lines
Implemented the dot method via blas.
This needs a array with one more axis.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23967 | tlinnet | 2014-06-15 16:41:00 +0200 (Sun, 15 Jun 2014) | 5 lines
Last try to use the out argument.
In the last dotting loop, the out argument wont work, no matter what I do.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23968 | tlinnet | 2014-06-15 22:59:15 +0200 (Sun, 15 Jun 2014) | 10 lines
Inner product fix in model NS CPMG 2site 3D.
Fix for system tests:
F 1.34 s for Relax_disp.test_cpmg_synthetic_ns3d_to_b14
F 0.78 s for Relax_disp.test_cpmg_synthetic_ns3d_to_cr72
F 3.74 s for Relax_disp.test_cpmg_synthetic_ns3d_to_cr72_noise_cluster
The number of dotting with Mint, should corespond to the power.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23986 | tlinnet | 2014-06-16 19:01:30 +0200 (Mon, 16 Jun 2014) | 3 lines
Replaced the temporary structure self.frqs_a to self.frqs, which works for all target functions.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23987 | tlinnet | 2014-06-16 19:01:32 +0200 (Mon, 16 Jun 2014) | 3 lines
Replaced the temporary structure self.cpmg_frqs_a to self.cpmg_frqs, which works for all target functions
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23988 | tlinnet | 2014-06-16 19:01:34 +0200 (Mon, 16 Jun 2014) | 6 lines
Restructered all data structures into higher dimension in target function.
Fix for the input to the different models.
Restructured how to detect the number of offset and dispersion points.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23989 | tlinnet | 2014-06-16 19:01:36 +0200 (Mon, 16 Jun 2014) | 3 lines
Various index fixes, after the data structures have been reordered.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23990 | tlinnet | 2014-06-16 19:01:39 +0200 (Mon, 16 Jun 2014) | 3 lines
Fix for unit test, where the dimension of points has to be one lower.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23991 | tlinnet | 2014-06-16 19:01:41 +0200 (Mon, 16 Jun 2014) | 5 lines
Fix for plotting, since the back_calc now can hold more datapoints that cpmg frequencies.
This is because the numpy array has been expanded to the maximum number of points.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23992 | tlinnet | 2014-06-16 19:05:38 +0200 (Mon, 16 Jun 2014) | 5 lines
Implemented a frqs_squared calculation in the init of target function.
This is to speed up the calculations.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23993 | tlinnet | 2014-06-16 19:58:10 +0200 (Mon, 16 Jun 2014) | 3 lines
Restructured frqs_H to higher dimension in target function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23994 | tlinnet | 2014-06-16 19:58:12 +0200 (Mon, 16 Jun 2014) | 3 lines
Removed fatal print for python 3 in unit tests.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23995 | tlinnet | 2014-06-16 19:58:14 +0200 (Mon, 16 Jun 2014) | 3 lines
Moved the calculation of dw and dwH out of for loops for model MMQ CR72.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23996 | tlinnet | 2014-06-16 19:58:17 +0200 (Mon, 16 Jun 2014) | 3 lines
Removed looping over spin and frequencies for model MMD CR72.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23997 | tlinnet | 2014-06-16 19:58:19 +0200 (Mon, 16 Jun 2014) | 3 lines
Temporary removed check for dw = 0.0 in MMQ CR72.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23998 | tlinnet | 2014-06-16 20:23:34 +0200 (Mon, 16 Jun 2014) | 3 lines
Removed number of points to be parsed to model MMQ CR72.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23999 | tlinnet | 2014-06-16 20:23:36 +0200 (Mon, 16 Jun 2014) | 3 lines
Removed power to be parsed to MMQ CR72, since it is not used.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24000 | tlinnet | 2014-06-16 20:23:38 +0200 (Mon, 16 Jun 2014) | 3 lines
Changed MMQ CR72 to use multi dimensional data.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24001 | tlinnet | 2014-06-16 22:11:33 +0200 (Mon, 16 Jun 2014) | 5 lines
Changed unit test of MMQ CR72 to pass.
dw needs to be of numpy structure.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24002 | tlinnet | 2014-06-16 22:11:36 +0200 (Mon, 16 Jun 2014) | 3 lines
Moved the calculation of dw out of for loops for model ns mmq 2site.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24003 | tlinnet | 2014-06-16 22:11:38 +0200 (Mon, 16 Jun 2014) | 3 lines
Modified lib function for NS MMQ 2site, to have looping over spins and frequencies inside lib function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24004 | tlinnet | 2014-06-16 22:11:40 +0200 (Mon, 16 Jun 2014) | 3 lines
Fixed the use of higher dimensional data in mmq 2site sq dq zq.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24005 | tlinnet | 2014-06-16 22:11:41 +0200 (Mon, 16 Jun 2014) | 5 lines
Fix for documentation in ns mmq 2site/sq/dq/zq/mq.
Now explains which dimension data should be in.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24006 | tlinnet | 2014-06-16 22:11:49 +0200 (Mon, 16 Jun 2014) | 3 lines
Changed the reshaping of dw and dwH, since it is not dependent on experiment.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24007 | tlinnet | 2014-06-16 22:11:56 +0200 (Mon, 16 Jun 2014) | 5 lines
Changed the calculation of inner product in model ns cpmg 2site 3d.
The out argument of numpy.dot is buggy, and should not be used.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24010 | tlinnet | 2014-06-17 09:18:39 +0200 (Tue, 17 Jun 2014) | 3 lines
Added missing instances of cleaning the data.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24011 | tlinnet | 2014-06-17 09:18:41 +0200 (Tue, 17 Jun 2014) | 3 lines
Bug fix for model LM63 3site. The index si has to be used to extract data to lib function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24013 | tlinnet | 2014-06-17 09:33:32 +0200 (Tue, 17 Jun 2014) | 8 lines
Temporary added systemtest: test_korzhnev_2005_all_data_disp_speed_bug.
This makes a minimisation with 1 iteration, and so will give the chi2 value at the preset
parameter values.
This is chi2 value should give 162.5, but gives 74.7104.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r24014 | tlinnet | 2014-06-17 09:47:09 +0200 (Tue, 17 Jun 2014) | 6 lines
Updated documentation on dimensionality of numpy array num_points.
They are in dimension [NE][NS][[NM][NO], where oi gives the number of
dispersion points at that offset.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
|
2014-07-22 17:06:25
|
Tree
|
[r24656]
by
bugman
Merged revisions 23864-23877,23880,23888-23934,23937-23942,23946 via svnmerge from
svn+ssh://bugman@.../svn/relax/branches/disp_spin_speed
........
r23864 | tlinnet | 2014-06-12 12:12:58 +0200 (Thu, 12 Jun 2014) | 14 lines
Changed target function for model CR72.
To CR72 is now also the input of the parameters of R20A, R20B and dw.
dw is tested for zero, to return flat lines.
It is faster to search in the smaller numpy array, than the 5 dimensional dw array.
This is for speed-up.
R20A and R20B is also subtracted, to see if the full model should be used.
In the same way, it is faster to subtract the smaller array.
These small tricks are expected to give 5-10 pct. speeed-up.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23865 | tlinnet | 2014-06-12 12:12:59 +0200 (Thu, 12 Jun 2014) | 5 lines
Made the lib function of CR72 accept the R20A, R20B and dw of the original array.
This is for speed-up.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23866 | tlinnet | 2014-06-12 12:13:01 +0200 (Thu, 12 Jun 2014) | 3 lines
Changed unit-tests, to send in the original R20A, R20B and dw_orig to the testing of the lib function CR72.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23867 | tlinnet | 2014-06-12 12:13:03 +0200 (Thu, 12 Jun 2014) | 3 lines
Changed profiling script to send R20A, R20B and dw, as original parameters to the lib function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23868 | tlinnet | 2014-06-12 12:23:18 +0200 (Thu, 12 Jun 2014) | 11 lines
Changed target function for model B14.
To B14 now also send the input of the original parameters dw.
dw is tested for zero, to return flat lines.
It is faster to search in the smaller numpy array, than the 5 dimensional dw array.
This is for speed-up.
These small tricks are expected to give 5-10 pct. speeed-up.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23869 | tlinnet | 2014-06-12 12:23:20 +0200 (Thu, 12 Jun 2014) | 5 lines
Made the lib function of B14 accept dw of the original array.
This is for speed-up.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23870 | tlinnet | 2014-06-12 12:23:21 +0200 (Thu, 12 Jun 2014) | 3 lines
Changed unit-tests, to send in the original dw_orig to the testing of the lib function B14.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23871 | tlinnet | 2014-06-12 12:23:23 +0200 (Thu, 12 Jun 2014) | 3 lines
Changed profiling script to send dw as original parameters to the lib function B14.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23872 | tlinnet | 2014-06-12 12:31:42 +0200 (Thu, 12 Jun 2014) | 5 lines
Copied profiling script for CR72 model to TSMFK01 model.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23873 | tlinnet | 2014-06-12 13:18:56 +0200 (Thu, 12 Jun 2014) | 3 lines
Indention fix in cr72.py and b14.py.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23874 | tlinnet | 2014-06-12 13:18:58 +0200 (Thu, 12 Jun 2014) | 3 lines
Modified profiling script to be used for model TSMFK01.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23875 | tlinnet | 2014-06-12 13:19:00 +0200 (Thu, 12 Jun 2014) | 3 lines
Modified target function for model TSMFK01, to send in dw as original parameter.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23876 | tlinnet | 2014-06-12 13:19:02 +0200 (Thu, 12 Jun 2014) | 3 lines
Modified lib function for model TSMFK01 to accept dw_orig as input and replaced functions to find math domain errors into maske replacements.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23877 | tlinnet | 2014-06-12 13:19:04 +0200 (Thu, 12 Jun 2014) | 3 lines
Made unit tests for model TSMFK01 send in R20A and dw as a numpy array.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23880 | tlinnet | 2014-06-12 13:56:12 +0200 (Thu, 12 Jun 2014) | 32 lines
Large increase in speed for model TSMFK01 by changing target functions to use multidimensional numpy arrays in calculation.
This is done by restructuring data into multidimensional arrays of dimension [NE][NS][NM][NO][ND], which are
number of spins, number of magnetic field strength, number of offsets, maximum number of dispersion point.
The speed comes from using numpy ufunc operations.
The new version is 2.4X as fast per spin calculation, and 54X as fast for clustered analysis.
The different in timings for 3 spectrometer frequencies, calculated for 1 spin or 100 clustered spins with 1000 iterations are:
----
VERSION 3.2.2
----
1 spin:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.262 0.262 <string>:1(<module>)
100 spin:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 25.391 25.391 <string>:1(<module>)
----
New version
---
1 spin:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.111 0.111 <string>:1(<module>)
100 spin:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 0.468 0.468 <string>:1(<module>)
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23888 | tlinnet | 2014-06-12 20:07:59 +0200 (Thu, 12 Jun 2014) | 3 lines
Replacing math domain checking in model DPL94, with masked array replacement.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23889 | tlinnet | 2014-06-12 20:08:01 +0200 (Thu, 12 Jun 2014) | 5 lines
Fix for import missing error in lib function dpl94.
Needed to import numpy any() function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23890 | tlinnet | 2014-06-12 20:08:03 +0200 (Thu, 12 Jun 2014) | 5 lines
First try to speed up model DPL94.
This has not succeded, since systemtest: Relax_disp.test_dpl94_data_to_dpl94 stiÃll fails.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23891 | tlinnet | 2014-06-12 20:08:06 +0200 (Thu, 12 Jun 2014) | 3 lines
Trying to move some of the structures into its own part.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23892 | tlinnet | 2014-06-12 20:08:08 +0200 (Thu, 12 Jun 2014) | 7 lines
Fix for forgetting to multiply frqs to power 2.
This was found by inspecting all print out before and after implementation.
New implementation of DPL94 now passes all system and unit tests.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23893 | tlinnet | 2014-06-12 20:08:10 +0200 (Thu, 12 Jun 2014) | 5 lines
Moved the expansion of the R1 structure out of the for loops.
This is to speed-up the __init__ of the class of the target function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23894 | tlinnet | 2014-06-12 20:35:04 +0200 (Thu, 12 Jun 2014) | 3 lines
Moved the packing of errors and values out of for loop in the __init__ class of target function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23895 | tlinnet | 2014-06-12 20:35:06 +0200 (Thu, 12 Jun 2014) | 5 lines
Moved the multi dimensional expansion of inv_relax_times out of for loop.
This can be done for all structures, which does not have missing points.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23896 | tlinnet | 2014-06-12 20:35:08 +0200 (Thu, 12 Jun 2014) | 3 lines
For inv_relax_times, expanded one axis, and tiled up to NR spins, before reshaping and blowing up to full structure.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23897 | tlinnet | 2014-06-12 20:35:10 +0200 (Thu, 12 Jun 2014) | 3 lines
Moved the expansion of frqs out of for loops.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23898 | tlinnet | 2014-06-12 23:11:38 +0200 (Thu, 12 Jun 2014) | 3 lines
Documentation fix for description of input arrays to lib functions.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23899 | tlinnet | 2014-06-13 07:20:57 +0200 (Fri, 13 Jun 2014) | 3 lines
Converted TAP03 model to use multi dimensional numpy arrays.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23900 | tlinnet | 2014-06-13 07:21:00 +0200 (Fri, 13 Jun 2014) | 3 lines
Made dw in unit tests of TAP03 be of numpy array.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23901 | tlinnet | 2014-06-13 07:21:02 +0200 (Fri, 13 Jun 2014) | 5 lines
Replaced the loop structure in target function of TAP03 with numpy arrays.
This makes the model faster.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23902 | tlinnet | 2014-06-13 07:21:04 +0200 (Fri, 13 Jun 2014) | 5 lines
Reordered the initialization structure of the special numpy arrays.
This was done in the init part of the target function of relaxation dispersion.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23903 | tlinnet | 2014-06-13 07:26:14 +0200 (Fri, 13 Jun 2014) | 3 lines
Added model MODEL_TSMFK01 also get self.tau_cpmg calculated in init part.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23904 | tlinnet | 2014-06-13 08:18:23 +0200 (Fri, 13 Jun 2014) | 5 lines
Methods to replace math domain errors in model TP02, has been replaced with numpy masks.
Documentation is also fixed.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23905 | tlinnet | 2014-06-13 08:18:25 +0200 (Fri, 13 Jun 2014) | 3 lines
Fix for sending in dw as numpy array in unit tests of model TP02.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23906 | tlinnet | 2014-06-13 08:18:27 +0200 (Fri, 13 Jun 2014) | 5 lines
Replaced target function for model TP02, to use higher dimensional numpy array structures.
That makes the model much faster.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23907 | tlinnet | 2014-06-13 08:21:48 +0200 (Fri, 13 Jun 2014) | 3 lines
Fix for adding model TP02 to part of init class to initialize preparation of higher dimension numpy structures.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23908 | tlinnet | 2014-06-13 10:10:04 +0200 (Fri, 13 Jun 2014) | 3 lines
Made the NOREX model af faster numpy array calculation.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23909 | tlinnet | 2014-06-13 10:10:07 +0200 (Fri, 13 Jun 2014) | 5 lines
Removed an unnecessary frq_struct in init of target function.
frqs can just be expanded, and back_calc is cleaned afterwards with disp_struct.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23910 | tlinnet | 2014-06-13 10:33:43 +0200 (Fri, 13 Jun 2014) | 5 lines
Methods to replace math domain errors in model M61, has been replaced with numpy masks.
Documentation is also fixed.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23911 | tlinnet | 2014-06-13 10:33:44 +0200 (Fri, 13 Jun 2014) | 3 lines
Fix for sending in r1rho_prime and phi_ex_scaled as numpy array in unit tests of model M61.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23912 | tlinnet | 2014-06-13 10:33:46 +0200 (Fri, 13 Jun 2014) | 5 lines
Replaced target function for model M61, to use higher dimensional numpy array structures.
That makes the model much faster.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23913 | tlinnet | 2014-06-13 11:06:15 +0200 (Fri, 13 Jun 2014) | 5 lines
Methods to replace math domain errors in model M61b, has been replaced with numpy masks.
Documentation is also fixed.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23914 | tlinnet | 2014-06-13 11:06:17 +0200 (Fri, 13 Jun 2014) | 3 lines
Fix for sending in r1rho_prime and dw as numpy array in unit tests of model M61b.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23915 | tlinnet | 2014-06-13 11:06:18 +0200 (Fri, 13 Jun 2014) | 5 lines
Replaced target function for model M61b, to use higher dimensional numpy array structures.
That makes the model much faster.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23916 | tlinnet | 2014-06-13 11:17:52 +0200 (Fri, 13 Jun 2014) | 6 lines
Removed number of points to be send to lib function of model TTSMFK01.
These are not used anymore.
Also removed in corresponding unit tests.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23917 | tlinnet | 2014-06-13 11:17:53 +0200 (Fri, 13 Jun 2014) | 8 lines
Removed number of points and pB to be send to lib function of model TP02.
Number of points are not used anymore.
pB is calculated in lib function insted.
Also removed in corresponding unit tests.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23918 | tlinnet | 2014-06-13 11:21:16 +0200 (Fri, 13 Jun 2014) | 5 lines
Removed number of points and pB to send to lib function of model TP02.
pB is calculated in lib function insted.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23919 | tlinnet | 2014-06-13 11:47:38 +0200 (Fri, 13 Jun 2014) | 11 lines
Removed number of points, pB, k_AB, k_BA to be send to lib function of model B14.
Number of points are not used anymore.
pB is calculated in lib function insted.
k_AB, and k_BA are calculated in lib functions instead.
Fixed in target function.
Fixed in lib function.
Fixed in corresponding unit tests.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23920 | tlinnet | 2014-06-13 11:47:40 +0200 (Fri, 13 Jun 2014) | 5 lines
Fix for sending number of points in target function of TSMK01.
This was removed in lib function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23921 | tlinnet | 2014-06-13 11:47:42 +0200 (Fri, 13 Jun 2014) | 10 lines
Removed number of points, pB, to be send to lib function of model TAP03.
Number of points are not used anymore.
pB is calculated in lib function insted.
Fixed in target function.
Fixed in lib function.
Fixed in corresponding unit tests
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23922 | tlinnet | 2014-06-13 11:47:45 +0200 (Fri, 13 Jun 2014) | 9 lines
Removed number of points, to be send to lib function of model CR72.
Number of points are not used anymore.
Fixed in target function.
Fixed in lib function.
Fixed in corresponding unit tests
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23923 | tlinnet | 2014-06-13 11:55:44 +0200 (Fri, 13 Jun 2014) | 9 lines
Removed number of points, to be send to lib function of model DPL94.
Number of points are not used anymore.
Fixed in target function.
Fixed in lib function.
Fixed in corresponding unit tests
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23924 | tlinnet | 2014-06-13 11:55:46 +0200 (Fri, 13 Jun 2014) | 9 lines
Removed number of points, to be send to lib function of model M61.
Number of points are not used anymore.
Fixed in target function.
Fixed in lib function.
Fixed in corresponding unit tests
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23925 | tlinnet | 2014-06-13 11:55:48 +0200 (Fri, 13 Jun 2014) | 9 lines
Removed number of points, to be send to lib function of model M61b.
Number of points are not used anymore.
Fixed in target function.
Fixed in lib function.
Fixed in corresponding unit tests
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23926 | tlinnet | 2014-06-13 12:16:49 +0200 (Fri, 13 Jun 2014) | 8 lines
Methods to replace math domain errors in model MP05, has been replaced with numpy masks.
number of points has been removed, as the masks utility replaces this.
Calculataion of pB, has been moved to lib function for simplicity.
Documentation is also fixed.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23927 | tlinnet | 2014-06-13 12:16:51 +0200 (Fri, 13 Jun 2014) | 3 lines
Fix for sending in dw as numpy array in unit tests of model MP05.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23928 | tlinnet | 2014-06-13 12:16:52 +0200 (Fri, 13 Jun 2014) | 5 lines
Replaced target function for model MP05, to use higher dimensional numpy array structures.
That makes the model much faster.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23929 | tlinnet | 2014-06-13 13:03:16 +0200 (Fri, 13 Jun 2014) | 7 lines
Methods to replace math domain errors in model LM63, has been replaced with numpy masks.
number of points has been removed, as the masks utility replaces this.
Documentation is also fixed.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23930 | tlinnet | 2014-06-13 13:03:17 +0200 (Fri, 13 Jun 2014) | 5 lines
Fix for sending in number of points in unit tests of model LM63.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23931 | tlinnet | 2014-06-13 13:03:19 +0200 (Fri, 13 Jun 2014) | 5 lines
Replaced target function for model LM63, to use higher dimensional numpy array structures.
That makes the model much faster.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23932 | tlinnet | 2014-06-13 13:03:20 +0200 (Fri, 13 Jun 2014) | 6 lines
Fix for replacement of values with mask, when phi_ex is zero.
This can be spin specific.
Systemtest: Relax_disp.test_hansen_cpmg_data_to_lm63 starts to fail:
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23933 | tlinnet | 2014-06-13 13:03:22 +0200 (Fri, 13 Jun 2014) | 5 lines
Fix for sending in r20 and phi_ex as numpy array in unit tests of LM63.
This is after using masks as replacement.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23934 | tlinnet | 2014-06-13 13:08:29 +0200 (Fri, 13 Jun 2014) | 5 lines
1 digit decrease in parameter check in systemtest: Relax_disp.test_hansen_cpmg_data_to_lm63.
It is unknown, why this has occured.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23937 | tlinnet | 2014-06-13 17:31:31 +0200 (Fri, 13 Jun 2014) | 8 lines
Methods to replace math domain errors in model IT99, has been replaced with numpy masks.
number of points has been removed, as the masks utility replaces this.
pB is now moved to be calculated inside. This makes the lib function simpler.
Documentation is also fixed.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23938 | tlinnet | 2014-06-13 17:31:33 +0200 (Fri, 13 Jun 2014) | 5 lines
Fix for sending in r20 and dw as numpy array in unit tests of IT99.
This is after using masks as replacement.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23939 | tlinnet | 2014-06-13 17:31:35 +0200 (Fri, 13 Jun 2014) | 5 lines
Replaced target function for model IT99, to use higher dimensional numpy array structures.
That makes the model much faster.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23940 | tlinnet | 2014-06-13 17:31:36 +0200 (Fri, 13 Jun 2014) | 9 lines
Methods to replace math domain errors in model ns_cpmg_2site_expanded, has been replaced with numpy masks.
number of points has been removed, as the masks utility replaces this.
pB is now moved to be calculated inside. This makes the lib function simpler.
k_AB and k_BA is also now calculated here.
Documentation is also fixed.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23941 | tlinnet | 2014-06-13 17:31:38 +0200 (Fri, 13 Jun 2014) | 5 lines
Fix for sending in r20 and dw as numpy array in unit tests of ns_cpmg_2site_expanded.
This is after using masks as replacement.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23942 | tlinnet | 2014-06-13 17:31:40 +0200 (Fri, 13 Jun 2014) | 14 lines
Replaced target function for model ns_cpmg_2site_expanded, to use higher dimensional numpy array structures.
That makes the model much faster.
I cannot get system test: Relax_disp.test_cpmg_synthetic_dx_map_points
to pass.
-------
File "/Users/tlinnet/software/disp_spin_speed/test_suite/system_tests/relax_disp.py", line 1671, in test_cpmg_synthetic_dx_map_points
self.assertEqual(res_file[i], lines[i])
AssertionError: '0.76981 3.9169 0.41353 1\n' != '0.0098838 1.4654 18.661 1\n'
-------
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23946 | tlinnet | 2014-06-13 18:45:23 +0200 (Fri, 13 Jun 2014) | 16 lines
Fix for system test Relax_disp.test_cpmg_synthetic_dx_map_points.
By just copying self.back_calc_a to self.back_calc, problem was solved.
In specific_analysis.relax_disp.optimisation in function back_calc_r2eff(), the
function gets the last values stores in the class function.
This is in:
class Disp_result_command(Result_command):
"""Class for processing the dispersion optimisation results.
With:
self.back_calc = back_calc
And back_calc_r2eff() have return model.back_calc
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
|
2014-07-22 17:04:10
|
Tree
|
[r24655]
by
bugman
Merged revisions 23760-23770,23787-23789,23791-23806,23813-23855 via svnmerge from
svn+ssh://bugman@.../svn/relax/branches/disp_spin_speed
................
r23760 | tlinnet | 2014-06-10 01:01:49 +0200 (Tue, 10 Jun 2014) | 5 lines
Moved the calculation of pA and kex out off all loopes.
This was done by having two special 1/0 spin structure arrays.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23761 | tlinnet | 2014-06-10 01:01:51 +0200 (Tue, 10 Jun 2014) | 3 lines
Removed dw_frq_a numpy array, as it was not necessary.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23762 | tlinnet | 2014-06-10 01:01:53 +0200 (Tue, 10 Jun 2014) | 6 lines
Removed all looping over spin and spectrometer frequency.
This is the last loop!
Wuhu.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23763 | tlinnet | 2014-06-10 01:01:55 +0200 (Tue, 10 Jun 2014) | 3 lines
Reordered arrays for beauty of code.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23764 | tlinnet | 2014-06-10 01:01:57 +0200 (Tue, 10 Jun 2014) | 3 lines
Made the back_calc array be initiated as copy of the values array.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23765 | tlinnet | 2014-06-10 01:01:59 +0200 (Tue, 10 Jun 2014) | 3 lines
Small edit to profiling script, to help bug finding.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23766 | tlinnet | 2014-06-10 01:02:00 +0200 (Tue, 10 Jun 2014) | 3 lines
Fixed that arrays are correctly initiated with one or zero values.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23767 | tlinnet | 2014-06-10 01:02:02 +0200 (Tue, 10 Jun 2014) | 5 lines
Very important fix, for only replacing part of data array which have Nan values.
Before, all values were replaced, which was wrong.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23768 | tlinnet | 2014-06-10 01:02:04 +0200 (Tue, 10 Jun 2014) | 8 lines
Needed to increase the relative tolerance when testing if pA array is 1.
Now system test Relax_disp.test_hansen_cpmg_data_missing_auto_analysis passes.
Also added some comments lines, to prepare for mask replace of values.
For example if only some of etapos values should be replaced.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23769 | tlinnet | 2014-06-10 01:02:06 +0200 (Tue, 10 Jun 2014) | 3 lines
Restored profiling script to normal.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23770 | tlinnet | 2014-06-10 01:21:14 +0200 (Tue, 10 Jun 2014) | 3 lines
Made the logic and comments much clearer about how to reshape, expand axis, and tile numpy arrays.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23787 | tlinnet | 2014-06-10 16:51:30 +0200 (Tue, 10 Jun 2014) | 3 lines
Removed line "# -*- coding: utf-8 -*-" which was automatically inserted by new python code editor.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23788 | tlinnet | 2014-06-10 16:51:33 +0200 (Tue, 10 Jun 2014) | 10 lines
Implemented a masked array search for where "missing" array is equal 1.
This makes it possible to replace all values with this mask, from the value array.
This eliminates the last loops over the missing values.
It took over 4 hours to figure out, that the mask should be called with mask.mask,
to return the same fulls structure,
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23789 | tlinnet | 2014-06-10 16:51:35 +0200 (Tue, 10 Jun 2014) | 3 lines
Yet another small improvement for the profiling script.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23791 | tlinnet | 2014-06-10 18:40:55 +0200 (Tue, 10 Jun 2014) | 5 lines
Removed the multi dimensional structure of pA.
pA is not multi-dimensional, and can just be multiplied with numpy arrays.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23792 | tlinnet | 2014-06-10 18:40:59 +0200 (Tue, 10 Jun 2014) | 3 lines
Fix for testing of pA in lib function, when pA is just float.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23793 | tlinnet | 2014-06-10 18:41:01 +0200 (Tue, 10 Jun 2014) | 3 lines
Modified unit tests, so pA is sent to target function as float instead of array.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23794 | tlinnet | 2014-06-10 18:41:03 +0200 (Tue, 10 Jun 2014) | 5 lines
Removed the multi dimensional structure of kex.
kex is not multi-dimensional, and can just be multiplied with numpy arrays.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23795 | tlinnet | 2014-06-10 18:41:05 +0200 (Tue, 10 Jun 2014) | 3 lines
Fix for testing of kex in lib function, when kex is just float.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23796 | tlinnet | 2014-06-10 18:41:06 +0200 (Tue, 10 Jun 2014) | 3 lines
Modified unit tests, so kex is sent to target function as float instead of array.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23797 | tlinnet | 2014-06-10 18:41:08 +0200 (Tue, 10 Jun 2014) | 10 lines
Important fix for replacing values if eta_pos > 700 is violated.
This fixes systemtest: Relax_disp.test_sod1wt_t25_to_cr72, which failed after making kex to a numpy float.
The trick is to make a numpy mask which stores the position where to replace the values.
Then replace the values just before last return.
This makes sure, that not all values are changed.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23798 | tlinnet | 2014-06-10 18:41:10 +0200 (Tue, 10 Jun 2014) | 5 lines
Increased the kex speed to 1e7 in clustered unit tests cases.
This is to demonstrate where there will be no excange.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23799 | tlinnet | 2014-06-10 18:54:28 +0200 (Tue, 10 Jun 2014) | 3 lines
Added a multi-dimensional numpy array chi2 value calculation function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23800 | tlinnet | 2014-06-10 18:54:31 +0200 (Tue, 10 Jun 2014) | 3 lines
Called the newly created chi2 function to calculate for multi dimensional numpy arrays.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23801 | tlinnet | 2014-06-10 19:11:07 +0200 (Tue, 10 Jun 2014) | 5 lines
Renamed chi2_ND to chi2_rankN.
This is a better name for representing multiple axis calculation.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23802 | tlinnet | 2014-06-10 20:58:15 +0200 (Tue, 10 Jun 2014) | 5 lines
Made special ei, si, mi, and oi numpy structure array.
This is for rapid speed-up of numpy array creation in target function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23803 | tlinnet | 2014-06-10 20:58:19 +0200 (Tue, 10 Jun 2014) | 3 lines
Code clean-up in lib function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23804 | tlinnet | 2014-06-10 20:58:22 +0200 (Tue, 10 Jun 2014) | 3 lines
Replace np.tile with tile.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23805 | tlinnet | 2014-06-10 20:58:24 +0200 (Tue, 10 Jun 2014) | 3 lines
Replaced self.spins_a with self.disp_struct.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23806 | tlinnet | 2014-06-10 21:06:12 +0200 (Tue, 10 Jun 2014) | 3 lines
Removed un-used self structures in __init__of class.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23813 | tlinnet | 2014-06-11 08:28:25 +0200 (Wed, 11 Jun 2014) | 3 lines
Made iinitialisation structures for dw.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23814 | tlinnet | 2014-06-11 08:28:27 +0200 (Wed, 11 Jun 2014) | 3 lines
Initial try to reshape dw faster.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23815 | tlinnet | 2014-06-11 08:40:38 +0200 (Wed, 11 Jun 2014) | 5 lines
Switched to use self.ei, self.si, self.mi, self.oi, self.di.
This is for better reading of code.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23816 | tlinnet | 2014-06-11 08:40:40 +0200 (Wed, 11 Jun 2014) | 3 lines
Comment out the sys.exit(), which would make the code fail for wrong calculation of dw.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23817 | tlinnet | 2014-06-11 08:46:00 +0200 (Wed, 11 Jun 2014) | 7 lines
Copied profiling script for CPMG model CR72 to R1rho DPL94 model.
The framework of the script will be the same, but the data a little different.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23818 | tlinnet | 2014-06-11 10:08:02 +0200 (Wed, 11 Jun 2014) | 3 lines
Started converting profiling script to DPL94.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23819 | tlinnet | 2014-06-11 10:08:05 +0200 (Wed, 11 Jun 2014) | 5 lines
Replaced self.(ei,si,mi,oi,di) with self.(NE,NS,NM,NO,ND).
These numbers represents the maximum number of dimensions, instead of index.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23820 | tlinnet | 2014-06-11 10:08:06 +0200 (Wed, 11 Jun 2014) | 3 lines
Added the ei index, when creating the first dw_mask.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23821 | tlinnet | 2014-06-11 10:08:08 +0200 (Wed, 11 Jun 2014) | 3 lines
Reordered how the structures dw init structures are created.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23822 | tlinnet | 2014-06-11 10:08:10 +0200 (Wed, 11 Jun 2014) | 3 lines
Clearing the dw_struct before calculation.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23823 | tlinnet | 2014-06-11 10:16:27 +0200 (Wed, 11 Jun 2014) | 8 lines
Started using the new way of constructing dw.
This is for running system tests.
Note, somewhere in the dw array, the frequencies will be different between the two implementations.
But apparently, this does not matter.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23824 | tlinnet | 2014-06-11 10:46:42 +0200 (Wed, 11 Jun 2014) | 3 lines
Inserted temporary method to switch for profiling.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23825 | tlinnet | 2014-06-11 10:46:44 +0200 (Wed, 11 Jun 2014) | 3 lines
First try to speed-up the old dw structure calculation.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23826 | tlinnet | 2014-06-11 13:12:12 +0200 (Wed, 11 Jun 2014) | 3 lines
Simplified calculation.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23827 | tlinnet | 2014-06-11 13:12:14 +0200 (Wed, 11 Jun 2014) | 3 lines
Yet another try to implement a fast dw structure method.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23828 | tlinnet | 2014-06-11 13:12:16 +0200 (Wed, 11 Jun 2014) | 6 lines
Implemented the fastest way to calculate the dw structure.
This uses the numpy ufunc multiply.outer function to create the outer array, and then multiply
with the frqs_structure.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23829 | tlinnet | 2014-06-11 13:12:18 +0200 (Wed, 11 Jun 2014) | 3 lines
Renamed dw temporary structure to generic structure.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23830 | tlinnet | 2014-06-11 13:12:20 +0200 (Wed, 11 Jun 2014) | 3 lines
Restructured the calculation of R20A and R20B to the most efficient way.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23831 | tlinnet | 2014-06-11 13:12:21 +0200 (Wed, 11 Jun 2014) | 3 lines
Made the lib/cr72.py to a numpy multi dimensional numpy array calculation.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23832 | tlinnet | 2014-06-11 14:05:35 +0200 (Wed, 11 Jun 2014) | 5 lines
Changed the catching when dw is zero, to use masked array.
Implemented backwards compability with unit tests.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23833 | tlinnet | 2014-06-11 14:05:37 +0200 (Wed, 11 Jun 2014) | 5 lines
Bugfix for testing if kex is zero.
It was tested if kex was equal 1.0.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23834 | tlinnet | 2014-06-11 14:54:37 +0200 (Wed, 11 Jun 2014) | 3 lines
Implemented masked replacement if fact is less that 1.0.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23835 | tlinnet | 2014-06-11 14:55:31 +0200 (Wed, 11 Jun 2014) | 1 line
Replaced isnan mask with function that catches all invalid values.
................
r23836 | tlinnet | 2014-06-11 14:55:32 +0200 (Wed, 11 Jun 2014) | 3 lines
Clean up of comment lines.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23837 | tlinnet | 2014-06-11 14:55:34 +0200 (Wed, 11 Jun 2014) | 8 lines
Removed the masked replacement if fact is less than 1.0.
This is very strange, but otherwise system test:
Relax_disp.test_hansen_cpmg_data_missing_auto_analysis
would fail.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23838 | tlinnet | 2014-06-11 15:09:01 +0200 (Wed, 11 Jun 2014) | 5 lines
Removed the slow allclose() function to test if R20A and R20B is equal.
It is MUCH faster to just subtract and check sum is not 0.0.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23839 | tlinnet | 2014-06-11 15:25:32 +0200 (Wed, 11 Jun 2014) | 3 lines
Replaced the temporary variable R2eff with back_calc, and used numpy subtract to speed up.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23840 | tlinnet | 2014-06-11 15:25:34 +0200 (Wed, 11 Jun 2014) | 5 lines
Made the lib function into a pure numpy array calculation.
This requires, that r20a, r20b and dw has same dimension as the dispersion points.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23841 | tlinnet | 2014-06-11 15:25:36 +0200 (Wed, 11 Jun 2014) | 3 lines
Changes too unit tests, so data is sent to target function in numpy array format.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23842 | tlinnet | 2014-06-11 16:19:10 +0200 (Wed, 11 Jun 2014) | 3 lines
Removed an the creation of a unnessary structure bu using numpy multiply.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23843 | tlinnet | 2014-06-11 16:19:12 +0200 (Wed, 11 Jun 2014) | 3 lines
Moved the mask which finds where to replace values into the __init__ function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23844 | tlinnet | 2014-06-11 16:43:17 +0200 (Wed, 11 Jun 2014) | 7 lines
Replaced the multiplcation with the disp structure, to a replacement with a mask.
My timings are varying at my computer, so results are within the very same timing.
But for reading the code, having two masks, is essential better.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23845 | tlinnet | 2014-06-11 17:09:23 +0200 (Wed, 11 Jun 2014) | 14 lines
Merged revisions 23743 via svnmerge from
svn+ssh://tlinnet@.../svn/relax/trunk
........
r23743 | tlinnet | 2014-06-08 22:42:55 +0200 (Sun, 08 Jun 2014) | 6 lines
Updated profiling text for CR72 model.
Now it is tested for 3 fields.
This is related to:
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
................
r23846 | tlinnet | 2014-06-11 17:14:09 +0200 (Wed, 11 Jun 2014) | 25 lines
Reverted r23845-r23844 as this was using a wrong commit message.
The command used was:
svn merge -r23845:23844 .
........
r23845 | tlinnet | 2014-06-11 17:09:23 +0200 (Wed, 11 Jun 2014) | 14 lines
Merged revisions 23743 via svnmerge from
svn+ssh://tlinnet@.../svn/relax/trunk
........
r23743 | tlinnet | 2014-06-08 22:42:55 +0200 (Sun, 08 Jun 2014) | 6 lines
Updated profiling text for CR72 model.
Now it is tested for 3 fields.
This is related to:
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
........
................
r23847 | tlinnet | 2014-06-11 17:15:03 +0200 (Wed, 11 Jun 2014) | 5 lines
Copied profiling script for CR72 to B14 model.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23848 | tlinnet | 2014-06-11 19:37:37 +0200 (Wed, 11 Jun 2014) | 3 lines
Modified profiling script for the B14 model.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23849 | tlinnet | 2014-06-11 19:37:40 +0200 (Wed, 11 Jun 2014) | 5 lines
Modified model B14 lib file to faster numpy multidimensional mode.
The implementations comes almost directly from the CR72 model file.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23850 | tlinnet | 2014-06-11 19:37:42 +0200 (Wed, 11 Jun 2014) | 5 lines
Reverted the use of the mask "mask_set_blank".
It did not work, and many system tests started failing.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23851 | tlinnet | 2014-06-11 19:37:43 +0200 (Wed, 11 Jun 2014) | 3 lines
Changed the target function to handle the B14 model for faster numpy computation.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23852 | tlinnet | 2014-06-11 19:37:45 +0200 (Wed, 11 Jun 2014) | 3 lines
Changed unit test for B14 to match numpy input requirement.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23853 | tlinnet | 2014-06-11 20:43:45 +0200 (Wed, 11 Jun 2014) | 5 lines
Added additional tests in b14, when math errors can occur.
This is very easy with a conditional masked search in arrays.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23854 | tlinnet | 2014-06-11 20:43:47 +0200 (Wed, 11 Jun 2014) | 3 lines
Comment fix for finding when E0 is above 700 in lib function of B14.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
r23855 | tlinnet | 2014-06-11 20:47:29 +0200 (Wed, 11 Jun 2014) | 3 lines
Removed use of "asarray", since the variables are already arrays.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
................
|
2014-07-22 16:56:51
|
Tree
|
[r24654]
by
bugman
Merged revisions 23745-23752,23754-23758 via svnmerge from
svn+ssh://bugman@.../svn/relax/branches/disp_spin_speed
........
r23745 | tlinnet | 2014-06-08 23:44:44 +0200 (Sun, 08 Jun 2014) | 8 lines
Swith the looping from spin->frq to frq->spin.
Since the number of dispersion points are the same for all spins, this
allows to move the calculation of pA and kex array one level up.
This saves alot of computation.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23746 | tlinnet | 2014-06-08 23:44:45 +0200 (Sun, 08 Jun 2014) | 3 lines
Changed all the creation of special numpy arrays to be of float64 type.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23747 | tlinnet | 2014-06-08 23:54:41 +0200 (Sun, 08 Jun 2014) | 5 lines
Moved the data filling of special numpy array errors and values, to initialization of Dispersion class.
These values does not change, and can safely be stored outside.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23748 | tlinnet | 2014-06-08 23:56:36 +0200 (Sun, 08 Jun 2014) | 3 lines
Just a tiny little more speed, by removing temporary storage of chi2 calculation.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23749 | tlinnet | 2014-06-09 00:09:59 +0200 (Mon, 09 Jun 2014) | 25 lines
Changed all calls to numpy np.X functions to just the numpy function.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
Timing is now showing, 17% loss per single spin, but but 277 % gain on 100 spin.
3 fields, 1000 iterations.
1 spin
1 0.000 0.000 0.677 0.677 <string>:1(<module>)
1 0.001 0.001 0.677 0.677 pf:419(single)
1000 0.002 0.000 0.671 0.001 pf:405(calc)
1000 0.009 0.000 0.669 0.001 relax_disp.py:979(func_CR72_full)
1000 0.102 0.000 0.655 0.001 relax_disp.py:507(calc_CR72_chi2)
1003 0.160 0.000 0.365 0.000 cr72.py:101(r2eff_CR72)
23029 0.188 0.000 0.188 0.000 {numpy.core.multiarray.array}
4003 0.119 0.000 0.182 0.000 numeric.py:1862(allclose)
100 spin
1 0.000 0.000 19.783 19.783 <string>:1(<module>)
1 0.002 0.002 19.783 19.783 pf:441(cluster)
1000 0.004 0.000 19.665 0.020 pf:405(calc)
1000 0.013 0.000 19.661 0.020 relax_disp.py:979(func_CR72_full)
1000 6.541 0.007 19.634 0.020 relax_disp.py:507(calc_CR72_chi2)
916108 11.127 0.000 11.127 0.000 {numpy.core.multiarray.array}
1300 1.325 0.001 2.026 0.002 cr72.py:101(r2eff_CR72)
4300 0.495 0.000 0.634 0.000 numeric.py:1862(allclose)
........
r23750 | tlinnet | 2014-06-09 00:49:14 +0200 (Mon, 09 Jun 2014) | 3 lines
Removed unused import of numpy.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23751 | tlinnet | 2014-06-09 00:49:15 +0200 (Mon, 09 Jun 2014) | 3 lines
Changed all calls to numpy np.X functions to just the numpy function in lib/dispersion/cr72.py.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23752 | tlinnet | 2014-06-09 00:49:18 +0200 (Mon, 09 Jun 2014) | 3 lines
Removed unused import of numpy.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23754 | tlinnet | 2014-06-09 19:46:17 +0200 (Mon, 09 Jun 2014) | 3 lines
Made copies of numpy arrays instead of creating from new.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23755 | tlinnet | 2014-06-09 19:46:19 +0200 (Mon, 09 Jun 2014) | 3 lines
Added a self.frqs_a as a multidimensional numpy array.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23756 | tlinnet | 2014-06-09 19:46:20 +0200 (Mon, 09 Jun 2014) | 3 lines
Small fix for the indicies to the errors and values numpy array.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23757 | tlinnet | 2014-06-09 19:46:22 +0200 (Mon, 09 Jun 2014) | 5 lines
Lowered the number of iterations to the profiling scripts.
This is to use the profiling script as bug finder.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23758 | tlinnet | 2014-06-09 19:46:25 +0200 (Mon, 09 Jun 2014) | 7 lines
Moved the calculation of dw_frq out of spin and spectrometer loop.
This is done by having a special 1/0 spin numpy array, which turns on or off the values in the numpy array multiplication.
The multiplication needs to first axis expand dw, and then tile the arrays according to the numpy structure.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
|
2014-07-22 16:52:58
|
Tree
|
[r24653]
by
bugman
Merged revisions 23722-23742 via svnmerge from
svn+ssh://bugman@.../svn/relax/branches/disp_spin_speed
........
r23722 | tlinnet | 2014-06-07 21:43:16 +0200 (Sat, 07 Jun 2014) | 6 lines
Modified profiling script to have different number of NCYC points per frequency.
This is to complicate the data, so any errournous reshaping of data is discovered.
It is expected, that experiments can have different number of NCYC points per spectrometer frequency.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23723 | tlinnet | 2014-06-07 21:43:19 +0200 (Sat, 07 Jun 2014) | 55 lines
Initial try to alter the target function calc_CR72_chi2.
This is the first test to restructure the arrays, to allow for higher dimensional computation.
All numpy arrays have to have same shape to allow to multiply together.
The dimensions should be [ei][si][mi][oi][di]. [Experiment][spins][spec. frq][offset][disp points].
This is complicated with number of disp point can change per spectrometer frequency.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
This implementation brings a high overhead.
The first test shows no winning of time.
The creation of arrays takes all the time.
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)
3000 0.267 0.000 0.313 0.000 cr72.py:100(r2eff_CR72)
1000 0.056 0.000 0.434 0.000 relax_disp.py:456(calc_CR72_chi2)
3000 0.045 0.000 0.061 0.000 chi2.py:32(chi2)
100 spins:
ncalls tottime percall cumtime percall filename:lineno(function)
300000 26.315 0.000 30.771 0.000 cr72.py:100(r2eff_CR72)
1000 5.498 0.005 42.660 0.043 relax_disp.py:456(calc_CR72_chi2)
300000 4.438 0.000 6.021 0.000 chi2.py:32(chi2)
TESTING
1 spin:
ncalls tottime percall cumtime percall filename:lineno(function)
19013 0.278 0.000 0.278 0.000 {numpy.core.multiarray.array}
1000 0.191 0.000 0.777 0.001 relax_disp.py:457(calc_CR72_chi2)
1000 0.147 0.000 0.197 0.000 cr72.py:101(r2eff_CR72)
3000 0.044 0.000 0.061 0.000 chi2.py:32(chi2)
100 spins:
ncalls tottime percall cumtime percall filename:lineno(function)
1504904 25.215 0.000 25.215 0.000 {numpy.core.multiarray.array}
1000 17.261 0.017 51.180 0.051 relax_disp.py:457(calc_CR72_chi2)
300000 4.637 0.000 6.310 0.000 chi2.py:32(chi2)
........
r23724 | tlinnet | 2014-06-07 21:43:21 +0200 (Sat, 07 Jun 2014) | 4 lines
Temporary changed the lib/dispersion/cr72.py function to unsafe state.
This change turns-off all the safety measures, since they have to be re-implemented
for higher dimensional structures.
........
r23725 | tlinnet | 2014-06-07 22:36:00 +0200 (Sat, 07 Jun 2014) | 71 lines
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)
........
r23726 | tlinnet | 2014-06-07 23:18:15 +0200 (Sat, 07 Jun 2014) | 3 lines
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.
........
r23727 | tlinnet | 2014-06-07 23:18:18 +0200 (Sat, 07 Jun 2014) | 3 lines
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.
........
r23728 | tlinnet | 2014-06-08 13:14:34 +0200 (Sun, 08 Jun 2014) | 5 lines
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.
........
r23729 | tlinnet | 2014-06-08 13:14:36 +0200 (Sun, 08 Jun 2014) | 31 lines
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)
........
r23730 | tlinnet | 2014-06-08 13:14:38 +0200 (Sun, 08 Jun 2014) | 5 lines
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.
........
r23731 | tlinnet | 2014-06-08 19:48:23 +0200 (Sun, 08 Jun 2014) | 6 lines
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.
........
r23732 | tlinnet | 2014-06-08 19:48:25 +0200 (Sun, 08 Jun 2014) | 7 lines
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.
........
r23733 | tlinnet | 2014-06-08 19:48:27 +0200 (Sun, 08 Jun 2014) | 8 lines
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.
........
r23734 | tlinnet | 2014-06-08 19:48:29 +0200 (Sun, 08 Jun 2014) | 3 lines
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.
........
r23735 | tlinnet | 2014-06-08 19:48:31 +0200 (Sun, 08 Jun 2014) | 9 lines
Important fix for the creation of the multi dimensional pA numpy array.
It should be created as numpy.zeros([ei][si][mi][oi]) instead of numpy.ones([ei][si][mi][oi]).
This allows for rapid testing of all dimensions with np.allclose(pA, numpy.ones(dw.shape)).
pA can have missing filled out values, when the number of dispersion points are different
per spectrometer frequency.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23736 | tlinnet | 2014-06-08 19:48:33 +0200 (Sun, 08 Jun 2014) | 18 lines
Added unit tests demonstrating edge cases 'no Rex' failures of the model 'CR72 full', for a clustered multi dimensional calculation.
This is implemented for one field.
This is to implement catching of math domain errors, before they occur.
These tests cover all parameter value combinations which result in no exchange:
- dw = 0.0,
- pA = 1.0,
- kex = 0.0,
- dw = 0.0 and pA = 1.0,
- dw = 0.0 and kex = 0.0,
- pA = 1.0 and kex = 0.0,
- dw = 0.0, pA = 1.0, and kex = 0.0.
- kex = 1e5,
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23737 | tlinnet | 2014-06-08 19:48:35 +0200 (Sun, 08 Jun 2014) | 7 lines
Re-implemented safety checks in lib/dispersion/cr72.py.
This is now implemented for both rank-1 float array and of higher dimensions.
This makes the unit tests pass for multi dimensional computing.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23738 | tlinnet | 2014-06-08 19:48:37 +0200 (Sun, 08 Jun 2014) | 17 lines
Added unit tests demonstrating edge cases 'no Rex' failures of the model 'CR72 full', for a clustered multi dimensional calculation.
This is implemented for three fields.
This is to implement catching of math domain errors, before they occur.
These tests cover all parameter value combinations which result in no exchange:
- dw = 0.0,
- pA = 1.0,
- kex = 0.0,
- dw = 0.0 and pA = 1.0,
- dw = 0.0 and kex = 0.0,
- pA = 1.0 and kex = 0.0,
- dw = 0.0, pA = 1.0, and kex = 0.0.
- kex = 1e5,
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23739 | tlinnet | 2014-06-08 19:48:38 +0200 (Sun, 08 Jun 2014) | 5 lines
Changed that special numpy structure is also created for "CR72".
This makes most system tests pass.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23740 | tlinnet | 2014-06-08 22:22:22 +0200 (Sun, 08 Jun 2014) | 5 lines
Critical fix for the slicing of values in target function.
This makes system test: Relax_disp.test_sod1wt_t25_to_cr72 pass.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23741 | tlinnet | 2014-06-08 22:22:24 +0200 (Sun, 08 Jun 2014) | 6 lines
Added self.has_missing keyword in initialization of the Dispersion class.
This is to test once, per spin or cluster.
This saves a looping over the dipsersion points, when collection the data.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
r23742 | tlinnet | 2014-06-08 22:22:26 +0200 (Sun, 08 Jun 2014) | 6 lines
Created multi dimensional error and value numpy arrays.
This is to calculate the chi2 sum much faster.
Reordered the loop over missing data points, so it is only iniatiated if missing points is detected.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
........
|
2014-07-22 16:50:50
|
Tree
|
[r24652]
by
bugman
Initialized merge tracking via "svnmerge" with revisions "1-23718" from
svn+ssh://bugman@.../svn/relax/branches/disp_spin_speed
|
2014-07-22 16:37:02
|
Tree
|
[r24651]
by
bugman
Merged revisions 24638 via svnmerge from
svn+ssh://bugman@.../svn/relax/trunk
........
r24638 | bugman | 2014-07-22 17:06:47 +0200 (Tue, 22 Jul 2014) | 6 lines
Modified the align_tensor.init user function so that the parameters are now optional.
This allows alignment tensors to be initialised without specifying the parameter values for that
tensor.
........
|
2014-07-22 16:35:26
|
Tree
|
[r24650]
by
tlinnet
Comment space fixing in target_functions/relax_disp.py.
Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.
|
2014-07-22 16:21:20
|
Tree
|