getNumCapabilities always returns 1 with GHC 7.10.2 on OS X

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?

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
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@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

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
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
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@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

How about --ghc-options:
stack ghci --ghc-options "+RTS -N8 -RTS"
On Mon, Aug 24, 2015 at 1:14 PM, Geraldus
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
: 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
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@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

Great, thanks Michael. That was false alarm, please excuse me.
пн, 24 авг. 2015 г. в 15:19, Michael Snoyman
How about --ghc-options:
stack ghci --ghc-options "+RTS -N8 -RTS"
On Mon, Aug 24, 2015 at 1:14 PM, Geraldus
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
: 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
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@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe

On Mon, Aug 24, 2015 at 5:32 AM, Geraldus
stack ghci +RTS -N8
For the record: stack ghci --RTS +RTS -N8 The first --RTS stops stack's RTS from consuming RTS options but is itself consumed, thus letting ghci's RTS consume +RTS -N8. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
participants (3)
-
Brandon Allbery
-
Geraldus
-
Michael Snoyman