Opened 10 years ago

Closed 7 years ago

#9164 closed defect (worksforme)

cygwin: gap.cputime() does not work

Reported by: was Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: porting: Cygwin Keywords:
Cc: jpflori, dimpase Merged in:
Authors: Reviewers: Jean-Pierre Flori, Karl-Dieter Crisman
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

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: 

Change History (8)

comment:1 Changed 7 years ago by kcrisman

  • Cc jpflori dimpase added

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?

comment:2 follow-up: Changed 7 years ago by jpflori

  • Status changed from new to needs_review

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.

comment:3 in reply to: ↑ 2 ; follow-up: Changed 7 years ago by jpflori

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.

comment:4 Changed 7 years ago by jpflori

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).

comment:5 Changed 7 years ago by kcrisman

JP, see #14184. What do you think?

comment:6 in reply to: ↑ 3 Changed 7 years ago by jdemeyer

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.

comment:7 Changed 7 years ago by kcrisman

  • Milestone changed from sage-5.8 to sage-duplicate/invalid/wontfix
  • Reviewers set to Jean-Pierre Flori, Karl-Dieter Crisman
  • Status changed from needs_review to positive_review

After a rebase, this works! Awesome.

comment:8 Changed 7 years ago by jdemeyer

  • Resolution set to worksforme
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.