-
-
Notifications
You must be signed in to change notification settings - Fork 480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove the pyprocessing spkg from sage, then sort out any fallout that results #6503
Comments
comment:1
Just delete the spkg and delete the relevant lines in spkg/standard/deps. That should be it. |
comment:3
This might not be as easy as it seems. In my merge tree, I tried removing the pyprocessing spkg, and edited
The build error cannot be due to the patches or updated spkg's in my merge tree. I also tried cutting a source tarball of my merge tree (with pyprocessing intact where it is), and compile everything from source. This went OK. Removing pyrocessing would need to wait after releasing Sage 4.3.2.alpha0. I'm putting this back to "needs work". The likely place to look is the file def execute_list_of_commands_in_parallel(command_list, nthreads):
"""
INPUT:
command_list -- a list of pairs, consisting of a
function to call and its argument
nthreads -- integer; number of threads to use
OUTPUT:
Executes the given list of commands, possibly in parallel,
using nthreads threads. Terminates setup.py with an exit code of 1
if an error occurs in any subcommand.
WARNING: commands are run roughly in order, but of course successive
commands may be run at the same time.
"""
print "Execute %s commands (using %s threads)"%(len(command_list), min(len(command_list),nthreads))
from processing import Pool
p = Pool(nthreads)
for r in p.imap(apply_pair, command_list):
if r:
print "Parallel build failed with status %s."%r
sys.exit(1) |
comment:4
According to: http://www.python.org/dev/peps/pep-0371/ there was a renaming from processing to multiprocessing. There may be other changes to the api as well. Adam |
comment:5
First, we need a patch to the sage library changing any remaining imports of "processing" to "multiprocessing"; this involves changes to parallel/multiprocessing.py, plus perhaps changing the name of that file (so that in parallel/decorate.py, a line like The file SAGE_ROOT/devel/sage/setup.py also imports from the processing module, so that needs to be changed. Also, as awebb suggests, the api seems to have changed: when I make these changes and run doctests on sage/parallel/, I get errors like
After making the appropriate changes, perhaps we should test everything by moving the pyprocessing files out of SAGE_ROOT/local/lib/python/site-packages/ to make sure they're not being loaded? |
comment:6
Oh, sage-ptest also imports |
patch for scripts repository |
comment:7
Attachment: trac_6503-scripts.patch.gz Here are two patches, one for the scripts repo and one for the main repo. Note that one patch removes the file "parallel/multiprocessing.py" (actually renaming it to "multiprocessing_sage.py" plus the requisite changes to import statements). When I tried to run Sage after applying this patch, I still had copies of multiprocessing.py lying around which I had to delete by hand (this won't be a problem from a build from scratch, but upgrading could problematic): I had to delete the files
(Without deleting these files, commands like I haven't run a full test suite yet, but "sage -tp 2 SAGE_ROOT/devel/sage/sage/parallel/" passes all tests for me. |
comment:8
Here's another version of the patch; this one also patches SAGE_ROOT/devel/sage/spkg-install to try to delete the bad files. I don't know if I did this right, though; please review. |
comment:9
Here are the steps I took:
to this line
Removed the lines:
Removed the line:
The above steps were implemented against Sage 4.3.2.alpha0. Afterwards, I packaged up this version of Sage but with pyprocessing removed as per the above instructions. I then built this version of Sage from source, but received the following error:
I also note that the file
from line 320. It uses the pyprocessing spkg, when in fact this spkg has been removed as per the proposal of this ticket. Perhaps this could be a reason for the above build error I received. A fix is to change the above lines to use multiprocessing instead of processing. I'm investigating this approach, in addition to John's patches. |
comment:10
In the file
to these
results in the build process hanging at
|
comment:11
It is interesting that doing a single-threaded build on Solaris, pyprocessing failed on Solaris after applying the patch at http://bugs.python.org/issue1759169 However, after touching
so the Sage library built without problems on Solaris 10 (SPARC) Could it be the fact a parallel build was performed that caused the problems observed? Dave |
comment:12
For the record, I'm attaching a new version of the patch which deals with the reference to processing in setup.py -- the one that I missed in the first patch. I don't know why mvngu's build process failed with this patch. I may try to build it myself if I have time, but if anyone else wants to give it a try, please go ahead. |
patch for Sage library |
comment:13
Attachment: trac_6503-sage.patch.gz Okay, I took a copy of Sage, applied the attached patches and made Minh's suggested changes to install and deps, then ran |
Work Issues: rebase on top of #8191 |
comment:20
Given that neither #8191 nor this ticket has a positive review, I'm not sure why this one in particular needs rebasing. But here you go. |
rebased against #8191 |
Attachment: deps.2.gz Attachment: install.gz rebased against #8191 |
rebased against #8191 |
Attachment: deps.gz |
Attachment: deps.diff.gz Attachment: install.diff.gz |
Changed work issues from rebase on top of #8191 to none |
comment:21
Hurray! Parallel build works and parallel doctesting works also. I often use the following little script to parallel build and doctest after the build is done: #!/bin/sh
export DOT_SAGE=/dev/shm/mvngu/dot_sage/<x.y.z>
export MAKE='make -j6'
make
make ptestlong This script first requires that I edit the following line in
to result in
I also attempted parallel doctest with
As far as the parallel compilation and parallel doctesting of Sage is concerned, they went OK without pyprocessing. Now is the time to remove pyprocessing and instead use the Python library module |
Reviewer: Minh Van Nguyen |
Author: John Palmieri, Mike Hansen |
Merged: sage-4.3.4.alpha0 |
comment:22
Merged in this order:
|
In sage-4.1 we ship pyprocessing-0.52.p0.spkg, however a newer better version of that same code is standard in Python-2.6.x, which we also ship. So we need to remove pyprocessing, do a clean build/test cycle, and see what problems arise, then sort them out.
Be sure to test "sage -tp", which isn't tested by the test suite unless you do "make ptest".
CC: @mwhansen
Component: packages: standard
Author: John Palmieri, Mike Hansen
Reviewer: Minh Van Nguyen
Merged: sage-4.3.4.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/6503
The text was updated successfully, but these errors were encountered: