|
[Sponsors] |
May 29, 2020, 04:40 |
Big data handling, List vs Matrix
|
#1 |
Member
David Andersson
Join Date: Oct 2019
Posts: 46
Rep Power: 7 |
Hi foamers,
I have developed a functionObject that reads and works on the face pressure values from some selected patches. At the moment I am working with lists and lists of lists to store my values and to perform my calculations. I have however experienced performance issues (lack of RAM) when my mesh grows. It is working fine on ~100k cells but above that it crashes. I have therefore started to look into the matrix class in OpenFOAM. However, before I start to adapt my code I would like to hear your opinion on this - will my code be more lightweight using the matrix class instead of my current lists of lists definition? Thanks, David EDIT ---------------------------------------------------- To further specify my problem - I need to store 5-8 list of lists throughout the complete simulation that all have the size nCells x nCells. This is eating up the RAM when the number of cells increase and I therefore need to find a more economic way of storing this data. Thanks again, David |
|
May 29, 2020, 19:09 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
Can't you just write them out (if you really really need temporal-accurate data instead of statistics) instead of keeping them in the memory throughout the simulation? Using List or Matrix would not help if the data keep accumulating as ~ t N^2 (t = time, N = cells).
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
May 29, 2020, 19:37 |
|
#3 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
You cannot afford to store the list of nCells x nCells. This is a massive size.
Please think what you need this list for. Are there alternative stogare arrangements that would work? Do you REALLY need a list of that size? fvMatrix is stored in a sparse matrix format, excluding all the entries that you know will be zero. The lookup is slower, but it is feasible. Even on a massive supercomputer, there is not enough memory for nCells x nCells. Also, please consider carefully what you are trying to do. When running in parallel, does it parallelise, ie do you have one huge global matrix or a smaller matrix on each processor? Read up on parallel communication and sparse matrix formats - otherwise you will always be stuck around 100k cells. By the way, 100k x 100k is 10 BILLION NUMBERS: this is why you run out of memory
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
May 30, 2020, 13:31 |
|
#4 |
Member
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 7 |
||
June 2, 2020, 04:00 |
|
#5 | |
Member
David Andersson
Join Date: Oct 2019
Posts: 46
Rep Power: 7 |
Quote:
When I run it in parallel at the moment I gather the pressure values onto the master node, perform my matrix multiplications and then scatter it back. Which means that it is the memory on the master node that is doing the job. Cheers, David |
||
June 2, 2020, 04:04 |
|
#6 | |
Member
David Andersson
Join Date: Oct 2019
Posts: 46
Rep Power: 7 |
Quote:
Cheers, David |
||
Tags |
efficiency, function object, matrix, ram |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] How to get the coordinates of velocity data at all cells and at all times | vidyadhar | ParaView | 9 | May 20, 2020 21:06 |
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 | ordinary | OpenFOAM Installation | 19 | September 3, 2019 19:13 |
[Other] How to use finite area method in official OpenFOAM 2.2.0? | Detian Liu | OpenFOAM Meshing & Mesh Conversion | 4 | November 3, 2015 04:04 |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 14:59 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |