Using Matlab 2012a under Windows 7..I wrote a code which includes one bottle nick at such line ....
K=zeros(Np,Np);
for i=1:ord
K=K+sparse(t(1:ord,:),repmat(t(i,:),ord,1),double(subs(Kv(:,i),Arg(Kv,1,1,6),Arg(Kv,1,2,6))),Np,Np);
end
%%%%
Note: Kv is symbolic matrix and Arg is a function that provides OLD and NEW and it uses a number of global variables.
Now, using Matlab 2013.. under ubuntu 12.04.. although the amount of memory consumed is much less but the execution time is extremely higher (80seconds became more than an hour)...why?
What am I missing??

댓글 수: 1

Jan
Jan 2013년 8월 2일
편집: Jan 2013년 8월 2일
What does this mean: "Arg provides OLD and NEW"?
Could you post a running piece of code, which reproduces the effect?

댓글을 달려면 로그인하십시오.

답변 (2개)

Jan
Jan 2013년 8월 1일

0 개 추천

You compare R2012a/Win with R2013a/Linux. Then different timings are expected. Please post, what "extremely higher" means.

댓글 수: 3

Waleed Khedr
Waleed Khedr 2013년 8월 1일
편집: Waleed Khedr 2013년 8월 1일
it is an algorithm .... so in terms of one iteration:
R2012/win: 80 seconds
R2013/Linux: an hour untill now and not finished.
Jan
Jan 2013년 8월 2일
편집: Jan 2013년 8월 2일
Does the profile reveal more details, e.g. if it is the repmat or the Arg() function?
The symbolic toolbox of the newer Matlab version might have substantially more power, with the drawback of needing much more time. The balance between power and run-time is always critical and known as a source for unexpected speed changes especially for symbolic maths.
Example: Two trains 1 and 2 start a travel from city A to B, which have a distance of 160 km. Train 2 runs faster than 1 and when it reaches B it (immediately) returns until it meets train 1 on the railroads again, then it changes the direction again and so on. Train 1 has a speed of 40 km/h, train 2 75 km/h. Which is the traveled distance of train 2 when both trains reach the destination B?
A maths student can find the solution with some calculus in several minutes, a pupil of the elementary school in some seconds.
So do you find corresponding explanations in the release notes? I do neither have the symbolic toolbox nor 2013a.
Waleed Khedr
Waleed Khedr 2013년 8월 2일
I made some tests actually ... and it seems to be "subs" command ....it goes very slow at some expressions ....Now the question is why "subs" goes slow ? is it something related to simplifications or assumptions?

댓글을 달려면 로그인하십시오.

Asguard1
Asguard1 2015년 12월 18일

0 개 추천

Did anyone find a resolution to this problem? We have several simulations which must run perform sparse matrix manipulations under 2013a and under windows we are find a significantly faster performance than under linux. THe Linux is x86_64 quad socket AMD w/ 64 cores, running at 3Ghz. The Windows 7 is a quad core Xenon x86_64. The ODE is also faster under the windoze, than the linux as well.

댓글 수: 1

Waleed Khedr
Waleed Khedr 2015년 12월 19일
unlike my case, you are using two different machines. You need to check the multi-threading capabilities of each first. As far as I remember, this problem had something to do with the syntax of the sparse command itself in 2013a, you may need to check every piece of your command through Matlab's help documentary. Try your command with 2012a or with a newer version as well.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

질문:

2013년 8월 1일

댓글:

2015년 12월 19일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by