From: Holger on 4 Aug 2010 12:52 Dear all, I just upgraded to a Windows 7 64 bit box, multicore, 6GB. I installed the 32 bit as well as the 64 bit version of Matlab 2008b (I'm currently stuck with this version). I checked that both versions are actually able to use multithreading using the following code, which led to the use of 4 cores: a = rand(40000,1); for k=1:20000; b=log(a); end Now I let my real world code (pure Matlab) run on both versions: 1.) The 64 bit version make much less use of multithreading. The exact same code runs in the 32 Bit Matlab on 4 cores, and on the 64 bit Matlab only on 1 core. 2.) For some reason, there is not that much of a speed difference. Both Matlab versions take about the same amount of time running that code. The code is complex and it's hard to provide a good minimized example illustrating these effects. But for example, I'm using fmincon, which should gain a lot from multithreading since the computation of the derivatives can be computed in parallel, does not get much slower on the 64 bit Matlab, although it just uses one core. This also holds similarly for other functions I use, for example lsqnonlin. What is going on here? Can somebody tell me more about this behavior? Thanks in advance... What is going on here?
From: Jules on 6 Aug 2010 07:53 I'm having a very similar problem. The 64 bit version of Matlab uses less cores than the 32 Bit version. PS: Matlab 2009a, Parallel Computing Toolkit is NOT installed
From: Jan Simon on 6 Aug 2010 08:40 Dear Holger, > But for example, I'm using fmincon, which should gain a lot from multithreading since the computation of the derivatives can be computed in parallel, does not get much slower on the 64 bit Matlab, although it just uses one core. I do not know the answer and I do not have access to a 64 bit version. But this statement sounds suspicious: Matlab is not slower although just one core is used?! What happens, if you start 2 Matlab instances and solve the problem twice ate the same time? Do you have still the same processing time and two cores used?? My impression is, that there is a problem with the display of the core-usage -- or that the processed problem needs so much memory that almost the complete computational time is spent for disk-swapping. Kind regards, Jan
From: Holger on 6 Aug 2010 12:30 Thanks for your answer, Jan. My input data consists of audio files, usually below 50 MB. Therefore, there is no problem running several matlab instances on different input files simultaneously. If I do this I get a speedup, until my CPU cores are maxed out, i.e. if I start three instances it takes roughly the same amount of time to complete all three, then it would take just to complete one instance (using the 64 Bit Matlab). It's a little slower, but not significantly slower (perhaps because of the memory overhead). I read somewhere, that Matlab uses some nifty rules to decide whether it's a good idea to start something in parallel or not (also considering overhead for the data separation and thread creation). However, I don't know why there is such a difference between the 32 Bit and the 64 Bit version.
|
Pages: 1 Prev: Structural arrays to animation Next: mXCreateNumericArray (Crashing program) |