Author: bugman Date: Tue Jul 22 19:21:35 2014 New Revision: 24662 URL: http://svn.gna.org/viewcvs/relax?rev=24662&view=rev Log: Merged revisions 24265-24266,24270-24278,24280-24283,24285-24308,24315,24319-24320 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/disp_spin_speed ........ r24265 | tlinnet | 2014-06-24 10:43:06 +0200 (Tue, 24 Jun 2014) | 3 lines Modified profiling script for NS R1rho 3site, to be functional. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24266 | tlinnet | 2014-06-24 10:46:17 +0200 (Tue, 24 Jun 2014) | 3 lines Modified profiling script for ns r1rho 3site linear to be functional. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24270 | tlinnet | 2014-06-24 11:15:43 +0200 (Tue, 24 Jun 2014) | 3 lines Removed un-used imports in profiling scripts for NS r1rho 3site. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24271 | bugman | 2014-06-24 13:46:59 +0200 (Tue, 24 Jun 2014) | 6 lines Added a relaxation dispersion model profiling log file for relax version 3.1.3 vs. 3.1.2 vs. 3.1.1. This is the output from the dispersion model profiling master script. It shows that there are no major speed differences between these relax versions. ........ r24272 | bugman | 2014-06-24 13:52:19 +0200 (Tue, 24 Jun 2014) | 5 lines Added the system information printout to the dispersion model profiling master script output. This is for the log files comparing one version of relax to the previous version. ........ r24273 | tlinnet | 2014-06-24 14:17:59 +0200 (Tue, 24 Jun 2014) | 3 lines Added profiling script for model mmq cr72, Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24274 | tlinnet | 2014-06-24 14:18:03 +0200 (Tue, 24 Jun 2014) | 5 lines Fix for the replacement value for invalid values in model MMQ CR72. The value was set to use r20, but should instead be 1e100. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24275 | tlinnet | 2014-06-24 14:20:31 +0200 (Tue, 24 Jun 2014) | 3 lines Copied profiling script from mmq cr72, to ns mmq 2site and 3site. ........ r24276 | tlinnet | 2014-06-24 14:22:23 +0200 (Tue, 24 Jun 2014) | 3 lines Copied profiling script to ns mmq 3site linear. ........ r24277 | tlinnet | 2014-06-24 14:32:23 +0200 (Tue, 24 Jun 2014) | 3 lines Implemented profiling script for NS MMQ 2SITE. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24278 | tlinnet | 2014-06-24 14:46:29 +0200 (Tue, 24 Jun 2014) | 3 lines Implemented profiling script for ns mmq 3site and 3site linear. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24280 | tlinnet | 2014-06-24 14:58:07 +0200 (Tue, 24 Jun 2014) | 3 lines Speeded up model NS CPMG 2site star, by moving the forming of the propagator matrix out of the for loops, and preform it. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24281 | bugman | 2014-06-24 15:04:47 +0200 (Tue, 24 Jun 2014) | 6 lines Added a relaxation dispersion model profiling log file for relax version 3.1.4 vs. 3.1.3. This is the output from the dispersion model profiling master script. It shows that there are no speed differences. ........ r24282 | tlinnet | 2014-06-24 15:27:51 +0200 (Tue, 24 Jun 2014) | 3 lines Speeded up ns mmq 2site, by moving the forming of evolution matrix out of the for loops, and preform it. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24283 | tlinnet | 2014-06-24 15:36:01 +0200 (Tue, 24 Jun 2014) | 3 lines Speeded up ns mmq 3site, by moving the forming of evolution matrix out of the for loops, and preform it. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24285 | bugman | 2014-06-24 16:30:19 +0200 (Tue, 24 Jun 2014) | 6 lines Added a relaxation dispersion model profiling log file for relax version 3.1.5 vs. 3.1.4. This is the output from the dispersion model profiling master script. It shows that there are no speed differences. ........ r24286 | tlinnet | 2014-06-24 16:35:01 +0200 (Tue, 24 Jun 2014) | 3 lines Speeded up ns r1rho 2site, by preforming the evolution matrices, and the M0 matrix in the init part of the target function. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24287 | tlinnet | 2014-06-24 16:35:05 +0200 (Tue, 24 Jun 2014) | 3 lines Speeded up ns r1rho 3site, by preforming the evolution matrices, and the M0 matrix in the init part of the target function. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24288 | bugman | 2014-06-24 17:06:45 +0200 (Tue, 24 Jun 2014) | 6 lines Expanded the dispersion model profiling master script to cover all the new profiling scripts. This includes all 3-site and MMQ models. The list is now complete and covers all models. The only model not included in 'M61 skew' which has redundant parameters and is not optimisable anyway. ........ r24289 | bugman | 2014-06-24 17:47:53 +0200 (Tue, 24 Jun 2014) | 7 lines Added a relaxation dispersion model profiling log file for relax version 3.1.6 vs. 3.1.5. This is the output from the dispersion model profiling master script. It shows that there are almost no speed differences, except for a slight decrease in speed in the 'CR72 full' model for single spins. ........ r24290 | tlinnet | 2014-06-25 02:14:22 +0200 (Wed, 25 Jun 2014) | 3 lines Split systemtest test_tp02_data_to_ns_r1rho_2site into a setup and test part. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24291 | tlinnet | 2014-06-25 02:14:29 +0200 (Wed, 25 Jun 2014) | 3 lines Implemented a clustered version of systemtest test_tp02_data_to_ns_r1rho_2site. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24292 | tlinnet | 2014-06-25 02:14:32 +0200 (Wed, 25 Jun 2014) | 6 lines Inserted an extremely interesting development in NS R1rho 2site. If one do a transpose of M0, one can calculate all the matrix evolutions in the start via numpy einsum. Since M0 is in higher a dimensions, one should not do a numpy transpose, but swap/roll the outer M0 6x1 axis. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24293 | tlinnet | 2014-06-25 02:14:34 +0200 (Wed, 25 Jun 2014) | 5 lines Shortened the code dramatically for NS R1rho 2site. It is possible to calculate all in "one" go, after having the trasposer/rolled-back M0 magnetization. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24294 | tlinnet | 2014-06-25 02:14:36 +0200 (Wed, 25 Jun 2014) | 7 lines Speeded up the code of NS r1rho 2site. This was essential done to numpy einsum, and doing the dot operations in multiple dimensions. It was though necessary to realize, that to do the proper dot product operations, the outer two axis if M0 should be swapped, by rolling the outer axis one back. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24295 | tlinnet | 2014-06-25 02:14:38 +0200 (Wed, 25 Jun 2014) | 7 lines Speeded up the code of NS r1rho 3site. This was essential done to numpy einsum, and doing the dot operations in multiple dimensions. It was though necessary to realize, that to do the proper dot product operations, the outer two axis if M0 should be swapped, by rolling the outer axis one back. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24296 | tlinnet | 2014-06-25 02:14:40 +0200 (Wed, 25 Jun 2014) | 3 lines Removed un-used import of rollaxis in ns r1rho 2site. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24297 | tlinnet | 2014-06-25 02:14:42 +0200 (Wed, 25 Jun 2014) | 5 lines For model NS CPMG 2site 3d, the M0 matrix was preformed for higher dimensionality in init of target function. The transposes/rolled axis versions was also initiated. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24298 | tlinnet | 2014-06-25 02:14:43 +0200 (Wed, 25 Jun 2014) | 5 lines Swapped the dot product position, when propagating the magnetisation in model NS CPMG 2site 3D. This it to try to align to same method as in NS R1rho 2site. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24299 | tlinnet | 2014-06-25 02:14:45 +0200 (Wed, 25 Jun 2014) | 3 lines Lowered the looping in NS CPMG 2site 3D, by preforming the inital dot product. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24300 | tlinnet | 2014-06-25 02:14:46 +0200 (Wed, 25 Jun 2014) | 3 lines Speeded up ns cpmg 2site 3d, by preforming the magnetisation. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24301 | tlinnet | 2014-06-25 02:14:48 +0200 (Wed, 25 Jun 2014) | 23 lines Got rid of the inner evolution of the magnetization. If the looping over the number of CPMG elements is given by the index l, and the initial magnetization has been formed, then the number of times for propagation of magnetization is l = power_si_mi_di-1. If the magnetization matrix "Mint" has the index Mint_(i,k) and the evolution matrix has the index Evol_(k,j), i=1, k=7, j=7 then the dot product is given by: Sum_{k=1}^{k} Mint_(1,k) * Evol_(k,j) = D_(1, j). The numpy einsum formula for this would be: einsum('ik,kj -> ij', Mint, Evol) Following evolution will be: Sum_{k=1}^{k} D_(1, j) * Evol_(k,j) = Mint_(1,k) * Evol_(k,j) * Evol_(k,j). We can then realize, that the evolution matrix can be raised to the power l. Evol_P = Evol**l. It will then be: einsum('ik,kj -> ij', Mint, Evol_P) - Get which power to raise the matrix to. l = power_si_mi_di-1 - Raise the square evolution matrix to the power l. evolution_matrix_T_pwer_i = matrix_power(evolution_matrix_T_i, l) Mint_T_i = dot(Mint_T_i, evolution_matrix_T_pwer_i) or Mint_T_i = einsum('ik,kj -> ij', Mint_T_i, evolution_matrix_T_pwer_i) Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24302 | tlinnet | 2014-06-25 02:14:50 +0200 (Wed, 25 Jun 2014) | 10 lines Tried to implement using lib.linear_algebra.matrix_power.square_matrix_power instead of matrix_power from numpy in NS CPMG 2site 3d. Strangely, then systemtest: test_hansen_cpmg_data_to_ns_cpmg_2site_3D_full starts to fail! This is very weird. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24303 | tlinnet | 2014-06-25 02:14:52 +0200 (Wed, 25 Jun 2014) | 5 lines Changes to unit test of NS CPMG 2site 3D. This is after the new initiated M0 matrix in init of target function. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24304 | tlinnet | 2014-06-25 03:41:00 +0200 (Wed, 25 Jun 2014) | 3 lines Double speed in NS CPMG 2site star, after using numpy.linalg.matrix_power instead of the lib version in relax. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24305 | tlinnet | 2014-06-25 03:41:02 +0200 (Wed, 25 Jun 2014) | 3 lines Triple speed in NS MMQ 2site, after using numpy.linalg.matrix_power instead of the lib version in relax. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24306 | tlinnet | 2014-06-25 03:41:04 +0200 (Wed, 25 Jun 2014) | 13 lines Small fix for making sure that power is a integer in ns mmq 2site. Following system tests was failing. - Relax_disp.test_korzhnev_2005_15n_dq_data - Relax_disp.test_korzhnev_2005_15n_sq_data - Relax_disp.test_korzhnev_2005_15n_zq_data - Relax_disp.test_korzhnev_2005_1h_sq_data - Relax_disp.test_korzhnev_2005_all_data - Relax_disp.test_korzhnev_2005_all_data_disp_speed_bug They should already be integers, but is now solved. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24307 | tlinnet | 2014-06-25 03:41:05 +0200 (Wed, 25 Jun 2014) | 3 lines Comment and spell fixing in NS CPMG 2site 3d. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24308 | tlinnet | 2014-06-25 03:41:07 +0200 (Wed, 25 Jun 2014) | 3 lines Triple speed in NS MMQ 3site, after using numpy.linalg.matrix_power instead of the lib version in relax. Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis. ........ r24315 | bugman | 2014-06-25 13:23:16 +0200 (Wed, 25 Jun 2014) | 9 lines Updated the dispersion model profiling comparison of the disp_spin_speed branch vs. relax-3.2.2. This is for the current revision r24314 and now includes all dispersion models. This shows the large speed increases in the numeric and MMQ models recently obtained. Note that something went wrong with the 'NS CPMG 2-site 3D full' model for the clustered analysis, most times were around 24 seconds except for the first which was strangely 292 seconds. ........ r24319 | bugman | 2014-06-25 17:04:00 +0200 (Wed, 25 Jun 2014) | 7 lines Updated the relaxation dispersion model profiling log file for relax version 3.2.2 vs. 3.2.1. This adds the MMQ and 3-site models to the log file. The new information shows that there was a 4.2 times speed up for the 'MMQ CR72' model between these two relax versions, both for single spins and clustered spins, a much greater improvement than any other of the models. ........ r24320 | bugman | 2014-06-25 17:08:54 +0200 (Wed, 25 Jun 2014) | 7 lines Removed the now redundant disp_profile_all_3.2.2.table.txt dispersion model profiling table. As the dispersion model profiling master script now covers all dispersion models, the output from this script produces this table exactly. Therefore the end of the log files saved from running this script contains this table. ........ Added: trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.1.2_vs_3.1.1.log - copied unchanged from r24320, branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.1.2_vs_3.1.1.log trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.1.3_vs_3.1.2.log - copied unchanged from r24320, branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.1.3_vs_3.1.2.log trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.1.4_vs_3.1.3.log - copied unchanged from r24320, branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.1.4_vs_3.1.3.log trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.1.5_vs_3.1.4.log - copied unchanged from r24320, branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.1.5_vs_3.1.4.log trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.1.6_vs_3.1.5.log - copied unchanged from r24320, branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.1.6_vs_3.1.5.log trunk/test_suite/shared_data/dispersion/profiling/profiling_ns_mmq_2site.py - copied unchanged from r24320, branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_ns_mmq_2site.py trunk/test_suite/shared_data/dispersion/profiling/profiling_ns_mmq_3site.py - copied unchanged from r24320, branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_ns_mmq_3site.py trunk/test_suite/shared_data/dispersion/profiling/profiling_ns_mmq_3site_linear.py - copied unchanged from r24320, branches/disp_spin_speed/test_suite/shared_data/dispersion/profiling/profiling_ns_mmq_3site_linear.py Removed: trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.2.2.table.txt Modified: trunk/ (props changed) trunk/lib/dispersion/mmq_cr72.py trunk/lib/dispersion/ns_cpmg_2site_3d.py trunk/lib/dispersion/ns_cpmg_2site_star.py trunk/lib/dispersion/ns_mmq_2site.py trunk/lib/dispersion/ns_mmq_3site.py trunk/lib/dispersion/ns_r1rho_2site.py trunk/lib/dispersion/ns_r1rho_3site.py trunk/target_functions/relax_disp.py trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all.py trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.1.7_vs_3.1.6.log trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.2.1_vs_3.2.0.log trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.2.2.log trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all_3.2.2_vs_3.2.1.log trunk/test_suite/shared_data/dispersion/profiling/profiling_mmq_cr72.py trunk/test_suite/shared_data/dispersion/profiling/profiling_ns_r1rho_3site.py trunk/test_suite/shared_data/dispersion/profiling/profiling_ns_r1rho_3site_linear.py trunk/test_suite/system_tests/relax_disp.py trunk/test_suite/unit_tests/_lib/_dispersion/test_ns_cpmg_2site_3d.py [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/lib/dispersion/mmq_cr72.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/dispersion/mmq_cr72.py?rev=24662&r1=24661&r2=24662&view=diff Modified: trunk/lib/dispersion/ns_cpmg_2site_3d.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/dispersion/ns_cpmg_2site_3d.py?rev=24662&r1=24661&r2=24662&view=diff Modified: trunk/lib/dispersion/ns_cpmg_2site_star.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/dispersion/ns_cpmg_2site_star.py?rev=24662&r1=24661&r2=24662&view=diff Modified: trunk/lib/dispersion/ns_mmq_2site.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/dispersion/ns_mmq_2site.py?rev=24662&r1=24661&r2=24662&view=diff Modified: trunk/lib/dispersion/ns_mmq_3site.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/dispersion/ns_mmq_3site.py?rev=24662&r1=24661&r2=24662&view=diff Modified: trunk/lib/dispersion/ns_r1rho_2site.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/dispersion/ns_r1rho_2site.py?rev=24662&r1=24661&r2=24662&view=diff Modified: trunk/lib/dispersion/ns_r1rho_3site.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/dispersion/ns_r1rho_3site.py?rev=24662&r1=24661&r2=24662&view=diff Modified: trunk/target_functions/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/target_functions/relax_disp.py?rev=24662&r1=24661&r2=24662&view=diff Modified: trunk/test_suite/shared_data/dispersion/profiling/disp_profile_all.py [... 32 lines stripped ...]