Singular https://www.singular.uni-kl.de/forum/ |
|
Sage @fork parallel decorator causing issues with Singular https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=2898 |
Page 1 of 1 |
Author: | williamsalex [ Wed Jan 01, 2020 10:10 pm ] |
Post subject: | Sage @fork parallel decorator causing issues with Singular |
Exception raised by child process with pid=1704: Traceback (most recent call last): File "/opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/parallel/use_fork.py", line 177, in __call__ self._subprocess(f, dir, *v0) File "/opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/parallel/use_fork.py", line 302, in _subprocess value = f(*args, **kwds) File "<ipython-input-9-532b53e3019b>", line 167, in master reduktion = reduction(polynomial) File "<ipython-input-9-532b53e3019b>", line 94, in reduction singular.set_ring(currentRing) File "/opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/interfaces/singular.py", line 1098, in set_ring self.eval("setring %s; short=0"%R.name(), allow_semicolon=True) File "/opt/sagemath-8.8/local/lib/python2.7/site-packages/sage/interfaces/singular.py", line 658, in eval raise SingularError('Singular error:\n%s'%s) SingularError: Singular error: ? sage1317 is no name of a ring/qring ? error occurred in or before STDIN line 11: `setring sage1317; short=0;` I've been implementing parallelism on a program built in Sage MATH using its interface to Singular. I am attempting to use Sage's @fork parallel decorator, which seems to cause issues with Singular (this error does not occur if the decorator is not present). I'm very new to parallelism and am unsure what the issue here could be. Thanks for any and all help! |
Author: | hannes [ Fri Jan 10, 2020 4:00 pm ] |
Post subject: | Re: Sage @fork parallel decorator causing issues with Singular |
It seems that the ring for all the objects (sage1317 ) was defined in a different thread - and each thread strats a seperate Singular. So the interafce should be changed: either define the rings in all threads or keep track of the threads whre a specific ring is defined and - if it is needed in another thread - send the ring definition instead of "setring ...;". |
Author: | williamssalex [ Fri Jan 10, 2020 6:11 pm ] |
Post subject: | Re: Sage @fork parallel decorator causing issues with Singular |
Thanks for the clarification Hans! If I follow you, I should just make sure all my initializations happen inside of the thread - rings, polynomials and such - and then I should be good to go. |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |