[Gbbopen-developer] portable threads on sbcl 64bit linux tests fail with pristine source

Antony Sequeira antony.sequeira at gmail.com
Wed Oct 24 23:44:05 EDT 2007


Current tests take too long.
They show 0 but the actual time taken is quite a few minutes.
May be it just needs to also show real time
GET-INTERNAL-REAL-TIME
in addition to the  run time

Here is the current output
;; Starting portable threads tests...
;; Performing basic lock tests...
;;   Timing 1000000 nonrecursive-lock acquisitions... 1.776 seconds
;;   Timing 1000000 recursive-lock acquisitions... 1.8 seconds
;;   Timing 1000000 condition-variable lock acquisitions... 1.84 seconds
;;   Checking with a non-lock object...
;;   Testing recursive locking with a recursive lock...
;;   Checking recursive locking with a non-recursive lock...
;;   Testing with-lock-held returned values...
;; Basic lock tests completed
;; Testing atomic-incf/decf...
;; Atomic-incf/decf test completed.
;; Performing with-timeout tests...
;; With-timeout tests completed
;; Performing basic thread tests...
;;   Timing (sleep 0), run time should be zero seconds... 0.0 seconds
;;   Timing (sleep 10), run time should also be zero seconds... 0.0 seconds
;;   Timing 100000 (sleep 0)s... 0.0 seconds
WARNING: 100000 (sleep 0)s took 0.0 seconds
;;   Timing 100000 throwable (sleep 0)s... 0.02 seconds
;; Basic thread completed
;; Performing nonrecursive lock contention tests...
;; Nonrecursive lock contention tests completed
;; Performing recursive lock contention tests...
;; Recursive lock contention tests completed
;; Performing condition-variable wait & signal tests...
;;    Waiting on CV...
;;    Continuing on CV...
;; Condition-variable wait & signal tests completed
;; Performing condition-variable wait & broadcast tests...
;;    Waiting on broadcast CV...
;;    Also continuing on broadcast CV...
;; Condition-variable wait & broadcast tests completed
;; Performing condition-variable-wait-with-timeout (non-timeout) tests...
;;    Waiting-with-timeout on CV...
;;    Continuing on waiting-with-timout CV...
;; Condition-variable wait-with-timeout (non-timeout) tests completed
;; Performing condition-variable wait-with-timeout (timeout) tests...
;;    Waiting-with-timeout (forever) on CV...
;;    Continuing without CV...
;; Condition-variable wait-with-timeout (timeout) tests completed
;; Timing 10000 condition-variable wait & signals... 0.108 seconds
;; Condition-variable wait & signal timing test completed
;; Performing thread timing tests...
;;   Timing 10000 spawn-threads... 2.328 seconds
;; *************************************************************************
;; *** A do-nothing thread is still a member of (all-threads)
;; *************************************************************************
;;   Timing 10000 spawn and die threads... 2.416 seconds
;; Thread timing tests completed
;; Performing hibernate/awaken thread tests...
;;   Hibernate ready signal received.
;;   Awakening thread...
;;   Awake signal received, signaling proceed.
;;   Waiting for rehibernate signal...
;;   Rehibernate ready signal received.
;;   Trying symbol-value-in-thread on hibernating thread...
;;   Re-awakening thread...
;;   Trying with-timeout on a hibernating thread...
;; Hibernate/awaken thread tests completed
;; Performing symbol-value-in-thread tests...
;; Symbol-value-in-thread tests completed
;; Checking for unreclaimed threads...
;; Portable threads tests completed.
NIL

So, I modified the code portable-threads-test.lisp a bit to be
59,60c59,60
<     (let ((start-time-sym (gensym))(start-real-time-sym (gensym)))
<       `(let ((,start-time-sym
(get-internal-run-time))(,start-real-time-sym
(get-internal-real-time)))
---
>     (let ((start-time-sym (gensym)))
>       `(let ((,start-time-sym (get-internal-run-time)))
63,67c63,64
<                             (float internal-time-units-per-second)))
<              (real-time (/ (float (- (get-internal-real-time)
,start-real-time-sym))
<                           (float internal-time-units-per-second)))
<              )
<            (format t " ~s seconds ~s real seconds" run-time real-time)
---
>                             (float internal-time-units-per-second))))
>            (format t " ~s seconds" run-time)

and I get
(portable-threads-tests)
;; Starting portable threads tests...
;; Performing basic lock tests...
;;   Timing 1000000 nonrecursive-lock acquisitions... 1.752 seconds
1.755 real seconds
;;   Timing 1000000 recursive-lock acquisitions... 1.76 seconds 1.761
real seconds
;;   Timing 1000000 condition-variable lock acquisitions... 1.82
seconds 1.814 real seconds
;;   Checking with a non-lock object...
;;   Testing recursive locking with a recursive lock...
;;   Checking recursive locking with a non-recursive lock...
;;   Testing with-lock-held returned values...
;; Basic lock tests completed
;; Testing atomic-incf/decf...
;; Atomic-incf/decf test completed.
;; Performing with-timeout tests...
;; With-timeout tests completed
;; Performing basic thread tests...
;;   Timing (sleep 0), run time should be zero seconds... 0.0 seconds
0.004 real seconds
;;   Timing (sleep 10), run time should also be zero seconds... 0.0
seconds 10.004 real seconds
;;   Timing 100000 (sleep 0)s... 0.0 seconds 400.168 real seconds
WARNING: 100000 (sleep 0)s took 0.0 seconds
;;   Timing 100000 throwable (sleep 0)s... 0.0 seconds 400.159 real seconds
WARNING: 100000 throwable (sleep 0)s took 0.0 seconds
;; Basic thread completed
;; Performing nonrecursive lock contention tests...
;; Nonrecursive lock contention tests completed
;; Performing recursive lock contention tests...
;; Recursive lock contention tests completed
;; Performing condition-variable wait & signal tests...
;;    Waiting on CV...
;;    Continuing on CV...
;; Condition-variable wait & signal tests completed
;; Performing condition-variable wait & broadcast tests...
;;    Waiting on broadcast CV...
;;    Also continuing on broadcast CV...
;; Condition-variable wait & broadcast tests completed
;; Performing condition-variable-wait-with-timeout (non-timeout) tests...
;;    Waiting-with-timeout on CV...
;;    Continuing on waiting-with-timout CV...
;; Condition-variable wait-with-timeout (non-timeout) tests completed
;; Performing condition-variable wait-with-timeout (timeout) tests...
;;    Waiting-with-timeout (forever) on CV...
;;    Continuing without CV...
;; Condition-variable wait-with-timeout (timeout) tests completed
;; Timing 10000 condition-variable wait & signals... 0.1 seconds 0.081
real seconds
;; Condition-variable wait & signal timing test completed
;; Performing thread timing tests...
;;   Timing 10000 spawn-threads... 2.472 seconds 2.551 real seconds
;;   Timing 10000 spawn and die threads... 2.184 seconds 3.148 real seconds
;; Thread timing tests completed
;; Performing hibernate/awaken thread tests...
;;   Hibernate ready signal received.
;;   Awakening thread...
;;   Awake signal received, signaling proceed.
;;   Waiting for rehibernate signal...
;;   Rehibernate ready signal received.
;;   Trying symbol-value-in-thread on hibernating thread...
;;   Re-awakening thread...
;;   Trying with-timeout on a hibernating thread...
;; Hibernate/awaken thread tests completed
;; Performing symbol-value-in-thread tests...
;; Symbol-value-in-thread tests completed
;; Checking for unreclaimed threads...
;; Portable threads tests completed.
NIL

-Antony
P.S.: should I stop cc'ng the mailing list ?

On 10/24/07, Dan Corkill <corkill at gbbopen.org> wrote:
>
> >                                    Your machine is quite fast, so I've
> > increased the (sleep 0) iterations in portable-threads-test.lisp by an
> > order of magnitude ...
>
> Make that 2 orders or magnitude...
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> _______________________________________________
> Gbbopen-developer mailing list
> Gbbopen-developer at GBBopen.org
> http://GBBopen.org/mailman/listinfo/gbbopen-developer
>


-- 
-Antony Sequeira

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Gbbopen-developer mailing list