Possible Memory Leak for Parallel version ?

  • Zhicheng Wang

    Zhicheng Wang - 2011-02-16

    Hello, X-flow

    I'm looking here to get some help with this  code
    I'm trying to run the parallel OpenFVM 1.1.  When I want to decompose the  *.msh file by using following command:
    mpirun -np 2 ./OpenFVM tutorial d 2 ,
    get these error:

    *** glibc detected *** /home/zwang/OpenFVM/Flow/examples/tutorial/OpenFVM: realloc(): invalid next size: 0x0000000002d06f50 ***
    ======= Backtrace: =========
    ======= Memory map: ========
    00400000-00eec000 r-xp 00000000 fd:00 55542365                           /home/zwang/OpenFVM/Flow/examples/tutorial/OpenFVM
    010eb000-0110e000 rw-p 00aeb000 fd:00 55542365                           /home/zwang/OpenFVM/Flow/examples/tutorial/OpenFVM
    0110e000-012d4000 rw-p 0110e000 00:00 0
    02abe000-02e1f000 rw-p 02abe000 00:00 0                                 
    302d800000-302d81c000 r-xp 00000000 fd:00 25427970                       /lib64/ld-2.5.so
    302da1b000-302da1c000 r-p 0001b000 fd:00 25427970                       /lib64/ld-2.5.so
    302da1c000-302da1d000 rw-p 0001c000 fd:00 25427970                       /lib64/ld-2.5.so

    I debug this issue, It happened in line 205 and 208 of octree.c. I guess it failed to allocate memory.

    could you please give me a little advise what could be the problem ? In case this error is relate to my wrong compiling. I just attach some pieces of my  makefile.
    OBJ_DIR        = /home/zwang/OpenFVM/Flow/parallel/debug
    SOURCE_DIR     = /home/zwang/OpenFVM/Flow/parallel/source
    PETSC_LIB      = -L/home/zwang/petsc/3.1-p7/linux/lib -lpetsc  -lflapack -lfblas -lm -lgfortran -lX11
    PETSC_INCLUDE  = -I/home/zwang/petsc/3.1-p7/include
    METIS_LIB      = -L/home/zwang/Linux/Metis/metis-4.0/ -lmetis
    LASPACK_OBJ    = -L/home/zwang/lib/ -llaspack
    CC             = /home/zwang/petsc/3.1-p7/linux/bin/mpicc

    I'm using openmpi to build this parallel OpenFVM 1.1.


  • x-flow

    x-flow - 2011-02-17

    Try this:
    mpirun -np 1 ./OpenFVM tutorial d 2 ,

    The decomposition doesn't work in parallel mode.

  • Zhicheng Wang

    Zhicheng Wang - 2011-02-17

    Hi, x-flow,

    thank you for your reply.
    I tried your advise, but still get the same error.


  • x-flow

    x-flow - 2011-02-20

    There was a problem when freeing the octree. Can you test the latest version from SVN?

  • Zhicheng Wang

    Zhicheng Wang - 2011-02-20

    Yes, the latest SVN works… Thank you so much!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks