Skip to content

Maximum size of a cuboid for writing to .vti

OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB Bug Reports Maximum size of a cuboid for writing to .vti

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1962
    jb
    Member

    I noticed that my (2D) code crashed with a Segmentation Fault when the domain size became to big.
    I fixed it by changing the following in superVtmWriterXD.hh

    change this:

    Code:
    float bufferFloat[fullSize];

    to this:

    Code:
    float* bufferFloat = new float[fullSize];

    to allow bigger domain sizes for a limited number of cpu’s with MPI.

    I would be happy to hear if I fixed this well.

    Thanks

    #2787
    Markus Mohrhard
    Participant

    Thanks for the report.

    I have fixed this in our master branch through

    Code:
    std::unique_ptr<float[]> bufferFloat(new float[fullSize]);

    which handles deleting the allocated memory as well. The same approach was already implemented in the 3D case.

    #2789
    jb
    Member

    Ok, great! Thanks for the update with the improved fix.

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