[Haskell-cafe] getNumCapabilities always returns 1 with GHC 7.10.2 on OS X

Michael Snoyman michael at snoyman.com
Mon Aug 24 10:18:36 UTC 2015


How about --ghc-options:

    stack ghci --ghc-options "+RTS -N8 -RTS"

On Mon, Aug 24, 2015 at 1:14 PM, Geraldus <heraldhoi at gmail.com> wrote:

> Ok, now it shows me eight cores.  So, I've passed arguments incorrectly,
> what is the correct way to do this?
>
> *(Also, `$(stack exec which ghci) +RTS -N8` does not work with fish shell
> which I'm using by default, but I tested your suggestion in bash)*
>
> пн, 24 авг. 2015 г. в 14:37, Michael Snoyman <michael at snoyman.com>:
>
>> It looks like you're sending the RTS options to `stack` in the first one,
>> not to ghci itself. What's the result with `$(stack exec which ghci) +RTS
>> -N8`?
>>
>> On Mon, Aug 24, 2015 at 12:32 PM, Geraldus <heraldhoi at gmail.com> wrote:
>>
>>> I have OS X Yosemite 10.10.4.  There are two bundles of GHC (from
>>> ghcformacosx.github.io): 7.10.1 and 7.10.2.  The latter always shows me
>>> one core when running `getNumCapabilities` action:
>>>
>>> *GHC 7.10.2*
>>> > stack ghci +RTS -N8
>>> Using resolver: lts-3.0 from global config file:
>>> /Users/arthurfayzrakhmanov/.stack/global/stack.yaml
>>> Configuring GHCi with the following packages:
>>> GHCi, version 7.10.2: http://www.haskell.org/ghc/  :? for help
>>> Prelude> :m +Control.Concurrent
>>> Prelude Control.Concurrent> getNumCapabilities
>>> 1
>>>
>>>
>>> *GHC 7.10.1*
>>> > /Applications/ghc-7.10.1.app/Contents/bin/ghci +RTS -N8
>>> GHCi, version 7.10.1: http://www.haskell.org/ghc/  :? for help
>>> Prelude> :m +Control.Concurrent
>>> Prelude Control.Concurrent> getNumCapabilities
>>> 8
>>>
>>> It looks like a 7.10.2 bug, can some one confirm that?
>>>
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> Haskell-Cafe at haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150824/462e9d5d/attachment.html>


More information about the Haskell-Cafe mailing list