Definitely speedtst.prg hangs somewhere
I checked OW linker doc,
If not STACK option is used, as OW doc say:
-------------------
"default stack size varies for both 16-bit and protected-mode 32-bit
applications depending on the executable format ..."
-------------------
Entire page for STACK OPTION is below
Removing OP stack=65536 and Using OPTION MAP "default stack size" can be
checked
For hbrun_mt.exe hbrun.map show:
-----------------------------
+-----------------------+
| Linker Statistics |
+-----------------------+
Stack size: 00012000 (73728.)
Memory size: 001db03d (1945661.)
Entry point address: 0002:000bb30e
-----------------------------
So default stack size is greater than previous used ( 73728 > 65536 )
and should be enough
This stack value is used in thread 1, and as limit in thread except 1 if
"-sg" flag is used
As I am not using "-sg" flag, then thread except 1 use fixed value
stated in code using _beginthread()
Testing:
tests\mt\mttest*.prg
********************
Everyone run except 09, 10 due to known missings
speedtst.prg
************
Just MT
Depend of parameters
As exposed before, run extremaly slow and sometimes remain freezed
Entire results are below
hbrun_mt.exe speedtst.prg
=========================
[ total application time: ]...................................258.61
[ total real time: ]..........................................263.15
hbrun_mt.exe speedtst.prg --exclude=mem
=========================
[ total application time: ]...................................103.55
[ total real time: ]..........................................107.36
hbrun_mt.exe speedtst.prg --exclude=mem --scale
=========================
26.3 minutos
[ total application time: ]...................................251.74
[ total real time: ].........................................1578.49
hbrun_mt.exe speedtst.prg --exclude=mem --scale --thread=2
=========================
Remain doing something elsewhere
After 1 hour 40 minutes, I cancelled it
------------------------
[E:\harbour811\harbour\tests]e:\harbour811\ow\bin\hbrun_mt.exe
speedtst.prg --exclude=mem --scale --thread=2
11/16/08 10:18:29 OS/2 4.50
Harbour 1.1.0dev (Rev. 9903) (MT)+ Open Watcom C++ 12.70.8 (32-bit)
THREADS: 2
N_LOOPS: 1000000
excluded tests: 029 030 023 025 027 040 041 043 052 053 019 022 031 032 054
1 th. 2 th.
factor
============================================================================
The external process was cancelled by a Ctrl+Break or another process.
^C
------------------------
I used these linker flags:
LDFLAGS = debug all OP MAP OP CASEEXACT
Obviously some flags for compiler / linker are missing
I checked all "linker directives and options" of OW doc, but many of
them I don not understand
Some one like this can be related
...............................
Formats: OS/2
The "INTERNALRELOCS" option is used with LX format executables under
32-bit OS/2. By default, OS/2 executables do not contain internal
relocation information and OS/2 Dynamic Link Libraries do contain
internal relocation information. This option causes the Open Watcom
Linker to include internal relocation information in OS/2 LX format
executables.
The format of the "INTERNALRELOCS" option (short form "INT") is as follows.
OPTION INTERNALRELOCS
...............................
Przemek, Maurilio:
Review "linker directives and options" of OW doc, perhaps you can find
something related
Przemek: do you have any idea why with "--thread=2" never end ?
Any other suggestions ?
David Macias
STACK option
============
Formats: All
The "STACK" option can be used to increase the size of the stack. The
format of the "STACK" option (short form "ST") is as follows.
OPTION STACK=n
where
description
n
represents a value. The complete form of n is the following.
[0x]d{d}[k|m]
d represents a decimal digit. If 0x is specified, the string of digits
represents a hexadecimal number. If k is specified, the value is
multiplied by 1024. If m is specified, the value is multiplied by
1024*1024.
The default stack size varies for both 16-bit and protected-mode 32-bit
applications depending on the executable format. You can determine the
default stack size by looking at the map file that can be generated when
an application is linked ("OPTION MAP"). During execution of your
program, you may get an error message indicating your stack has
overflowed. If you encounter such an error, you must link your
application again, this time specifying a larger stack size using the
"STACK" option.
Example:
option stack=8192
hbrun_mt.exe speedtst.prg
=========================
11/16/08 07:14:30 OS/2 4.50
Harbour 1.1.0dev (Rev. 9903) (MT) Open Watcom C++ 12.70.8 (32-bit)
THREADS: 0
N_LOOPS: 1000000
[ T000: empty loop overhead ]...................................0.23
====================================================================
[ T001: x := L_C ]..............................................1.52
[ T002: x := L_N ]..............................................0.26
[ T003: x := L_D ]..............................................0.23
[ T004: x := S_C ]..............................................1.52
[ T005: x := S_N ]..............................................0.26
[ T006: x := S_D ]..............................................0.19
[ T007: x := M_C ]..............................................1.61
[ T008: x := M_N ]..............................................0.29
[ T009: x := M_D ]..............................................0.32
[ T010: x := P_C ]..............................................1.58
[ T011: x := P_N ]..............................................0.29
[ T012: x := P_D ]..............................................0.32
[ T013: x := F_C ]..............................................2.45
[ T014: x := F_N ]..............................................0.71
[ T015: x := F_D ]..............................................0.55
[ T016: x := o:GenCode ]........................................2.26
[ T017: x := o[8] ].............................................1.87
[ T018: round( i / 1000, 2 ) ]..................................1.06
[ T019: str( i / 1000 ) ].......................................3.29
[ T020: val( s ) ]..............................................2.26
[ T021: val( a [ i % 16 + 1 ] ) ]...............................4.35
[ T022: dtos( d - i % 10000 ) ].................................3.39
[ T023: eval( { || i % 16 } ) ].................................8.61
[ T024: eval( bc := { || i % 16 } ) ]...........................2.39
[ T025: eval( { |x| x % 16 }, i ) ].............................5.42
[ T026: eval( bc := { |x| x % 16 }, i ) ].......................2.29
[ T027: eval( { |x| f1( x ) }, i ) ]............................5.97
[ T028: eval( bc := { |x| f1( x ) }, i ) ]......................2.81
[ T029: x := &( "f1(" + str(i) + ")" ) ].......................22.87
[ T030: bc := &( "{|x|f1(x)}" ); eval( bc, i ) ]...............29.19
[ T031: x := valtype( x ) + valtype( i ) ].....................4.74
[ T032: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........6.97
[ T033: x := a[ i % 16 + 1 ] == s ].............................5.03
[ T034: x := a[ i % 16 + 1 ] = s ]..............................5.19
[ T035: x := a[ i % 16 + 1 ] >= s ].............................5.23
[ T036: x := a[ i % 16 + 1 ] <= s ].............................5.13
[ T037: x := a[ i % 16 + 1 ] < s ]..............................5.19
[ T038: x := a[ i % 16 + 1 ] > s ]..............................5.13
[ T039: ascan( a, i % 16 ) ]....................................2.81
[ T040: ascan( a, { |x| x == i % 16 } ) ]......................33.35
[ T041: if i%1000==0;a:={};end; aadd(a,{i,1,.T.,s,s2,a2,bc ]...18.35
[ T042: x := a ]................................................1.61
[ T043: x := {} ]...............................................3.52
[ T044: f0() ]..................................................0.45
[ T045: f1( i ) ]...............................................0.71
[ T046: f2( c[1...8] ) ]........................................1.90
[ T047: f2( c[1...40000] ) ]....................................1.87
[ T048: f2( @c[1...40000] ) ]...................................1.90
[ T049: f2( @c[1...40000] ), c2 := c ]..........................2.10
[ T050: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................8.03
[ T051: f2( a ) ]...............................................1.97
[ T052: x := f4() ].............................................4.52
[ T053: x := f5() ].............................................2.97
[ T054: f_prv( c ) ]............................................7.52
====================================================================
[ total application time: ]...................................258.61
[ total real time: ]..........................................263.15
hbrun_mt.exe speedtst.prg --exclude=mem
=========================
11/16/08 07:21:55 OS/2 4.50
Harbour 1.1.0dev (Rev. 9903) (MT) Open Watcom C++ 12.70.8 (32-bit)
THREADS: 0
N_LOOPS: 1000000
excluded tests: 029 030 023 025 027 040 041 043 052 053 019 022 031 032 054
[ T000: empty loop overhead ]...................................0.32
====================================================================
[ T001: x := L_C ]..............................................1.58
[ T002: x := L_N ]..............................................0.29
[ T003: x := L_D ]..............................................0.26
[ T004: x := S_C ]..............................................1.55
[ T005: x := S_N ]..............................................0.23
[ T006: x := S_D ]..............................................0.19
[ T007: x := M_C ]..............................................1.65
[ T008: x := M_N ]..............................................0.35
[ T009: x := M_D ]..............................................0.35
[ T010: x := P_C ]..............................................1.55
[ T011: x := P_N ]..............................................0.32
[ T012: x := P_D ]..............................................0.35
[ T013: x := F_C ]..............................................2.39
[ T014: x := F_N ]..............................................0.74
[ T015: x := F_D ]..............................................0.55
[ T016: x := o:GenCode ]........................................2.35
[ T017: x := o[8] ].............................................1.94
[ T018: round( i / 1000, 2 ) ]..................................1.16
[ T020: val( s ) ]..............................................2.35
[ T021: val( a [ i % 16 + 1 ] ) ]...............................4.65
[ T024: eval( bc := { || i % 16 } ) ]...........................2.55
[ T026: eval( bc := { |x| x % 16 }, i ) ].......................2.55
[ T028: eval( bc := { |x| f1( x ) }, i ) ]......................3.45
[ T033: x := a[ i % 16 + 1 ] == s ].............................5.42
[ T034: x := a[ i % 16 + 1 ] = s ]..............................5.61
[ T035: x := a[ i % 16 + 1 ] >= s ].............................5.42
[ T036: x := a[ i % 16 + 1 ] <= s ].............................5.39
[ T037: x := a[ i % 16 + 1 ] < s ]..............................5.39
[ T038: x := a[ i % 16 + 1 ] > s ]..............................5.39
[ T039: ascan( a, i % 16 ) ]....................................3.00
[ T042: x := a ]................................................1.61
[ T044: f0() ]..................................................0.55
[ T045: f1( i ) ]...............................................0.84
[ T046: f2( c[1...8] ) ]........................................2.00
[ T047: f2( c[1...40000] ) ]....................................2.06
[ T048: f2( @c[1...40000] ) ]...................................2.03
[ T049: f2( @c[1...40000] ), c2 := c ]..........................2.35
[ T050: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................8.45
[ T051: f2( a ) ]...............................................2.06
====================================================================
[ total application time: ]...................................103.55
[ total real time: ]..........................................107.36
hbrun_mt.exe speedtst.prg --exclude=mem --scale
=========================
11/16/08 07:25:10 OS/2 4.50
Harbour 1.1.0dev (Rev. 9903) (MT) Open Watcom C++ 12.70.8 (32-bit)
THREADS: 1
N_LOOPS: 1000000
excluded tests: 029 030 023 025 027 040 041 043 052 053 019 022 031 032 054
1 th. 1 th.
factor
============================================================================
[ T001: x := L_C ]____________________________________ 1.72 4.87 -> 0.35
[ T002: x := L_N ]____________________________________ 2.07 3.05 -> 0.68
[ T003: x := L_D ]____________________________________ 2.03 4.14 -> 0.49
[ T004: x := S_C ]____________________________________ 4.28 4.15 -> 1.03
[ T005: x := S_N ]____________________________________ 3.28 1.07 -> 3.07
[ T006: x := S_D ]____________________________________ 8.36 1.12 -> 7.46
[ T007: x := M_C ]____________________________________ 5.39 5.44 -> 0.99
[ T008: x := M_N ]____________________________________ 4.21 0.98 -> 4.30
[ T009: x := M_D ]____________________________________ 6.40 1.10 -> 5.82
[ T010: x := P_C ]____________________________________ 4.56 4.90 -> 0.93
[ T011: x := P_N ]____________________________________ 4.87 1.05 -> 4.64
[ T012: x := P_D ]____________________________________ 3.03 2.11 -> 1.44
[ T013: x := F_C ]____________________________________ 6.55 7.75 -> 0.85
[ T014: x := F_N ]____________________________________ 2.03 3.10 -> 0.65
[ T015: x := F_D ]____________________________________ 1.88 1.13 -> 1.66
[ T016: x := o:GenCode ]______________________________ 11.35 3.40 -> 3.34
[ T017: x := o[8] ]___________________________________ 6.24 6.49 -> 0.96
[ T018: round( i / 1000, 2 ) ]________________________ 3.89 1.61 -> 2.42
[ T020: val( s ) ]____________________________________ 9.22 8.29 -> 1.11
[ T021: val( a [ i % 16 + 1 ] ) ]_____________________ 10.17 15.02 -> 0.68
[ T024: eval( bc := { || i % 16 } ) ]_________________ 9.82 11.10 -> 0.88
[ T026: eval( bc := { |x| x % 16 }, i ) ]_____________ 7.93 6.35 -> 1.25
[ T028: eval( bc := { |x| f1( x ) }, i ) ]____________ 5.97 6.14 -> 0.97
[ T033: x := a[ i % 16 + 1 ] == s ]___________________ 10.30 10.37 -> 0.99
[ T034: x := a[ i % 16 + 1 ] = s ]____________________ 15.15 13.74 -> 1.10
[ T035: x := a[ i % 16 + 1 ] >= s ]___________________ 10.81 11.08 -> 0.98
[ T036: x := a[ i % 16 + 1 ] <= s ]___________________ 10.52 10.24 -> 1.03
[ T037: x := a[ i % 16 + 1 ] < s ]____________________ 10.88 10.51 -> 1.04
[ T038: x := a[ i % 16 + 1 ] > s ]____________________ 10.77 10.81 -> 1.00
[ T039: ascan( a, i % 16 ) ]__________________________ 6.01 6.16 -> 0.98
[ T042: x := a ]______________________________________ 3.98 3.48 -> 1.14
[ T044: f0() ]________________________________________ 1.57 1.66 -> 0.95
[ T045: f1( i ) ]_____________________________________ 2.10 1.75 -> 1.20
[ T046: f2( c[1...8] ) ]______________________________ 4.49 4.26 -> 1.05
[ T047: f2( c[1...40000] ) ]__________________________ 4.38 4.22 -> 1.04
[ T048: f2( @c[1...40000] ) ]_________________________ 4.33 4.51 -> 0.96
[ T049: f2( @c[1...40000] ), c2 := c ]________________ 5.25 4.65 -> 1.13
[ T050: f3( a, a2, s, i, s2, bc, i, n, x ) ]__________ 16.44 16.45 -> 1.00
[ T051: f2( a ) ]_____________________________________ 4.54 4.07 -> 1.12
============================================================================
[ TOTAL ]_________________________________________246.77 222.32 -> 1.11
============================================================================
[ total application time: ]...................................251.74
[ total real time: ].........................................1578.49
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour