Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: NumCPU returns 0 on Solaris (gccgo) #6109

Closed
calmh opened this issue Aug 11, 2013 · 6 comments
Closed

runtime: NumCPU returns 0 on Solaris (gccgo) #6109

calmh opened this issue Aug 11, 2013 · 6 comments

Comments

@calmh
Copy link
Contributor

calmh commented Aug 11, 2013

What steps will reproduce the problem?

Getting the value of runtime.NumCPU().

http://play.golang.org/p/cuaf2ZHLIx

What is the expected output?

The number of processor cores installed in the machine, including hyperthreading if
enabled (eight, in my specific case).

What do you see instead?

Zero.

Which compiler are you using (5g, 6g, 8g, gccgo)?

Gccgo.

Which operating system are you using?

SunOS zlogin2.nym.se 5.11 joyent_20130808T195337Z i86pc i386 i86pc Solaris

(i.e. latest Illumos)

Which version are you using?  (run 'go version')

Gccgo in gcc 4.7.2.
@robpike
Copy link
Contributor

robpike commented Aug 12, 2013

Comment 1:

Labels changed: added priority-later, gccgo, removed priority-triage, go1.2maybe.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 3:

Labels changed: added go1.3maybe.

@ianlancetaylor
Copy link
Member

Comment 4:

Gccgo will not be part of the Go 1.3 release.

Labels changed: removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 5:

Labels changed: added repo-gccgo.

@minux
Copy link
Member

minux commented Dec 4, 2013

Comment 6:

this should have been fixed in 4.8 and later.
gccgo 4.7 series doesn't contain code to query the number of processors on Solaris.
could you please try a newer version of gccgo?
(if not, at least you can review the code for solaris,
http://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgo/runtime/getncpu-solaris.c;h=5d5d7025dfe430fe987186fbcd4f0fd3f18f17ad;hb=HEAD)

Status changed to WaitingForReply.

@ianlancetaylor
Copy link
Member

No reply, so closing.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants