Closed GraDje13 closed 4 months ago
The problem is that the workspace is too small, which causes a segfault. Setting
#:Workspace 2G
at the start of the file makes it work. Adding a check for the workspace size in Horner_tree
is probably a good idea.
Actually, we have a check for the workspace
but it seems not to work??
Here, if I print sumsize
I get 37533050
(words). WorkSize
is the default 40000000
(words) so things are supposed to fit. But if I print *t
in the loop which follows, and add up the values, they exceed 40M? Hence the segfault. But sumsize
is supposed to already contain this sum...
Also, here the warning prints WorkSize in bytes, but this value is in words. MesWork
in message.c
also has the wrong units.
This looks like #379 also.
Good catch! Thanks. I will merge #481.
Also, here the warning prints WorkSize in bytes, but this value is in words.
MesWork
inmessage.c
also has the wrong units.
Right. AM.WorkSize
is the workspace size in words:
Would you like to make a commit to fix these messages?
Sometimes a segfault occurs when applying optimization to complicated expressions. A simple working example of this is:
The segfault does not happen if
F
is simplified, for example by lowering the power from 50 to 40. The segfault also occurs at the other optimization levelsO2
andO3
.I also ran this program with gdb, which gave the following backtrace: