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
Reading mesh file: lid.msh ...
nbpointers = 1
nbpointers = 2
nbpointers = 3
nbpointers = 4
*** glibc detected *** ../OpenFVM: realloc(): invalid next size: 0x0000000000673270 ***
======= Backtrace: =========
======= 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;
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.
There was a problem before with 64bit system. Could you try and see if it happens in the latest SVN snapshot?
I tried the latest SVN snapshot. It has been working well until now. Thank you very much.
Log in to post a comment.