MATLAB Answers

0

MATLAB performance very slow on computing cluster compared to local machine

Asked by Nicholas Blauch on 12 Apr 2019
Latest activity Edited by Matt J
on 12 Apr 2019
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

Many questions.
What code is being run? What data is being transfered to the cluster and how often? How are you controlling the number of cores used, both on your laptop and on the cluster? What are the differences in CPUs on the laptop/cluster?
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.
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.

0 Answers