--
You received this message because you are subscribed to the Google Groups "OPTI Toolbox Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opti-toolbox-forum+unsub...@googlegroups.com.
To post to this group, send email to opti-toolbox-forum@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks so much for your time.
In case someone is interested, i have actually ran few tests to compare the four following scenarios
MKLTRNLS nativly and measure the running timefsolve without any sparse Jacobin optimizationfsolve and explicitly provide the Jacobin [not the pattern but the functions that evaluate it] and use the parallel Jacobin evaluator used in the Matlab optimization toolboxI am using the Extended Powell singular function taken from [1] with 4000 unknowns and here are the results
For 1
I have manipulated the code at the examples provided and increased n = 4000; m=4000; it took almost 14 seconds for the code to obtain the roots
For 2
It took almost 70 seconds to execute the Matlab implementation of the function
function [F, J] = ex_pow(x) n=length(x); F=zeros(1,length(x)); i=1:1:(length(x)/4); F(4 * i - 3) = x(4 * i - 3) + 10.0 * x(4 * i - 2); F(4 * i - 2) = 2.2360679774998 * (x(4 * i - 1) - x(4 * i)); F(4 * i - 1) = (x(4 * i - 2) - 2.0 * x(4 * i - 1)) .* (x(4 * i - 2) - 2.0 * x(4 * i - 1)); F(4 * i) = 3.1622776601684 * (x(4 * i - 3) - x(4 * i)) .* (x(4 * i - 3) - x(4 * i)); %The Jacobian part if nargout > 1 c=1;C=sparse(4*i-3, 4*i-3,c,n,n); c=10;C1=sparse(4*i-3, 4*i-2,c,n,n); d=2.2360679774998;D=sparse(4*i-2, 4*i-1,d,n,n); d=-2.2360679774998;D1=sparse(4*i-2, 4*i,d,n,n); d=2*(x(4*i-2)-2*x(4*i-1));D2=sparse(4*i-1, 4*i-2,d,n,n); d=2*(x(4*i-2)-2*x(4*i-1))*(-2);D3=sparse(4*i-1, 4*i-1,d,n,n); d=3.1622776601684*2*(x(4*i-3)-2*x(4*i));D4=sparse(4*i, 4*i-3,d,n,n); d=-3.1622776601684*2*(x(4*i-3)-2*x(4*i));D5=sparse(4*i, 4*i,d,n,n); J=C+C1+D+D1+D2+D3+D4+D5; end
For 3
It took Matlab fsolve about 19 seconds to solve without any kind of optimization
For 4
Using the following options
It took Matlab 0.1 seconds to solve about 140x speedup !
Seems like Intel MKL does not support this kind of optimization for sparse problems [I have concluded this after reading on their website Does it?] They also don't support any kind of parallel optimization unlike Matlab
Thanks so much for your time.
In case someone is interested, i have actually ran few tests to compare the four following scenarios
- build
MKLTRNLSnativly and measure the running time- run the same function [with the Matlab implementation] over OPTI and measure the time
- run the same function using Matlab
fsolvewithout any sparse Jacobin optimization- run the same function using Matlab
fsolveand explicitly provide the Jacobin [not the pattern but the functions that evaluate it] and use the parallel Jacobin evaluator used in the Matlab optimization toolboxI am using the
Extended Powell singular functiontaken from [1] with4000unknowns and here are the results
For 1
I have manipulated the code at the examples provided and increased
n = 4000; m=4000;it took almost14seconds for the code to obtain the roots
For 2
It took almost
180seconds to execute the Matlab implementation of the function
Seems like
Intel MKLdoes not support this kind of optimization for sparse problem [I have concluded this after reading on their website Does it?] They also don't support any kind of parallel optimization unlike Matlab
Again, thanks so much for your time and this beautiful project.
To unsubscribe from this group and stop receiving emails from it, send an email to opti-toolbox-forum+unsubscribe@googlegroups.com.
To post to this group, send email to opti-tool...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.