MATLAB memory/swap issue on Linux (Mint)

5 次查看(过去 30 天)
Hi,
I keep running into problems with MATLAB under Linux Mint when using swap. A few weeks ago, I had problems with this on Ubuntu using en encrypted swap partition. As soon as MATLAB was tapping into the swap, the system would crash completely which was apparently an OS-bug. After having moved the swap to a non-encrypted partition everything worked fine until a few days ago. I also used this as an opportunity to move finally move from Ubuntu to Linux Mint.
A few days ago, I started running into similar problems as before:
- My machine has 32GB RAM and a swap file with 32 GB. No other applications running in the background.
- I'm running memory-intensive computations in MATLAB (2017b), so that I have to use swap at some point. As soon as the physical memory is full, MATLAB goes into the swap, usually for about 4.8 GB so there should be plenty of swap space available.
- Long before the swap is exhausted, MATLAB either crashes the system or aborts with an out of memory error. I haven't been able to figure out when MATLAB crashes and when it aborts regularly with an OOM error. Somehow it seems like it tends to crash when running from the command line, and throwing an error without crashing when running through the GUI.
- Two things that relate to my earlier problem are confusing me. First, the exact same code with exactly the same data worked on this machine until a few days ago. I did a couple of the minor updates that Mint was recommending (maybe that was a mistake...), but I'm not aware of any changes that I could have made to the system. Second, the same code with the same data works without any problems on my MacBookPro with only 16 GB RAM.
- In the course of trying to figure out what's going on, I checked my swap file using sudo blkid | grep swap and I get the following:
/dev/nvme0n1p3: UUID="408f5b6b-511b-4ddb-bb57-dd28b288940b" TYPE="swap" PARTUUID="18e139bf-0b5c-42f3-a76e-d6f3df840fd5" /dev/mapper/cryptswap1: UUID="b29ec891-44aa-48ae-82da-c9594ff7265e" TYPE="swap"
Does the cryptswap1 indicate that I have an encrypted swap that might still be causing problems? I'm not aware of ever having created this.
I'd be very grateful for any suggestions or ideas. Thank you!
  1 个评论
Jonas
Jonas 2023-3-21
Have you found any solution, because it seems like I have the same problem

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by