Skip to content

Memory allocation error

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #8640

    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] — 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 …


    Which program? An example case included in the release or a custom case you created?


    Dear 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!


    Memory 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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.