Skip to content
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

Change interface to qsieve to not use system time command #14202

Open
jpflori opened this issue Feb 27, 2013 · 8 comments
Open

Change interface to qsieve to not use system time command #14202

jpflori opened this issue Feb 27, 2013 · 8 comments

Comments

@jpflori
Copy link

jpflori commented Feb 27, 2013

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:

CC: @kcrisman @dimpase

Component: interfaces: optional

Keywords: time optional sieve

Issue created by migration from https://trac.sagemath.org/ticket/14202

@jpflori jpflori added this to the sage-5.11 milestone Feb 27, 2013
@jdemeyer

This comment has been minimized.

@jdemeyer jdemeyer changed the title Workaround potential absence of time command on Cygwin Workaround potential absence of time command Feb 28, 2013
@dimpase
Copy link
Member

dimpase commented Mar 6, 2013

comment:2

Cygwin has /usr/bin/time, it just needs to be installed. Thus, I propose making the presence of time a Cygwin prereq.

@jdemeyer
Copy link

jdemeyer commented Mar 6, 2013

Changed keywords from cygwin time optional to time optional

@jdemeyer
Copy link

jdemeyer commented Mar 6, 2013

comment:3

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.

@jpflori
Copy link
Author

jpflori commented Mar 6, 2013

comment:4

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 the qsieve code not to rely on a time command.

I agree with that, and would really not like to add new prereqs on any platform.

@kcrisman
Copy link
Member

kcrisman commented Mar 8, 2013

Changed keywords from time optional to time optional sieve

@kcrisman
Copy link
Member

kcrisman commented Mar 8, 2013

comment:5

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?

@kcrisman kcrisman changed the title Workaround potential absence of time command Change interface to qsieve to not use system time command Mar 8, 2013
@jdemeyer
Copy link

jdemeyer commented Mar 8, 2013

comment:6

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 or timeit 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

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants