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.

strange out of memory error

Please login with a confirmed email address before reporting spam

I'm solving a 3d eigenfrequency problem in the structural mechanics module of Femlab 3.1, which I use with Matlab 6.5. (Yes, its old, but it still works well, mostly.) It's on a Windows 2000 machine with 2GB memory.

I have a matlab function which, given a few parameters, computes the geometry of my object and gives it to femlab with heavy use of curve2, embed, and geomcoerce. The function then tells femlab to mesh and solve the structure, to save the fem structure and to return several computations based on postint.

The structure has a single subdomain, about 46000 mesh elements and 260000 degrees of freedom. It solves with the SPOOLES solver. And it works splendidly when I just call a single instance of my function.

The problem is when I try to get matlab to step through my parameters automatically. It will compute one or maybe two instances, but then I get an "Out of memory in eigenvalue solver" error.

This is different from most of the out-of-memory messages I see in the archives because I know that femlab can compute the structure, and it does when I do it one at a time by hand.

How can I get femlab/matlab to clear out their memories between computations?

I'm trying to do something like:

parameter_vector=1:10;
for p=parameter_vector;
values(p)=my_fem_function(p);
end;

1 Reply Last Post Apr 4, 2010, 2:35 a.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 4, 2010, 2:35 a.m. EDT
Hi

Indeed nothing bad with old versions and older OS so long they do the job, running after the last most up to date thing is also requesting quite some time and effort, that nobody is really ready to pay for, in fact we, the users, pay twice or even more: once for the purchase, once for the installation and then once for the new training (a good way to make money for certain), not to talk about the new bugs, in German they call it nicely "Schlimmverbesserungen".

So back to your issue, I can only give you my thoughs (as I have neither that version nor that OS running) I suspect a memory leakage or fragmentation issue, this can be in the OS, in matlab and/or in COMSOL. You could try to look into it with tools such as SYSINTERNALs processexplorer by Mark Russinovich, he has many very good video presentation on how to understand the internals of your OS.

In fact that's why I'm using rather UX/Linux for heavy COMSOLing, because the memory management is in my view better done there than in MS, in the latter you memory is used 90% by all these nice-to-have ready-to-pop-up features that have nothing to do on a numbercruncher.

If my suspicons are rigth, I see only one way around: stop matlab and comsol between each run and restart fully (perhaps by waiting 2-3 seconds before you relaunch matlab, to allow the OS to finish all its cleaning and write-backs) should be possible via a batch file

Good luck
Ivar
Hi Indeed nothing bad with old versions and older OS so long they do the job, running after the last most up to date thing is also requesting quite some time and effort, that nobody is really ready to pay for, in fact we, the users, pay twice or even more: once for the purchase, once for the installation and then once for the new training (a good way to make money for certain), not to talk about the new bugs, in German they call it nicely "Schlimmverbesserungen". So back to your issue, I can only give you my thoughs (as I have neither that version nor that OS running) I suspect a memory leakage or fragmentation issue, this can be in the OS, in matlab and/or in COMSOL. You could try to look into it with tools such as SYSINTERNALs processexplorer by Mark Russinovich, he has many very good video presentation on how to understand the internals of your OS. In fact that's why I'm using rather UX/Linux for heavy COMSOLing, because the memory management is in my view better done there than in MS, in the latter you memory is used 90% by all these nice-to-have ready-to-pop-up features that have nothing to do on a numbercruncher. If my suspicons are rigth, I see only one way around: stop matlab and comsol between each run and restart fully (perhaps by waiting 2-3 seconds before you relaunch matlab, to allow the OS to finish all its cleaning and write-backs) should be possible via a batch file Good luck Ivar

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.