Re: ghc_rts_options (defalting RTS flags)

2010-09-15 Thread Simon Marlow

On 14/09/2010 02:09, Thomas DuBuisson wrote:

All,

A recent SO question [1] led me to do a quick test on hard-coding RTS
options as suggested in the manual rts-hooks section [2].
Unfortunately the timing tests indicate ghc_rts_opts isn't being
used; tests with flags besides -N (ex: -H1024m) also show the
ghc_rts_opts being ignored.  Can someone shed light on what's
happening?  A grep of ghc source shows no users of ghc_rts_opts,
though that isn't definitive.

Cheers,
Thomas


$ cat rts-opts.h
char *ghc_rts_opts = -N;

$ ghc --make -O2 -threaded hashPar.hs rts-opts.h  -fforce-recomp
[1 of 1] Compiling Main ( hashPar.hs, hashPar.o )
Linking hashPar ...


Did you really mean rts-opts.h here?  I think it would probably work 
better if you put the declaration in a .c file.


Cheers,
Simon





$ time ./hashPar 10MB 10MB 10MB 10MB
[10MB,10MB,10MB]

real0m2.411s

$ time ./hashPar 10MB 10MB 10MB 10MB +RTS -N
[10MB,10MB,10MB]

real0m1.690s
--

[1] 
http://stackoverflow.com/questions/3704430/why-do-you-have-to-use-both-a-compiler-flag-and-a-run-time-flag-to-get-multicore
[2] 
http://haskell.org/ghc/docs/6.12.2/html/users_guide/runtime-control.html#rts-hooks
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


ghc_rts_options (defalting RTS flags)

2010-09-13 Thread Thomas DuBuisson
All,

A recent SO question [1] led me to do a quick test on hard-coding RTS
options as suggested in the manual rts-hooks section [2].
Unfortunately the timing tests indicate ghc_rts_opts isn't being
used; tests with flags besides -N (ex: -H1024m) also show the
ghc_rts_opts being ignored.  Can someone shed light on what's
happening?  A grep of ghc source shows no users of ghc_rts_opts,
though that isn't definitive.

Cheers,
Thomas


$ cat rts-opts.h
char *ghc_rts_opts = -N;

$ ghc --make -O2 -threaded hashPar.hs rts-opts.h  -fforce-recomp
[1 of 1] Compiling Main ( hashPar.hs, hashPar.o )
Linking hashPar ...

$ time ./hashPar 10MB 10MB 10MB 10MB
[10MB,10MB,10MB]

real0m2.411s

$ time ./hashPar 10MB 10MB 10MB 10MB +RTS -N
[10MB,10MB,10MB]

real0m1.690s
--

[1] 
http://stackoverflow.com/questions/3704430/why-do-you-have-to-use-both-a-compiler-flag-and-a-run-time-flag-to-get-multicore
[2] 
http://haskell.org/ghc/docs/6.12.2/html/users_guide/runtime-control.html#rts-hooks
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users