Memory allocation error
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Memory allocation error
- This topic has 3 replies, 2 voices, and was last updated 3 months, 3 weeks ago by Adrian.
-
AuthorPosts
-
May 8, 2024 at 11:44 am #8640hhanParticipant
Dear Community,
When I run the program, I’m prompted malloc(): invalid size (unsorted), is this because I’m out of memory, and how do I estimate the memory I need.
The error message is as follow,
[MpiManager] Sucessfully initialized, numThreads=6
[ThreadPool] Sucessfully initialized, numThreads=1
[UnitConverter] —————– UnitConverter information —————–
[UnitConverter] — Parameters:
[UnitConverter] Resolution: N= 19
[UnitConverter] Lattice velocity: latticeU= 0.0505667
[UnitConverter] Lattice relaxation frequency: omega= 1.79325
[UnitConverter] Lattice relaxation time: tau= 0.557646
[UnitConverter] Characteristical length(m): charL= 0.2
[UnitConverter] Characteristical speed(m/s): charU= 0.00375
[UnitConverter] Phys. kinematic viscosity(m^2/s): charNu= 1.5e-05
[UnitConverter] Phys. density(kg/m^d): charRho= 1.26
[UnitConverter] Characteristical pressure(N/m^2): charPressure= 0
[UnitConverter] Mach number: machNumber= 0.087584
[UnitConverter] Reynolds number: reynoldsNumber= 50
[UnitConverter] Knudsen number: knudsenNumber= 0.00175168
[UnitConverter]
[UnitConverter] — Conversion factors:
[UnitConverter] Voxel length(m): physDeltaX= 0.0105263
[UnitConverter] Time step(s): physDeltaT= 0.141942
[UnitConverter] Velocity factor(m/s): physVelocity= 0.0741595
[UnitConverter] Density factor(kg/m^3): physDensity= 1.26
[UnitConverter] Mass factor(kg): physMass= 1.4696e-06
[UnitConverter] Viscosity factor(m^2/s): physViscosity= 0.000780627
[UnitConverter] Force factor(N): physForce= 7.67816e-07
[UnitConverter] Pressure factor(N/m^2): physPressure= 0.00692954
[UnitConverter] ————————————————————-
malloc(): invalid size (unsorted)
[hhan:00552] *** Process received signal ***
[hhan:00552] Signal: Aborted (6)
[hhan:00552] Signal code: (-6)
[prepareGeometry] Prepare Geometry …May 10, 2024 at 10:37 pm #8647AdrianKeymasterWhich program? An example case included in the release or a custom case you created?
May 11, 2024 at 5:15 pm #8650hhanParticipantDear Adrian,
This is a custom case i created. I found when i use the very small deltaX, the memory allocation problem occurs. So I want to estimate memory cost in Geometry prepare stage.
Thank you for your reply!
May 13, 2024 at 8:46 am #8675AdrianKeymasterMemory usage is quite model dependent. However, for a first approximation you can multiply the number of cells by the number of discrete velocities by the number of bytes per base type unit (e.g. 8 for double precision FPT).
Note that you probably don’t want to fully fill up your memory but rather increase the degree of parallelization for larger problems. While keeping the compute resource fixed while maximizing memory utilization will increase the raw throughput (MLUPs) the resulting discrete time steps per second will necessarily reduce.
-
AuthorPosts
- You must be logged in to reply to this topic.