Problem Description
The error "Out of Memory" occurs.
Solution
Of the available memory (RAM and virtual memory), one section, the Java heap, is reserved for Java. The rest of the memory will be available for meshing and solving. If you receive the Out of Memory error, try to increase the Java heap.
Open the comsol.ini
file located in the subdirectory bin/$arch
in the COMSOL installation directory, where $arch
corresponds to the platform you are using. Modify the number in the row that starts with -Xmx
, its value is the Java heap size. If you have enough RAM, try doubling the size. By default, this value is -Xmx2g
, so doubling it will give the line -Xmx4g
for a 64-bit platform. Repeat this for all *.ini
files in the same directory. For the LiveLink for MATLAB in particular, set -Xmx4g
in the file comsolmphserver.ini
.
If you are running out of memory when using LiveLink for MATLAB then adjust the values for MATLAB by opening the MATLAB Settings. Navigate to this section: MATLAB->General->Java Runtime Environment
and make the adjustment and restart MATLAB.
If you do not have write permission to the bin/$arch
directory, you can instead try the following:
- Copy the
comsol.ini
file to a folder where you have write permission. - Open the file and modify it according to the instructions above.
- When you launch COMSOL, add the option
-comsolinifile [path]
to the COMSOL command, where [path] is the path to your newcomsol.ini
file.
See also:
COMSOL は, 本ページに掲載されている情報の確認に合理的な努力を払っております. リソースおよびドキュメントは情報提供のみを目的としており, COMSOL はその有効性について明示的または黙示的な保証を行いません. 開示されたデータの正確性について, COMSOL は法的責任を負いません. 本文書で言及されている商標はすべて, それぞれの所有者に帰属します. 商標に関する詳細は, 製品マニュアルをご参照ください.