the new version of WAIT (in #2226) is less accurate that the previous one version on my HPC super busy (debian), my laptop (u22.04) and also on OSX (clearly WAIT() is not super critical)
On the Debian side (48 cores, heavy load today), the version before :
GDL - GNU Data Language, Version v1.1.3-39-gef2d0aec-dirty
[...]
GDL> test_wait
% Compiled module: TEST_WAIT.
Currently tested DELAY : 0.100000
0.10011697
0.10010219
0.10008097
Currently tested DELAY : 0.250000
0.25008512
0.25012088
0.25009203
Currently tested DELAY : 0.500000
0.50011206
0.50010300
0.50008607
Currently tested DELAY : 1.00000
1.0001249
1.0001280
1.0001431
% TEST_WAIT: Success: Tolerance Time Error was never exceed by WAIT
New version :
GDL - GNU Data Language, Version v1.1.3-40-g2f4c55a9-dirty
[...]
GDL> test_wait
% Compiled module: TEST_WAIT.
Currently tested DELAY : 0.100000
0.11017108
0.11024809
0.11045504
Currently tested DELAY : 0.250000
0.26020503
0.26028204
0.26026583
Currently tested DELAY : 0.500000
0.51020503
0.51023912
0.51022291
Currently tested DELAY : 1.00000
1.0102470
1.0102870
1.0103052
% TEST_WAIT: Tolerance Time error was exceed 12 times.
The documentation is clear : sleep_for(2.5s) means at least approximately 2.5 seconds.
The thread can resume later depending on OS scheduling and system load; it isn't a precise timer.
(I made some tests based on that in the past, with same result.) Here the systematic bias seems to be quite constant at 0.01 s,
maybe we can put "t-0.01" (> 0 !)
We always had trouble with WAIT, but especially on OSX, not on Linux, isn't it ?
Hum, I compile also on a M2 running OSX, and I got same figure :
Old
GDL - GNU Data Language, Version v1.1.3-39-gef2d0aec-dirty
[...]
GDL> test_wait
% Compiled module: TEST_WAIT.
Currently tested DELAY : 0.100000
0.10154915
0.11003304
0.11003304
Currently tested DELAY : 0.250000
0.25536799
0.25765109
0.25228906
Currently tested DELAY : 0.500000
0.50456500
0.50327206
0.51003599
Currently tested DELAY : 1.00000
1.0100410
1.0100379
1.0100360
% TEST_WAIT: Success: Tolerance Time Error was never exceed by WAIT
New version
GDL - GNU Data Language, Version v1.1.3-40-g2f4c55a9-dirty
[...]
GDL> test_wait
% Attempt to call undefined procedure: TEST_WAIT
% Execution halted at: $MAIN$
GDL> cd, 'testsuite/
GDL> test_wait
% Compiled module: TEST_WAIT.
Currently tested DELAY : 0.100000
0.12511802
0.11664009
0.12506890
Currently tested DELAY : 0.250000
0.27506804
0.27416611
0.27506495
Currently tested DELAY : 0.500000
0.52004814
0.51826310
0.51666594
Currently tested DELAY : 1.00000
1.0219820
1.0239730
1.0188940
% TEST_WAIT: Tolerance Time error was exceed 12 times.
the new version of WAIT (in #2226) is less accurate that the previous one version on my HPC super busy (debian), my laptop (u22.04) and also on OSX (clearly WAIT() is not super critical)
On the Debian side (48 cores, heavy load today), the version before :
New version :
The documentation is clear : sleep_for(2.5s) means at least approximately 2.5 seconds.
The thread can resume later depending on OS scheduling and system load; it isn't a precise timer.
(I made some tests based on that in the past, with same result.) Here the systematic bias seems to be quite constant at 0.01 s,
maybe we can put "t-0.01" (> 0 !)
We always had trouble with WAIT, but especially on OSX, not on Linux, isn't it ?
Hum, I compile also on a M2 running OSX, and I got same figure :
Old
New version