Menu

SVN archive Commit Log


Commit Date  
[r24171] by tlinnet

Moved the costly calculation of the matrix exponential out of for loops.

It was the numpy.eig and numpy.inv which was draining power.

This speeds up model NS R1rho 2site, by a factor 4X:
BEFORE:
Single:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 32.552 32.552 <string>:1(<module>)
1 0.002 0.002 32.552 32.552 pf_nsr1rho2site:530(single)
Cluster:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 33.307 33.307 <string>:1(<module>)
1 0.008 0.008 33.307 33.307 pf_nsr1rho2site:554(cluster)

AFTER:
Single:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 8.286 8.286 <string>:1(<module>)
1 0.002 0.002 8.286 8.286 pf_nsr1rho2site:530(single)
Cluster:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 8.223 8.223 <string>:1(<module>)
1 0.007 0.007 8.223 8.223 pf_nsr1rho2site:554(cluster)

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

2014-06-19 18:52:57 Tree
[r24170] by tlinnet

Fix to the matrix_exponential_rankN, to return the exact exponential for any higher dimensional square matrix
of shape [NE][NS][NM][NO][ND][X][X].

The fix was to the eye(X), to make the shape the same as the input shape.

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

2014-06-19 18:52:55 Tree
[r24169] by tlinnet

Made the function use the new multidimensional R_mat matrix.

Systemtest: test_tp02_data_to_ns_r1rho_2site
still passes.

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

2014-06-19 18:52:53 Tree
[r24168] by tlinnet

Added a check, that the pre- relax_time multiplied multidimensional array, equal the previous.

It does, to the sum of 1.0e-13.

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

2014-06-19 18:52:51 Tree
[r24167] by tlinnet

Added the relax_time to collection of rr1rho_3d_rankN matrix collection.

This is to pre-multiply all elements with the time.

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

2014-06-19 18:52:49 Tree
[r24166] by tlinnet

Added a check in lib/dispersion/ns_r1hro_2site.py, to see if the newly created multidimensional
ns matrix of rank NE][NS][NM][NO][ND][6][6], is equal to the previous [6][6] matrix.

It is.

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

2014-06-19 18:17:49 Tree
[r24165] by tlinnet

Added the ns matrice, rr1rho_3d_rankN, to collect the multi dimensional 3D exchange matrix, of rank [NE][NS][NM][NO][ND][6][6].

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

2014-06-19 18:17:47 Tree
[r24164] by tlinnet

Changed back from einsum to dot method, since dot method it faster for square matrixes.

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

2014-06-19 15:42:28 Tree
[r24163] by tlinnet

Replaced the inner dot product with numpy einsum.

This though slows it down from 8.5 s to 13 s.
This is only as an intermediate step, how to figure to dot product inner parts of the big matrix.

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

2014-06-19 15:42:25 Tree
[r24162] by tlinnet

Removed unused variables in NS CPMG 2site 3D, to clean up the code.

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

2014-06-19 15:42:23 Tree
Older >
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.