CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Out of memory while sampling surfaces

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2016, 18:33
Default Out of memory while sampling surfaces
  #1
Senior Member
 
Join Date: Jun 2016
Posts: 102
Rep Power: 10
xuegy is on a distinguished road
Hello all,

I have encountered a memory trouble. My workstation has 128GB memory and my case will occupy about 80GB memory while running. I need to save 2 surfaces instead of the whole result so I added functions in my controlDict. However everytime this sampling code leads to an out of memory problem.

Code:
functions
{
	mysurfaces
	{
		type            surfaces;
		functionObjectLibs
		(
			"libsampling.so"
		);
		writeControl    adjustableRunTime;
		writeInterval   0.005;
		surfaceFormat   vtk;
		interpolationScheme cellPoint;
		fields
		(
			p
			U
		);
		surfaces
		(
			surfaceXZ
			{
				type plane;
				basePoint (0.1001 0.1001 0);
				normalVector (0 1 0);
			}
			surfaceYZ
			{
				type plane;
				basePoint (0.1001 0.1001 0);
				normalVector (1 0 0);
			}
		);
	}
	myline
	{
		type            sets;
		functionObjectLibs
		(
			"libsampling.so"
		);
		writeControl    adjustableRunTime;
		writeInterval   0.005;
		setFormat   raw;
		interpolationScheme cellPoint;
		fields
		(
			U
		);
		sets
		(
			lineZ
			{
				type        uniform;
				axis        z;
       				start       (0.1001 0.1001 0);
        			end         (0.1001 0.1001 0.8);
        			nPoints     401;
			}
		);
	}
}
So it is incredible that sampling a surface will occupy more that 40GB memory. I don't want to modify the mesh or the solver. So is there any method to reduce the memory usage when sampling these surfaces?

Thanks
xuegy is offline   Reply With Quote

Old   November 3, 2016, 09:13
Default
  #2
Member
 
Bruno Blais
Join Date: Sep 2013
Location: Canada
Posts: 64
Rep Power: 13
blais.bruno is on a distinguished road
That is indeed a very troubling amount of memory.

Does the same error occur if you try to save only P instead of U and P or it does not change? Are you using the latest version? This seems very anormal, so there might be an underlying bug that manifest itself only for very large cases...

Quote:
Originally Posted by xuegy View Post
Hello all,

I have encountered a memory trouble. My workstation has 128GB memory and my case will occupy about 80GB memory while running. I need to save 2 surfaces instead of the whole result so I added functions in my controlDict. However everytime this sampling code leads to an out of memory problem.

Code:
functions
{
    mysurfaces
    {
        type            surfaces;
        functionObjectLibs
        (
            "libsampling.so"
        );
        writeControl    adjustableRunTime;
        writeInterval   0.005;
        surfaceFormat   vtk;
        interpolationScheme cellPoint;
        fields
        (
            p
            U
        );
        surfaces
        (
            surfaceXZ
            {
                type plane;
                basePoint (0.1001 0.1001 0);
                normalVector (0 1 0);
            }
            surfaceYZ
            {
                type plane;
                basePoint (0.1001 0.1001 0);
                normalVector (1 0 0);
            }
        );
    }
    myline
    {
        type            sets;
        functionObjectLibs
        (
            "libsampling.so"
        );
        writeControl    adjustableRunTime;
        writeInterval   0.005;
        setFormat   raw;
        interpolationScheme cellPoint;
        fields
        (
            U
        );
        sets
        (
            lineZ
            {
                type        uniform;
                axis        z;
                       start       (0.1001 0.1001 0);
                    end         (0.1001 0.1001 0.8);
                    nPoints     401;
            }
        );
    }
}
So it is incredible that sampling a surface will occupy more that 40GB memory. I don't want to modify the mesh or the solver. So is there any method to reduce the memory usage when sampling these surfaces?

Thanks
blais.bruno is offline   Reply With Quote

Old   November 3, 2016, 12:03
Default
  #3
Senior Member
 
Join Date: Jun 2016
Posts: 102
Rep Power: 10
xuegy is on a distinguished road
I'm using the latest version of deb pack. I've tested this case on a half-size mesh(1/8) and everything runs smoothly.

If I only save one surface of U it's safe. About 15GB will be occupied when writing. But if I add the line sampling it will crash again. I should go back and test each value separately so that I can know where is the problem.

Quote:
Originally Posted by blais.bruno View Post
That is indeed a very troubling amount of memory.

Does the same error occur if you try to save only P instead of U and P or it does not change? Are you using the latest version? This seems very anormal, so there might be an underlying bug that manifest itself only for very large cases...
xuegy is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parallel partition memory allocation problem Jepice Fidelity CFD 2 July 28, 2017 18:20
Run-time memory allocation error akalopsis CFX 0 November 17, 2014 18:17
Lenovo C30 memory configuration and discussions with Lenovo matthewe Hardware 3 October 17, 2013 11:23
RAM memory problem alpha Main CFD Forum 8 February 12, 2008 12:07
"Memory too low" problem with Fluent HELP NEEDED Amr FLUENT 6 May 8, 2006 13:06


All times are GMT -4. The time now is 22:54.