It's very, very hard to produce working code that illustrates a problem
when working on a very large system like ours. There's nearly 1000 lines of
code just to set up the data!

If you want to take a look, it's here, though I'm not sure how enlightening
it will be:

https://github.com/wbhart/Nemo.jl/blob/mpoly/src/generic/MPoly.jl

Specifically the issue is at lines 578 and 584.

To run this in Nemo, you would need to check out the mpoly branch, build
Nemo and use the following lines of code:

using Nemo

R, x, y, z, t = PolynomialRing(ZZ, ["x", "y", "z", "t"])

f = 1 + x + y + z + t
p = f^20;

q = Nemo.mul(p, p + 1);

It is this final line of code that in turn invokes Nemo.mul_johnson which
in turn invokes heapinsert!.

I am quite certain the line of code that I gave is at issue here. Instead
of simply writing the tuple directly into the array, it first allocates a
tuple on the heap, then copies that into the array. That obviously
shouldn't happen.

Bill.



On 17 August 2016 at 17:54, Kristoffer Carlsson <kcarlsso...@gmail.com>
wrote:

> As always, it is very helpful if there is some code that is actually
> runnable in the post that contains the problem. It is easier to run Julia
> code in Julia than in your brain :)

Reply via email to