Hanging during large parallel processing tasks.

조회 수: 14 (최근 30일)
Damien Watson
Damien Watson 2023년 3월 2일
답변: Swaraj 2023년 3월 9일
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?

답변 (1개)

Swaraj
Swaraj 2023년 3월 9일
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.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by