#4761: [with patch, needs work] global cputime (inclusive some subprocesses like
Singular)
-----------------------------------------+----------------------------------
 Reporter:  malb                         |        Owner:  malb      
     Type:  enhancement                  |       Status:  new       
 Priority:  major                        |    Milestone:  sage-3.4.1
Component:  misc                         |   Resolution:            
 Keywords:  global cputime subprocesses  |  
-----------------------------------------+----------------------------------
Changes (by SimonKing):

  * keywords:  => global cputime subprocesses
  * summary:  [with patch, needs review] global cputime (inclusive some
              subprocesses like Singular) => [with patch,
              needs work] global cputime (inclusive some
              subprocesses like Singular)

Comment:

 First of all, the patch applies cleanly.

 I tested the example from the documentation, and I tested an example
 involving singular and gap.

 What I find really amazing: Assume that you did
 {{{
 sage: t=cputime(subprocesses=True)
 sage: s=cputime(subprocesses=False)
 }}}
 and later you do
 {{{
 sage: cputime(t)
 sage: cputime(s)
 }}}

 I expected that `cputime(t)` would assume `subprocesses=False`, since its
 previous usage (in the definition of s) had this option. But `cputime(t)`
 indeed recognizes that t was defined with `subprocesses=True`. This is a
 very nice feature.

 However, something seems to be wrong.
 I did the following:
 {{{
 sage: t=cputime(subprocesses=True)
 sage: s=cputime(subprocesses=False)
 sage: {... some lengthy computation...}
 sage: cputime(t)
 1.440028
 sage: cputime(s)
 0.45202800000000032
 sage: cputime(s,subprocesses=True)
 1.972029
 sage: cputime()
 2.2761420000000001
 sage: cputime(subprocesses=False)
 2.2801420000000001
 sage: cputime(subprocesses=True)
 3.800142
 sage: quit
 Exiting SAGE (CPU time 0m0.65s, Wall time 11m49.60s).
 Exiting spawned Singular process.
 Exiting spawned Gap process.
 }}}

 Hence, when leaving Sage, it is stated that the CPU time spent is 0.65s,
 whereas `cputime(subprocesses=False)` claims that it is more than 2
 seconds. Therefore, I can not give a positive review yet.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4761#comment:8>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to