3

I have the following weird behaviour on a machine with 40 cores: calling System.Environment.ProcessorCount in fsi (12.0.30815.0) and fsianycpu (12.0.30815.0) leads to different results.

In fsi I get System.Environment.ProcessorCount = 32 in fsianycpu I get System.Environment.ProcessorCount = 40. This also seems to affect the task parallel library which only uses 80% of all available cores when a simple test code is run from fsi (which has the wrong processor count).

What could be the reason?

  • 1
    I think this might be a windows limit - from here http://windows.microsoft.com/en-US/windows7/products/system-requirements 32bit is limited to 32 CPUs – John Palmer Sep 17 '15 at 08:47

1 Answers1

5

FSI is probably running under 32 bit mode by default. You should be able to check via Task Manager assuming you are running under Windows of course. I suspect this is a limitation of apps running under WoW64 (what you run your 32 bit apps in using a 64 bit Windows).

See: https://msdn.microsoft.com/en-us/library/windows/desktop/aa384228%28v=vs.85%29.aspx. Doesn't confirm it exactly (no documented behavior of WoW64) but it mentions that 32 bit Windows only supports 32 processors.

EDIT: See this other stack overflow post as well: Detecting the number of processors

Community
  • 1
  • 1
akara
  • 396
  • 2
  • 7