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

cygwin: gap.cputime() does not work #9164

Closed
williamstein opened this issue Jun 7, 2010 · 8 comments
Closed

cygwin: gap.cputime() does not work #9164

williamstein opened this issue Jun 7, 2010 · 8 comments

Comments

@williamstein
Copy link
Contributor


sage: gap.cputime()
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)

/home/wstein/sage-4.4.3/<ipython console> in <module>()

/home/wstein/sage-4.4.3/local/lib/python2.6/site-packages/sage/interfaces/gap.pyc in cputime(self, t)
    429         else:
    430             self.eval('_r_ := Runtimes();')
--> 431             r = sum(eval(self.eval('[_r_.user_time, _r_.system_time, _r_.user_time_children, _r_.system_time_children]')))
    432             return r/1000.0
    433 

/home/wstein/sage-4.4.3/local/lib/python2.6/site-packages/sage/interfaces/gap.pyc in <module>()

NameError: name 'fail' is not defined
sage: 

CC: @jpflori @dimpase

Component: porting: Cygwin

Reviewer: Jean-Pierre Flori, Karl-Dieter Crisman

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

@kcrisman
Copy link
Member

comment:1

Hey, is this related to the mysterious comment

sage: v, t = qsieve(n, time=True)   # uses the sieve    (optional: time doesn't work on cygwin) 

in sage/interfaces/qsieve.py? And does time now work on Cygwin?

@jpflori
Copy link

jpflori commented Feb 27, 2013

comment:2

Dont think so.

gap.cputime() works on both my systems.
It is even so nice it reports twice as much on the 32 bits than on the 64 bits...

So let's close this one.

Nonetheless the other qsieve examples do not work, this should be treated elsewhere.

@jpflori
Copy link

jpflori commented Feb 27, 2013

comment:3

Replying to @jpflori:

Nonetheless the other qsieve examples do not work, this should be treated elsewhere.

Or not:
http://comments.gmane.org/gmane.os.cygwin/106331
Although the time bash builtin works, there is no time command under Cygwin (nor in any package), so either we should modify the qsieve code (what will have to be done anyway after #12173 gets in and we get rid of qsieve which will then be obsoleted), or live with such code being optional.

@jpflori
Copy link

jpflori commented Feb 27, 2013

comment:4

My bad, I wrongly used cygcheck.
There is http://cygwin.com/packages/time/
So either we make time a prereq which I would not advocate for, or rather test at runtime if the real time executable is available.
But thats for another ticket anyway (unless I get my hand on a Mac, fix #12173 and remove qsieve by that time).

@kcrisman
Copy link
Member

comment:5

JP, see #14184. What do you think?

@jdemeyer
Copy link

comment:6

Replying to @jpflori:

Although the time bash builtin works, there is no time command under Cygwin (nor in any package)

This has nothing to do with Cygwin. My Gentoo Linux system doesn't have a time command either, it does have the time keyword (to be pedantic: it's a keyword, not a builtin) in bash.

so [...] we should modify the qsieve code

Exactly, see #14202.

@kcrisman
Copy link
Member

kcrisman commented Mar 8, 2013

Reviewer: Jean-Pierre Flori, Karl-Dieter Crisman

@kcrisman
Copy link
Member

kcrisman commented Mar 8, 2013

comment:7

After a rebase, this works! Awesome.

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

4 participants