Hanging during large parallel processing tasks.

14 Ansichten (letzte 30 Tage)
Damien Watson
Damien Watson am 2 Mär. 2023
Beantwortet: Swaraj am 9 Mär. 2023
When starting a large parallel processing task (each task takes >10mins, with >10 tasks to do in total), with one process for each thread (8), MATLAB intermittently hangs, becoming unresponsive and not making any progress with any of the tasks. During this time, in task manager, you can see all the CPU core usage dropping from ~100% to ~5% until MATLAB continues again, at which point the CPU usage goes back up to ~100%. Are there any known fixes for this, as it is slowing down the time to complete all the tasks?

Antworten (1)

Swaraj
Swaraj am 9 Mär. 2023
There are a few possible reasons why MATLAB may occasionally freeze during demanding parallel processing workloads. Here are some measures you can take to examine and perhaps resolve the problem:
  1. Examine your hardware: Ensure that the size and complexity of your processing work can be handled by the hardware you are using (CPU, Memory, etc.). MATLAB may be slowing down or hanging if you're running low on resources. If necessary, think about upgrading your hardware.
  2. Check your MATLAB code: Verify that your code is parallel processing-optimized and that you are utilising the proper tools and functions to benefit from multi-core processing. The built-in parallel computing tools in MATLAB, such as "parfor," "spmd," and "gpuArray," can help your code run more quickly.
  3. Update MATLAB: Make sure you're using the most recent version of MATLAB, as newer versions may include bug fixes or better parallel computing performance.
  4. Monitor system resources: Keep an eye on your system resources (CPU, RAM, disk usage, etc.) during your processing task. If you notice any spikes or drops in usage, this may be a sign of a bottleneck or other issue that is causing MATLAB to hang. Use MATLAB's built-in profiler to identify slow or inefficient code sections.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by