|
[Sponsors] |
July 26, 2012, 16:44 |
Error when trying to display mesh
|
#1 | |
New Member
SV
Join Date: May 2009
Posts: 15
Rep Power: 17 |
I'm trying to visualize a (rather large) mesh in ParaFoam (3.12.0), but I keep on getting this error message a few seconds after I hit the 'Apply' button:
Quote:
|
||
July 26, 2012, 17:11 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Soheyl,
Mmm... here's a few questions for trying to diagnose this issue:
Bruno
__________________
|
|
July 26, 2012, 17:23 |
|
#3 | |
New Member
SV
Join Date: May 2009
Posts: 15
Rep Power: 17 |
Bruno,
According to checkMesh: Quote:
The case will have about 10 fields, but I haven't solved the case yet, and just trying to visualize the mesh. And none of them are selected in ParaFoam. I am using scotch decomposition, and the file has an auto-generated extension of .OPENFOAM. |
||
July 26, 2012, 17:47 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
What I meant by "polyhedral decomposition" was if you had chosen the option to do polyhedral decomposition in ParaView. It's one of the options in the "Object Inspector", which when turned on, shows the mesh as it really is.
Mmm... over 4 million cells... Last time I checked, for each million cells in OpenFOAM, it would require 1 GB of RAM. And if you're using a 32bit Ubuntu installation, then each application should not be able to allocate more than 2GB of RAM, even if you're using PAE! Therefore, it should only be natural that you aren't able to load the mesh using a single instance of ParaView! By the way, did you generate the mesh on that machine?
__________________
|
|
July 26, 2012, 18:57 |
|
#5 |
New Member
SV
Join Date: May 2009
Posts: 15
Rep Power: 17 |
That makes sense! I created the mesh on the same machine, but I ran snappyHexMesh on parallel on 4 cores. Well, I guess the only option might be reinstalling a 64 bit Ubuntu!
Thanks Bruno. |
|
September 3, 2014, 11:28 |
|
#6 |
Member
Richardpluff
Join Date: May 2014
Posts: 95
Rep Power: 12 |
Hey guys,
Have you solved your problem with memory? I am making my script with Python-ParaView and I obtain the same error message. It looks like ParaView doesn't liberate memory (I am deleting all objects just when I don't need them). Does anybody knows what can I do? I am working with high cell count and moreover I am using the Calculator tool. when I don't need it I do "Delete(object)". gc.collect() is not the solution for me... Thanks in advance. |
|
September 13, 2014, 17:58 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings CRI_CFD,
I believe you're stepping into a more confusing part of VTK itself, and not as much Python coding. I say this because VTK uses its own memory management system, due to its pipeline structure. If you want to really save memory, you'll have to dump the results in between pipeline steps, using specific VTK methods... let's see if I can find them... ah, it's explained in detail here: http://www.paraview.org/Wiki/VTK/FAQ...eleaseDataFlag Best regards, Bruno
__________________
|
|
September 14, 2014, 08:51 |
|
#8 |
Member
Richardpluff
Join Date: May 2014
Posts: 95
Rep Power: 12 |
Hey wyldkat,
Thanks for your reply. I am reviewing my Python code and I am not using VTK anywhere (no import of VTK an the beginning of the script). I am importing my results with OpenFOAMReader. Is Paraview using VTK classes and methods and I am not realizing? If so, is this link still useful? I'll check it anyway. Thanks for your help! Best, CRI_CFD |
|
September 14, 2014, 09:14 |
|
#9 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi CRI_CFD,
Quote:
From your description, my guess is that the problem starts right when you import the case with "OpenFOAMReader"? Or do you use any other filters after that? Best regards, Bruno
__________________
|
||
September 14, 2014, 09:29 |
|
#10 |
Member
Richardpluff
Join Date: May 2014
Posts: 95
Rep Power: 12 |
I do it this way:
Code:
try: paraview.simple except: from paraview.simple import * paraview.simple._DisableFirstRenderCameraReset() caso_foam = OpenFOAMReader( FileName='pathtofile/caso.foam' ) All uses to run fine, except in two mainly cases: 1. Use of "Calculator filter". I try to delete it the faster I can (I guess it is taking a lot of memory resources, because this is a computation in the whole mesh), but as I said previously: Code:
Delete(Calculator) gc.collect() 2. When I want to import a new foam case, I do: Code:
Delete(previouscase.foam) gc.collect() try: paraview.simple except: from paraview.simple import * paraview.simple._DisableFirstRenderCameraReset() caso2_foam = OpenFOAMReader( FileName='pathtofile/caso2.foam' ) Code:
erminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted (core dumped) Code:
Killed. The script makes use of different filters (for example Velocity magnitude over a range of slices, streamlines, thresholds, calculators, integrate variables...) so I need a way of free memory. Mesh size is also quite big (around 6000000 cells). Thanks again. Last edited by wyldckat; October 12, 2014 at 13:49. Reason: Added [CODE][/CODE] |
|
October 12, 2014, 14:06 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi CRI_CFD,
I've finally managed to come around to check this. From the quick tests I've done with ParaView 3.12.0 and 4.1.0, using OpenFOAM's "cavity" tutorial case, on Ubuntu 12.04, both ParaView versions are custom built along with OpenFOAM 2.2.x and 2.3.x... and I have a very bad feeling that there is a memory leak problem in ParaView/VTK. If you try the steps you're doing manually in ParaView, using the interface and not Python, and monitor the memory occupied after loading and removing each filter and data read, you'll see that the memory occupied very rarely will decrease. This reminds me of a known bug related to generating animations with ParaView... it's this thread: http://www.cfd-online.com/Forums/ope...animation.html Therefore, there seems to be a deeper problem in ParaView, and it's not simply related to using Python. Best regards, Bruno |
|
Tags |
parafoam, paraview, ubuntu |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Creating multiple multiple cell zones with snappyHexMesh - a newbie in deep water! | divergence | OpenFOAM Meshing & Mesh Conversion | 0 | January 23, 2019 05:17 |
[snappyHexMesh] Snappyhex mesh: poor inlet mesh | Swagga5aur | OpenFOAM Meshing & Mesh Conversion | 1 | December 3, 2016 17:59 |
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry | pizzaspinate | OpenFOAM Meshing & Mesh Conversion | 1 | February 25, 2015 08:05 |
3D Hybrid Mesh Errors | DarrenC | ANSYS Meshing & Geometry | 11 | August 5, 2013 07:42 |
[snappyHexMesh] Layers:problem with curvature | giulio.topazio | OpenFOAM Meshing & Mesh Conversion | 10 | August 22, 2012 10:03 |