Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

mphinterp - Read data from model fails: Error in meshextend: GC overhead limit exceeded

Please login with a confirmed email address before reporting spam

Hello,

I have encountered an error which I can not explain myself. I am calculating multiple models one after another with Matlab and read out data at specific coordinates.

This is part of my Matlab-Script:
dc_model; % Define Parameters, Geometry and Mesh, save model
for n = 1:204
...some stuff....
name = ['Homo-Model-',num2str(e1),'-',num2str(e2)];
solve_model; % Open meshed model, define physics, solve and save as name.mph
model = mphload(name); % load model
for m = 1:8
....some stuff...
mod_Vp(n,m)=mphinterp(model,'V','coord',[420;150;0]);
end
end

This worked fine up to n = 201. For n = 202 I get the following error:
Error using mphinterp
Java exception occurred:
Exception:
java.lang.RuntimeException: Error in meshextend: GC overhead limit exceeded
(rethrown as com.comsol.util.exceptions.FlException)
(rethrown as com.comsol.util.exceptions.FlException)
Messages:
Error in meshextend: GC overhead limit exceeded
Old model cannot be reconstructed. Do Clear Solution to expunge
Error in meshextend: GC overhead limit exceede
Error in run_model (line 76)
mod_Vp(n,m)=mphinterp(model,'V','coord',[420;150;0]);


For some reason I cannot attach the model ("File size error"...)
I hope someone can help.

Thanks,
Sina

1 Reply Last Post May 26, 2016, 3:44 a.m. EDT
Lars Gregersen COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago May 26, 2016, 3:44 a.m. EDT
Hi

We have had problems with memory leaks in the past. These are fixed now so the easiest way to solve your problems is to upgrade to the latest version of Comsol.

Without seeing your full script it is hard to give really solid advice, but try to see if you code works without this line:
model = mphload(name); % load model

A good advice that works for any version of Comsol is not to create an empty model and set up the whole model in a loop. It is much more efficient to set up the model once and to change the parts that need to be changed.

--
Lars Gregersen
Comsol Denmark
Hi We have had problems with memory leaks in the past. These are fixed now so the easiest way to solve your problems is to upgrade to the latest version of Comsol. Without seeing your full script it is hard to give really solid advice, but try to see if you code works without this line: model = mphload(name); % load model A good advice that works for any version of Comsol is not to create an empty model and set up the whole model in a loop. It is much more efficient to set up the model once and to change the parts that need to be changed. -- Lars Gregersen Comsol Denmark

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.