ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 29 Sep 2020 22:00:10 +0200Segmentation fault in magma interfacehttps://ask.sagemath.org/question/53622/segmentation-fault-in-magma-interface/ I'm trying to use the Magma computational algebra interface to do polynomial interpolation for large lists of size 2^18. My code has the following:
p = magma("Interpolation(%s,%s)" % (I,V)).sage()
where I and V are lists each with 2^18 elements. This works just fine for smaller lists but for this size it looks like magma gets a segfault with the following error:
> File "/SageMath/local/lib/python3.7/site-packages/sage/interfaces/magma.py", line 631, in set
raise TypeError("Error executing Magma code:\n%s" % out)
> TypeError: Error executing Magma code:
> Magma: Internal error
> Machine type: intel64-linux
> Memory usage: 49264.41MB
> Segmentation fault
I know that Magma by itself can do the computation, but I would like to get it working using the Sage interface. Is this just not possible or am I doing something wrong? Sun, 27 Sep 2020 17:49:22 +0200https://ask.sagemath.org/question/53622/segmentation-fault-in-magma-interface/Answer by FrédéricC for <p>I'm trying to use the Magma computational algebra interface to do polynomial interpolation for large lists of size 2^18. My code has the following:</p>
<pre><code>p = magma("Interpolation(%s,%s)" % (I,V)).sage()
</code></pre>
<p>where I and V are lists each with 2^18 elements. This works just fine for smaller lists but for this size it looks like magma gets a segfault with the following error:</p>
<blockquote>
<p>File "/SageMath/local/lib/python3.7/site-packages/sage/interfaces/magma.py", line 631, in set
raise TypeError("Error executing Magma code:\n%s" % out)
TypeError: Error executing Magma code:</p>
<p>Magma: Internal error</p>
<p>Machine type: intel64-linux</p>
<p>Memory usage: 49264.41MB</p>
<p>Segmentation fault</p>
</blockquote>
<p>I know that Magma by itself can do the computation, but I would like to get it working using the Sage interface. Is this just not possible or am I doing something wrong? </p>
https://ask.sagemath.org/question/53622/segmentation-fault-in-magma-interface/?answer=53632#post-id-53632Maybe this gets too big for the pexpect interface. Using this syntax may help
sage: L = [QQ(i) for i in range(7)]
sage: mL = magma(L)
sage: magma.Interpolation(mL,mL).sage()Mon, 28 Sep 2020 09:49:56 +0200https://ask.sagemath.org/question/53622/segmentation-fault-in-magma-interface/?answer=53632#post-id-53632Comment by denny for <p>Maybe this gets too big for the pexpect interface. Using this syntax may help</p>
<pre><code>sage: L = [QQ(i) for i in range(7)]
sage: mL = magma(L)
sage: magma.Interpolation(mL,mL).sage()
</code></pre>
https://ask.sagemath.org/question/53622/segmentation-fault-in-magma-interface/?comment=53660#post-id-53660Thank you for the answer. I was able to run it for several hours and didn't run into the segfault error like before.Tue, 29 Sep 2020 22:00:10 +0200https://ask.sagemath.org/question/53622/segmentation-fault-in-magma-interface/?comment=53660#post-id-53660