On Wed, 02 Dec 2009, David Arturo Macias Corona wrote: Hi,
> Now below are tests with only src\rtl\gtos2\Makefile adding: > HB_BUILD_OPTIM := no > Tests with > speedtst.exe --thread ... > does not fail with GPF Thank you very much. This is what I wanted to see :-) So all what we have to do is finding/adding method to disable only -s switch when GTOS2 is compiled by OpenWatcom. HB_BUILD_OPTIM := no disables all optimizations so we need something more selective here. Unfortunately we do not have switch to revert previously set -s but maybe we can find other switch which also resolves the problem. So far we know that -sg also resolves it. So in first step I'll add this code to src/rtl/gtos2/Makefile[15]: ifeq ($(HB_COMPILER),watcom) HB_CFLAGS += -sg endif and I'll commit it in a while. If possible please test. Then if you want then you can try also few other switches instead of: HB_CFLAGS += -sg in src/rtl/gtos2/Makefile. The following switches are stack related and it's possible that also some of them can help: HB_CFLAGS += -st HB_CFLAGS += -zu HB_CFLAGS += -of+ To reduce the time necessary for tests just simply replace -sg with one of the above switches delete src/rtl/gtos2/obj directory and call make install. Then recompile speedtst in MT mode and check if speedtst --thread works without GPF. If some of above switches will help to resolve the problem then later we can try to chose the one which has smallest speed overhead on final code. It's also possible that some combination of switches for segment registers can resolve the problem so you can try them. In OpenWatcom I've found the following switches which operates on it. -zdf DS floats (i.e. not fixed to DGROUP) -zdl load DS directly from DGROUP -zdp DS is pegged to DGROUP -zff FS floats (i.e. not fixed to a segment) -zfp FS is pegged to a segment -zgf GS floats (i.e. not fixed to a segment) -zgp GS is pegged to a segment > 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 > ------------------------ [...] So the speed overhead caused by compiling only GTOS2 without any optimization and with stack overflow check code is minimal. Very good. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour