MATLAB performance very slow on computing cluster compared to local machine

10 views (last 30 days)
Hi. I have found that MATLAB is much slower on a computing cluster than on my local machine for statistical analysis of brain data. This is not a general issue of the cluster, as I do not have this problem when using Python for similar types of analyses.
I am seeing 62x slowdown for a particular analysis. This is both when I parallelize the code and when I do not. To be more specific, one iteration of this analysis takes ~22 mins to run on 1 core on my laptop, versus estimated 23 hours on the cluster. With 12 cores on the cluster, I see roughly 12x speedup to estimated 2 hrs, which is still much longer than the time for 1 core on my laptop.
Our cluster administrator does not know what the source of this issue could be, so I would like to ask the MATLAB experts directly if there is anything you might suspect could be causing this issue.
Thank you
Nick
  3 Comments
Nicholas Blauch
Nicholas Blauch on 12 Apr 2019
Hi Matt, thanks for your response.
-code is essentially a monte carlo simulation to assess significance of brain activity classification results
-no data transfer. data is available directly on cluster
-using parpool to control the number of cores
-not sure of the differences in CPUs but I am positive it is not 64x or even 2x. I suspect my laptop core's are slightly faster.
Matt J
Matt J on 12 Apr 2019
Edited: Matt J on 12 Apr 2019
Note that creating a parpool with one worker is not the same as shutting off all but one core. Matlab's internal parallelization is still active, so any multithreaded commands in the body of the loop will still make use of the multiple cores. More generally, the number of parpool workers and the number of active cores are unrelated.
It is still not clear to me what you are doing on the cluster. What is the configuration (how many cluster computers, how many cores on each computer) that produces 23hr runtime and what is changed to lower that time to 2 hrs.?

Sign in to comment.

Answers (0)

Categories

Find more on Parallel Computing Fundamentals in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!