Przemek:
I know but the problem seems to be inside OpenWatcom code and for me it looks like OpenWatcom bug which probably can be quite easy fixed but I need more information to be sure.
///
Thank you very much. So now we know that we can remove -s as workaround. Unfortunately it causes very big speed overhead. Much bigger then in Linux where removing -s reduce the speed only ~24 percent. It's 363% what is even bigger then in Windows (295% in my test).
That increase in Windows is surprise for me, so problem are not in OS/2 only
Now I would like to check if -s is necessary as global switch or it can be used locally only for GT2OS2 code. Please restore -s switch (just like in clean SVN code) and then add to src/rtl/gtos2/Makefile[5] this line:
HB_BUILD_OPTIM := no
It should disable optimization switches. Then check if speedtst works in MT mode.
src\rtl\gtos2\Makefile does not have HB_BUILD_OPTIM I used: set HB_BUILD_OPTIM=no Tests with speedtst.exe --thread ... fails as before with GPF: ----------------- SYS1808: The process has stopped. The software diagnostic code (exception code) is 0001. ----------------- Below are results using: ------------------------ hbmk2 -m -n -w -es2 -l -kmo -gc3 speedtst.prg speedtst.exe hbmk2 -m -n -w -es2 -l -kmo -gc3 -mt speedtst.prg speedtst.exe speedtst.exe --thread speedtst.exe --thread=2 --scale ------------------------ David Macias 2009.11.28 08:22:22 OS/2 4.50 Harbour 2.0.0beta3 (Rev. 13035) Open Watcom C++ 12.80.8 (32-bit) x86 THREADS: 0 N_LOOPS: 1000000 [ T000: empty loop overhead ]...................................0.00 ==================================================================== [ T001: x := L_C ]..............................................0.03 [ T002: x := L_N ]..............................................0.03 [ T003: x := L_D ]..............................................0.06 [ T004: x := S_C ]..............................................0.06 [ T005: x := S_N ]..............................................0.03 [ T006: x := S_D ]..............................................0.06 [ T007: x := M->M_C ]...........................................0.06 [ T008: x := M->M_N ]...........................................0.06 [ T009: x := M->M_D ]...........................................0.06 [ T010: x := M->P_C ]...........................................0.06 [ T011: x := M->P_N ]...........................................0.06 [ T012: x := M->P_D ]...........................................0.06 [ T013: x := F_C ]..............................................0.13 [ T014: x := F_N ]..............................................0.16 [ T015: x := F_D ]..............................................0.10 [ T016: x := o:Args ]...........................................0.13 [ T017: x := o[2] ].............................................0.10 [ T018: round( i / 1000, 2 ) ]..................................0.19 [ T019: str( i / 1000 ) ].......................................0.39 [ T020: val( s ) ]..............................................0.19 [ T021: val( a [ i % 16 + 1 ] ) ]...............................0.29 [ T022: dtos( d - i % 10000 ) ].................................0.32 [ T023: eval( { || i % 16 } ) ].................................0.26 [ T024: eval( bc := { || i % 16 } ) ]...........................0.16 [ T025: eval( { |x| x % 16 }, i ) ].............................0.23 [ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.19 [ T027: eval( { |x| f1( x ) }, i ) ]............................0.26 [ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.23 [ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ].................0.23 [ T030: x := &( "f1(" + str(i) + ")" ) ]........................1.87 [ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]................2.00 [ T032: x := valtype( x ) + valtype( i ) ].....................0.32 [ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........0.52 [ T034: x := a[ i % 16 + 1 ] == s ].............................0.19 [ T035: x := a[ i % 16 + 1 ] = s ]..............................0.23 [ T036: x := a[ i % 16 + 1 ] >= s ].............................0.23 [ T037: x := a[ i % 16 + 1 ] <= s ].............................0.23 [ T038: x := a[ i % 16 + 1 ] < s ]..............................0.23 [ T039: x := a[ i % 16 + 1 ] > s ]..............................0.23 [ T040: ascan( a, i % 16 ) ]....................................0.26 [ T041: ascan( a, { |x| x == i % 16 } ) ].......................1.87 [ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s,s2,a2 ]....0.52 [ T043: x := a ]................................................0.06 [ T044: x := {} ]...............................................0.10 [ T045: f0() ]..................................................0.06 [ T046: f1( i ) ]...............................................0.13 [ T047: f2( c[1...8] ) ]........................................0.10 [ T048: f2( c[1...40000] ) ]....................................0.10 [ T049: f2( @c[1...40000] ) ]...................................0.10 [ T050: f2( @c[1...40000] ), c2 := c ]..........................0.10 [ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.29 [ T052: f2( a ) ]...............................................0.06 [ T053: x := f4() ].............................................0.61 [ T054: x := f5() ].............................................0.16 [ T055: x := space(16) ]........................................0.13 [ T056: f_prv( c ) ]............................................0.23 ==================================================================== [ total application time: ]....................................15.35 [ total real time: ]...........................................15.35 2009.11.28 08:22:41 OS/2 4.50 Harbour 2.0.0beta3 (Rev. 13035) (MT) Open Watcom C++ 12.80.8 (32-bit) x86 THREADS: 0 N_LOOPS: 1000000 [ T000: empty loop overhead ]...................................0.03 ==================================================================== [ T001: x := L_C ]..............................................0.06 [ T002: x := L_N ]..............................................0.03 [ T003: x := L_D ]..............................................0.03 [ T004: x := S_C ]..............................................0.06 [ T005: x := S_N ]..............................................0.03 [ T006: x := S_D ]..............................................0.03 [ T007: x := M->M_C ]...........................................0.06 [ T008: x := M->M_N ]...........................................0.03 [ T009: x := M->M_D ]...........................................0.03 [ T010: x := M->P_C ]...........................................0.10 [ T011: x := M->P_N ]...........................................0.03 [ T012: x := M->P_D ]...........................................0.03 [ T013: x := F_C ]..............................................0.19 [ T014: x := F_N ]..............................................0.13 [ T015: x := F_D ]..............................................0.10 [ T016: x := o:Args ]...........................................0.16 [ T017: x := o[2] ].............................................0.10 [ T018: round( i / 1000, 2 ) ]..................................0.19 [ T019: str( i / 1000 ) ].......................................0.45 [ T020: val( s ) ]..............................................0.23 [ T021: val( a [ i % 16 + 1 ] ) ]...............................0.35 [ T022: dtos( d - i % 10000 ) ].................................0.35 [ T023: eval( { || i % 16 } ) ].................................0.48 [ T024: eval( bc := { || i % 16 } ) ]...........................0.19 [ T025: eval( { |x| x % 16 }, i ) ].............................0.32 [ T026: eval( bc := { |x| x % 16 }, i ) ].......................0.23 [ T027: eval( { |x| f1( x ) }, i ) ]............................0.39 [ T028: eval( bc := { |x| f1( x ) }, i ) ]......................0.29 [ T029: eval( bc := &("{ |x| f1( x ) }"), i ) ].................0.29 [ T030: x := &( "f1(" + str(i) + ")" ) ]........................3.06 [ T031: bc := &( "{|x|f1(x)}" ), eval( bc, i ) ]................3.26 [ T032: x := valtype( x ) + valtype( i ) ].....................0.39 [ T033: x := strzero( i % 100, 2 ) $ a[ i % 16 + 1 ] ]..........0.61 [ T034: x := a[ i % 16 + 1 ] == s ].............................0.32 [ T035: x := a[ i % 16 + 1 ] = s ]..............................0.35 [ T036: x := a[ i % 16 + 1 ] >= s ].............................0.32 [ T037: x := a[ i % 16 + 1 ] <= s ].............................0.32 [ T038: x := a[ i % 16 + 1 ] < s ]..............................0.35 [ T039: x := a[ i % 16 + 1 ] > s ]..............................0.32 [ T040: ascan( a, i % 16 ) ]....................................0.29 [ T041: ascan( a, { |x| x == i % 16 } ) ].......................2.87 [ T042: iif( i%1000==0, a:={}, ) , aadd(a,{i,1,.T.,s,s2,a2 ]....0.94 [ T043: x := a ]................................................0.06 [ T044: x := {} ]...............................................0.16 [ T045: f0() ]..................................................0.06 [ T046: f1( i ) ]...............................................0.10 [ T047: f2( c[1...8] ) ]........................................0.13 [ T048: f2( c[1...40000] ) ]....................................0.13 [ T049: f2( @c[1...40000] ) ]...................................0.06 [ T050: f2( @c[1...40000] ), c2 := c ]..........................0.16 [ T051: f3( a, a2, s, i, s2, bc, i, n, x ) ]....................0.42 [ T052: f2( a ) ]...............................................0.13 [ T053: x := f4() ].............................................0.68 [ T054: x := f5() ].............................................0.23 [ T055: x := space(16) ]........................................0.19 [ T056: f_prv( c ) ]............................................0.48 ==================================================================== [ total application time: ]....................................23.35 [ total real time: ]...........................................23.43 2009.11.28 08:23:05 OS/2 4.50 Harbour 2.0.0beta3 (Rev. 13035) (MT)+ Open Watcom C++ 12.80.8 (32-bit) x86 THREADS: all->56 N_LOOPS: 1000000 [ T000: empty loop overhead ]...................................0.03 ==================================================================== 2009.11.28 08:23:05 OS/2 4.50 Harbour 2.0.0beta3 (Rev. 13035) (MT)+ Open Watcom C++ 12.80.8 (32-bit) x86 THREADS: 2 N_LOOPS: 1000000 1 th. 2 th. factor ============================================================================ _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour