CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: snappyHexMesh and Others (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/)
-   -   running out of memory (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/99570-running-out-memory.html)

mihaipruna April 6, 2012 12:48

running out of memory
 
I have an Ubuntu partition with 20GB. I get the "new" error when running a mesh with 4 million cells. I'm not sure what my swap is.
Should I change the partition size of the ubuntu installation?
or is tehre a way to change the swap file size inside Ubuntu?

Rider April 12, 2012 04:25

Hi,

Can you copy your error message here ?

Rider April 12, 2012 05:14

In my case, I have this error message :

Code:

Shell refinement iteration 9
----------------------------

Marked for refinement due to refinement shells    : 1279182 cells.
Determined cells to refine in = 24.85 s
Selected for internal refinement : 1341362 cells (out of 10902074)
new cannot satisfy memory request.
This does not necessarily mean you have run out of virtual memory.
It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library
Abandon

Anybody know if I can do this snappyHexMesh with my computer, or it's "juste" because I don't have enough memory ?

(My configuration : 4 cores at 2,4 GHz ; 6 go of memory and 100 go of disque space)

Rider April 13, 2012 05:48

I tried to execute the same simulation on another computer and I had this errors message :

Code:

Shell refinement iteration 0
----------------------------

Marked for refinement due to refinement shells    : 5415653 cells.
Determined cells to refine in = 211.29 s
Selected for internal refinement : 5631462 cells (out of 6458511)
Processus arrêté
client@Client:~/Essai_oGrid$

Or, this :

Code:

Shell refinement iteration 0
----------------------------

Marked for refinement due to refinement shells    : 5415539 cells.
Determined cells to refine in = 53.77 s
Selected for internal refinement : 5631340 cells (out of 6458385)
--------------------------------------------------------------------------
mpirun noticed that process rank 6 with PID 3902 on node Client exited on signal 9 (Killed).
--------------------------------------------------------------------------
client@Client:~/Essai_oGrid$


Rider April 15, 2012 11:30

Any ideas ?

colinB April 16, 2012 09:53

Hi,

when I had this error message I usually run out of RAM.

As a rule of thumb one can say that you shouldn't use more than 1 M
cells per 1 GB of RAM (which is the absolute maximum).
In your case I see you have already 10902074 cells
so way too much for your hardware (6 GB of RAM).

The other messages you posted are referring to the same issue.

Hint: limit the maximum number of cells in the sHMD to lets say 5M
in your case or even less (entity: maxGlobalCells in sHMD).
Be aware that the total number of cells might still be more then the number
of cells specified here, for the refinement is aborted after sHM is hitting
the boundary.
E.g. maxGlobalcells set to 1M you have a background mesh of 500k and
due to cutting ut a geometry 50k cells are removed and then first level of
refinement starts and you end up with 950k he continues refinement and in
the next step you might end up with 2 Mio which is twice the number of
what you specified. But then he will stop refinement.

SO: to reach the maximum number of cells your RAM can handle you watch
the last refinement steps in the log of sHM and look for the refinement
level which has less cells then you want to have in total and then you set
maxGlobalcells to a value less than this and hope it was ok.

hope that helps

regards

mihaipruna April 16, 2012 10:32

Thanks Colin, I figured out I had to increase the swap size and posted the solution here. I also have reduced the areas of refinement based on distance.

http://www.cfd-online.com/Forums/ope...y-crashes.html

Rider April 17, 2012 06:22

Hi,

Quote:

Originally Posted by mihaipruna (Post 354905)
Thanks Colin, I figured out I had to increase the swap size and posted the solution here. I also have reduced the areas of refinement based on distance.

http://www.cfd-online.com/Forums/ope...y-crashes.html

I already do this procedure when I had installed OpenFoam. I put 6 Gio of swap for Gio of memory.

Quote:

Originally Posted by colinB (Post 354898)
maxGlobalCells in sHMD

You're right ! My maxGlobalCells was too high ...

Quote:

Originally Posted by colinB (Post 354898)
hope that helps

Of course !

Rider April 17, 2012 09:59

"ColinB"

What proportion have you between maxLocalCells and maxGlobalCells ?

For example

maxLocalCells => 1 000 000
maxGlobalCells => 2 000 000

colinB April 18, 2012 02:24

As far as I understood this "ratio" is dependant on the number of processors
you are using and the number of cells specified in here (maxLocalCells) is the
number of maxGlobalCells divided by the number of processors.

However I'm not 100% sure.
So usually for mesh generation with 1 core the number is then the same like
maxGlobalCells with 2 cores it is half and so on.

Rider April 18, 2012 02:42

Ok, Thanks colinB.

I will try this method ;)

AndrewMortimer March 17, 2014 16:28

Quote:

Originally Posted by colinB (Post 355292)
As far as I understood this "ratio" is dependant on the number of processors
you are using and the number of cells specified in here (maxLocalCells) is the
number of maxGlobalCells divided by the number of processors.

However I'm not 100% sure.
So usually for mesh generation with 1 core the number is then the same like
maxGlobalCells with 2 cores it is half and so on.

I understand this is bringing up a slightly old topic, my meshing keeps crashing when I edit the maxGlobalCells only.

What is the way to work out this ratio?


All times are GMT -4. The time now is 12:25.