Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - Sage @fork parallel decorator causing issues with Singular
Author Message
  Post subject:  Re: Sage @fork parallel decorator causing issues with Singular  Reply with quote
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.
Post Posted: Fri Jan 10, 2020 6:11 pm
  Post subject:  Re: Sage @fork parallel decorator causing issues with Singular  Reply with quote
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 ...;".
Post Posted: Fri Jan 10, 2020 4:00 pm
  Post subject:  Sage @fork parallel decorator causing issues with Singular  Reply with quote
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! :D
Post Posted: Wed Jan 01, 2020 10:10 pm


It is currently Fri May 13, 2022 10:56 am
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group