On 08/20/10 02:03 AM, Mitesh Patel wrote:
On 08/19/2010 12:16 PM, Dr. David Kirkby wrote:
I am running some doc tests on my Blade 1000 and was concerned that the
file ptestlong.log had not had the time stamp changed for over an hour.

Using ls, I see:

-rw-r--r--   1 drkirkby other     190759 Aug 19 16:36 ptestlong.log

but when I typed 'date' immediately afterwards, I see

$ date
Thursday August 19 17:49:52 BST 2010

We can see that the file had not been updated for 73 minutes!

Finally when the file did get updated, the tests shown at the end had
all taken at most a few tens of seconds to run. The longest any doctest
took to run anywhere was less than 30 minutes.

So any ideas why the log file is not getting updated a bit more frequently?

That is strange.  What happens if you insert

     sys.stdout.flush()

at the end of SAGE_LOCAL/bin/sage-ptest's process_result function?  (I'm
not sure that this is the problem, but it might be worth checking.)

I'll try that. One big problem for me at least is that it takes a long while to run the doctests on that machine, so testing these things is not easy.

But I believe flushing stdout at the end of a test, if that is what this will do, can only be a good thing. I often see in the log something like



sage -t -long local/lib/python2.6/site-packages/sagenb-0.8.2-py2.6.egg/sagenb/testing/__init__.py
         [1.1 s]
sage -t -long local/lib/python2.6/site-packages/sagenb-0.8.2-py2.6.egg/sagenb/testing/tests/__init__.py
         [1.0 s]
sage -t  -long local/lib/python2.6/site




where only part of the output of the last test is shown. Then at some (almost random) time in the future, the output is updated and things look OK.

Clearly if two parallel tasks write to the same log file, there needs to be a locking mechanism to ensure both don't write to the same file. Do you know if this is in place? I've never actually seen what appears to be the mixture of two results in the one log file, so I assume there is something in place - either that or I've been very lucky.

Dave

--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to