run error on x86-64 OpenSuse 11.1

Help
Paean
2009-05-15
2013-04-25
  • Paean
    Paean
    2009-05-15

    Hi, all.

    I compiled the serial version OpenFVM1.1 successfully, while I encountered a realloc error after typing

    ../OpenFVM lid f 1.

    The following messages were given. (the nbpointers part is for debug)

    d) Pre-conditioners list
    0-None
    1-Jacobi
    2-SOR
    3-ILU

    Done.

    Reading mesh file: lid.msh ...
    Done.
    nbpointers = 1
    nbpointers = 2
    nbpointers = 3
    nbpointers = 4
    *** glibc detected *** ../OpenFVM: realloc(): invalid next size: 0x0000000000673270 ***
    ======= Backtrace: =========
    /lib64/libc.so.6[0x7fa46fa95118]
    /lib64/libc.so.6[0x7fa46fa99081]
    /lib64/libc.so.6(realloc+0x138)[0x7fa46fa99e38]
    ../OpenFVM[0x40bddf]
    ../OpenFVM[0x40c26f]
    ../OpenFVM[0x408650]
    ../OpenFVM[0x40b1c8]
    ../OpenFVM[0x405138]
    /lib64/libc.so.6(__libc_start_main+0xe6)[0x7fa46fa3f586]
    ../OpenFVM[0x401149]
    ======= Memory map: ========
    00400000-00434000 r-xp 00000000 08:0b 2960177                            /home/paean/devel/openFVM/OpenFVM/Flow/examples/OpenFVM
    00633000-00634000 r--p 00033000 08:0b 2960177                            /home/paean/devel/openFVM/OpenFVM/Flow/examples/OpenFVM
    00634000-00635000 rw-p 00034000 08:0b 2960177                            /home/paean/devel/openFVM/OpenFVM/Flow/examples/OpenFVM
    00635000-0069a000 rw-p 00635000 00:00 0                                  [heap]
    7fa468000000-7fa468021000 rw-p 7fa468000000 00:00 0

    I found that the error occurred at the following code segment.

        for (i = 0; i < 8; i++)
    {
            node->nodes[i] = malloc (sizeof(oct_node));
            node->nodes[i]->entities = malloc (node->nbentities * sizeof(int));
            node->nodes[i]->nbentities = 0;
           
            opointer = realloc (opointer, (nbpointers + 1) * sizeof (oct_node));

            opointer[nbpointers] = node->nodes[i];
           
            ipointer = realloc (ipointer, (nbpointers + 1) * sizeof (int));  //here when i =3 and nbpointers = 4

            ipointer[nbpointers] = node->nodes[i]->entities;
            nbpointers++;
            OctCreateNode (node->nodes[i], node, i);

        }

    I am wondering if there are any one can help me out of this problem.

    Thank you very much.

    Best Regards,
    Paean Ball

     
    • Billy Araujo
      Billy Araujo
      2009-05-15

      There was a problem before with 64bit system. Could you try and see if it happens in the latest SVN snapshot?

      x-flow.

       
    • Paean
      Paean
      2009-05-15

      I tried the latest SVN snapshot. It has been working well until now. Thank you very much.

      Best Regards,
      Paean Ball