Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://www.haskell.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. -with-rtsopts ignored at compile time (Kees Bleijenberg) 2. Re: -with-rtsopts ignored at compile time (Brandon Allbery) 3. Re: -with-rtsopts ignored at compile time (Kees Bleijenberg) 4. Re: -with-rtsopts ignored at compile time (Brandon Allbery) ---------------------------------------------------------------------- Message: 1 Date: Mon, 21 Oct 2013 14:01:06 +0200 From: "Kees Bleijenberg" <k.bleijenb...@lijbrandt.nl> To: "'The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell'" <beginners@haskell.org> Subject: [Haskell-beginners] -with-rtsopts ignored at compile time Message-ID: <000001cece55$393e76a0$abbb63e0$@bleijenb...@lijbrandt.nl> Content-Type: text/plain; charset="us-ascii" When I run my program, I get a stack overflow message (current stacksize is 8388608 bytes) and the advice to use +RTS -Ksize -RTS The Haskell code creates a Windows dll, so no command line. That's why I want to change the stack size at compile time. I tried ghc -shared -O2 -o -with-rtsopts="-H128m -K64m" TBGlas.dll TBGlasDll.hs Ghc tells that it links with "-H128m -K64m". When I run the program I still get a message overflow with again the same (?) 8388608 stack size. I also changed the stacksize of the calling program, but no luck (same message). I wonder whether ghc ignores the -with-rtsopts parameter? Probably the problem is caused by not enough strictness, but still I want te make sure that it is not the stacksize (it is a big program). Kees -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20131021/998ebd33/attachment-0001.html> ------------------------------ Message: 2 Date: Mon, 21 Oct 2013 08:52:36 -0400 From: Brandon Allbery <allber...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] -with-rtsopts ignored at compile time Message-ID: <cakfcl4voqjwraft2lqweooq3xpnf5wbutertzvxy8hnoj5v...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Mon, Oct 21, 2013 at 8:01 AM, Kees Bleijenberg < k.bleijenb...@lijbrandt.nl> wrote: > When I run my program, I get a stack overflow message (current stacksize > is 8388608 bytes) and the advice to use +RTS ?Ksize -RTS**** > > The Haskell code creates a Windows dll, so no command line. That?s why I > want to change the stack size at compile time. > I think the default RTS options are only settable in a compile that produces an executable; otherwise there would have to be a chunk of code that retrieved all the rtsopts from every Haskell-compiled DLL and somehow reconciled any conflicts between them. Also note that if the main program is in C, you don't get -with-rtsopts processing at all; see http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#using-own-mainfor how you set RTS options in this case. (See at "To use +RTS flags with hs_init()".) In this particular case you may be better off just using the %GHCRTS% environment variable. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20131021/71b5cdc9/attachment-0001.html> ------------------------------ Message: 3 Date: Mon, 21 Oct 2013 19:51:37 +0200 From: "Kees Bleijenberg" <k.bleijenb...@lijbrandt.nl> To: "'The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell'" <beginners@haskell.org> Subject: Re: [Haskell-beginners] -with-rtsopts ignored at compile time Message-ID: <000001cece86$30def260$929cd720$@bleijenb...@lijbrandt.nl> Content-Type: text/plain; charset="utf-8" I understand the problem. I?ve set the GHCRTS environment variable and when I run the program I get : <unknown>: Most RTS options are disabled. Link with ?rtsopts to enable them. Then I added rtsopts to the command line: ghc -shared -rtsopts -O2 -o TBGlas.dll TBGlasDll.hs and I get the same errormessage again: Most RTS options are?? What is the problem? I?am using GHC version 7.4.2 in Windows. Greetings, Kees Van: Beginners [mailto:beginners-boun...@haskell.org] Namens Brandon Allbery Verzonden: maandag 21 oktober 2013 14:53 Aan: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell Onderwerp: Re: [Haskell-beginners] -with-rtsopts ignored at compile time On Mon, Oct 21, 2013 at 8:01 AM, Kees Bleijenberg <k.bleijenb...@lijbrandt.nl> wrote: When I run my program, I get a stack overflow message (current stacksize is 8388608 bytes) and the advice to use +RTS ?Ksize -RTS The Haskell code creates a Windows dll, so no command line. That?s why I want to change the stack size at compile time. I think the default RTS options are only settable in a compile that produces an executable; otherwise there would have to be a chunk of code that retrieved all the rtsopts from every Haskell-compiled DLL and somehow reconciled any conflicts between them. Also note that if the main program is in C, you don't get -with-rtsopts processing at all; see http://www.haskell.org/ghc/docs/latest/html/users_guide/ffi-ghc.html#using-own-main for how you set RTS options in this case. (See at "To use +RTS flags with hs_init()".) In this particular case you may be better off just using the %GHCRTS% environment variable. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20131021/9051314f/attachment-0001.html> ------------------------------ Message: 4 Date: Mon, 21 Oct 2013 14:03:13 -0400 From: Brandon Allbery <allber...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] -with-rtsopts ignored at compile time Message-ID: <cakfcl4ukdcyssgrwe5k5z6r2dbkzxduccft1kb+ionlv3_q...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Mon, Oct 21, 2013 at 1:51 PM, Kees Bleijenberg < k.bleijenb...@lijbrandt.nl> wrote: > I understand the problem. I?ve set the GHCRTS environment variable and > when I run the program I get : <unknown>: Most RTS options are disabled. > Link with ?rtsopts to enable them. **** > > Then I added rtsopts to the command line: ghc -shared -rtsopts -O2 -o > TBGlas.dll TBGlasDll.hs**** > > and I get the same errormessage again: Most RTS options are?? What is > the problem? > Exact same issue. Those cannot be per DLL, they apply to the final program (what would it mean for only some DLLs to allow RTS options? There's only one runtime!); and you'd probably have to use the same mechanism I pointed at before if you're invoking hs_main() from C instead of using a Haskell main function. -- brandon s allbery kf8nh sine nomine associates allber...@gmail.com ballb...@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/beginners/attachments/20131021/4ed22155/attachment.html> ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 64, Issue 34 *****************************************