Opened 11 years ago
Last modified 8 years ago
#4949 closed enhancement
Optionally build spkgs in $SAGE_BUILD_TMPDIR — at Version 11
Reported by: | mabshoff | Owned by: | mabshoff |
---|---|---|---|
Priority: | minor | Milestone: | sage-5.0 |
Component: | build | Keywords: | sd32 |
Cc: | drkirkby, leif | Merged in: | |
Authors: | John Palmieri | Reviewers: | Mariah Lenox |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
$HOME can be slow in case it is NFS mounted for example. So using local scratch space or even better a RAM disk should speed up the build by a nice factor. To do so, use $SAGE_BUILD_TMPDIR in case it exists instead of $SAGE_ROOT/spkg/build.
Apply:
Change History (11)
comment:1 Changed 11 years ago by
- Milestone changed from sage-3.3 to sage-3.2.4
comment:2 Changed 11 years ago by
comment:3 Changed 9 years ago by
- Priority changed from critical to minor
- Report Upstream set to N/A
- Status changed from new to needs_review
Here's a patch. This implements both SAGE_BUILD_TMPDIR
and SAGE_KEEP_BUILT_SPKGS
-- see #9444. (This is an incremental change rather than a complete reworking of the sage-spkg script, which might be called for.)
comment:4 Changed 9 years ago by
A little explanation: BUILD is defined (as "build") by sage-env, but it was used sporadically in sage-spkg. With this patch, it is used more consistently.
comment:5 Changed 9 years ago by
If/when this merges, we should consider closing #6550. SAGE_KEEP_BUILT_SPKGS
is a much better name than SAGE_KEEP_SPKG_BUILD
.
comment:6 Changed 9 years ago by
- Cc drkirkby leif added
- Description modified (diff)
Nice to see progress in the build process... :)
See also http://trac.sagemath.org/sage_trac/ticket/6550#comment:7 .
comment:7 follow-up: ↓ 8 Changed 9 years ago by
Should SAGE_BUILD_TMPDIR
default to SAGE_TMPDIR
?
(We have btw. lots of - in some cases not very well-named - environment variables.)
Making use of e.g. a RAM disk (or some user-provided directory) for doctesting is also worth doing.
comment:8 in reply to: ↑ 7 Changed 9 years ago by
Replying to leif:
Making use of e.g. a RAM disk (or some user-provided directory) for doctesting is also worth doing.
You can already set SAGE_TESTDIR
(or DOT_SAGE
) to do this. Or maybe I misunderstand?
comment:9 Changed 9 years ago by
- Milestone changed from sage-4.7 to sage-4.7.1
- Status changed from needs_review to needs_work
trac_4949-scripts.patch does not apply:
sage: hg_sage.apply("/home/mariah/trac_4949-scripts.patch") cd "/home/mariah/sage/sage-4.7.rc2-x86_64-Linux-core2-fc/devel/sage" && hg status cd "/home/mariah/sage/sage-4.7.rc2-x86_64-Linux-core2-fc/devel/sage" && hg status cd "/home/mariah/sage/sage-4.7.rc2-x86_64-Linux-core2-fc/devel/sage" && hg import "/home/mariah/trac_4949-scripts.patch" applying /home/mariah/trac_4949-scripts.patch unable to find 'sage-spkg' for patching 5 out of 5 hunks FAILED -- saving rejects to file sage-spkg.rej abort: patch failed to apply sage:
comment:10 Changed 9 years ago by
- Status changed from needs_work to needs_review
Here's a rebased version of trac_4949-scripts.patch. Note that it's for the scripts repository, so you have to apply it with "hg_scripts.apply(...)" rather than "hg_sage.apply(...)".
comment:11 Changed 9 years ago by
- Description modified (diff)
- Reviewers set to Mariah Lenox
- Status changed from needs_review to positive_review
I applied the patch trac_4949-scripts.patch, then moved the modified sage-spkg file to a fresh source directory of sage-4.7.rc4. I set SAGE_BUILD_TMPDIR and SAGE_KEEP_BUILT_SPKGS, and did 'make testlong'. The builds took place in the location SAGE_BUILD_TMPDIR and all tests passed. I applied the patch trac_4949-installation.patch, did 'sage -b', then 'sage -docbuild installation html' and verified that the documentation change was made and makes sense. Positive review.
As a temporary hack to see how this "feels" you could delete spkg/build, then make it a symlink to /tmp/build/.