Opened 9 years ago
Last modified 7 years ago
#14202 new defect
Change interface to qsieve to not use system time command
Reported by: | jpflori | Owned by: | was |
---|---|---|---|
Priority: | minor | Milestone: | sage-6.4 |
Component: | interfaces: optional | Keywords: | time optional sieve |
Cc: | kcrisman, dimpase | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
On some systems (including but not limited to Cygwin), there is a bash "time
" keyword but no time
command.
This is problematic in sage/interfaces/qsieve.py (see optional - time
) doctests.
See also:
Change History (11)
comment:1 Changed 9 years ago by
- Description modified (diff)
- Summary changed from Workaround potential absence of time command on Cygwin to Workaround potential absence of time command
comment:2 Changed 9 years ago by
comment:3 follow-up: ↓ 4 Changed 9 years ago by
- Keywords cygwin removed
This ticket has absolutely nothing to do with Cygwin.
Regardless, making time
a prereq is not needed, it would be easy to fix the qsieve
code not to rely on a time command.
comment:4 in reply to: ↑ 3 Changed 9 years ago by
Replying to jdemeyer:
This ticket has absolutely nothing to do with Cygwin.
Regardless, making
time
a prereq is not needed, it would be easy to fix theqsieve
code not to rely on a time command.
I agree with that, and would really not like to add new prereqs on any platform.
comment:5 follow-up: ↓ 6 Changed 9 years ago by
- Component changed from cygwin to interfaces
- Keywords sieve added
- Owner changed from tbd to was
- Summary changed from Workaround potential absence of time command to Change interface to qsieve to not use system time command
I'm changing the summary. This is really a bug, if it's a bug, in the way interface/qsieve.py is written. Could we use whatever does time
or timeit
in Sage?
comment:6 in reply to: ↑ 5 Changed 9 years ago by
Replying to kcrisman:
I'm changing the summary. This is really a bug, if it's a bug, in the way interface/qsieve.py is written. Could we use whatever does
time
ortimeit
in Sage?
Try this:
sage: ?walltime Type: function String Form:<function walltime at 0xb9d488> File: /usr/local/src/sage-5.7.beta1/local/lib/python2.7/site-packages/sage/misc/misc.py Definition: walltime(t=0) Docstring: Return the wall time in second, or with optional argument t, return the wall time since time t. "Wall time" means the time on a wall clock, i.e., the actual time. INPUT: * "t" - (optional) float, time in CPU seconds OUTPUT: * "float" - time in seconds EXAMPLES: sage: w = walltime() sage: F = factor(2^199-1) sage: walltime(w) # somewhat random 0.8823847770690918
comment:7 Changed 9 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:8 Changed 8 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:9 Changed 8 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:10 Changed 8 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:11 Changed 7 years ago by
- Component changed from interfaces to interfaces: optional
Cygwin has
time
, it just needs to be installed. Thus, I propose making the presence oftime
a Cygwin prereq.