[Mono-bugs] [Bug 400838] Environment. ProcessorCount does not return the correct number of processors/cores

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 28 15:00:56 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=400838

User vargol at ntlworld.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=400838#c2


David Burnett <vargol at ntlworld.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |vargol at ntlworld.com
             Status|NEEDINFO                                        |NEW
      Info Provider|matteo.tesser at gmail.com                         |




--- Comment #2 from David Burnett <vargol at ntlworld.com>  2008-08-28 13:00:55 MDT ---
I'm not the person who raised this however as I'm interested in ParallelFX I'm
recently hit this bug too.

Macintosh:TestBeds vargol$ mono --version
Mono JIT compiler version 2.0 (tarball)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
        TLS:           normal
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       normal
        Notification:  Thread + polling
        Architecture:  x86
        Disabled:      none

Macintosh:TestBeds vargol$ hostinfo
Mach kernel version:
         Darwin Kernel Version 9.4.0: Mon Jun  9 19:30:53 PDT 2008;
root:xnu-1228.5.20~1/RELEASE_I386
Kernel configured for up to 2 processors.
2 processors are physically available.
2 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1
Primary memory available: 2.00 gigabytes
Default processor set: 59 tasks, 232 threads, 2 processors
Load average: 0.00, Mach factor: 1.99
Macintosh:TestBeds vargol$ 
Macintosh:TestBeds vargol$ cat MonoBug/MonoBug/Main.cs 
// Main.cs created with MonoDevelop
// User: vargol at 19:44 08/28/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System;

namespace MonoBug
{
        class MainClass
        {
                public static void Main(string[] args)
                {
                        Console.WriteLine("Environment.ProcessorCount {0}",
Environment.ProcessorCount);
                }
        }
}


Macintosh:TestBeds vargol$ 
Macintosh:TestBeds vargol$ mono
/Users/vargol/Source/TestBeds/MonoBug/MonoBug/bin/Release/MonoBug.exe 
Environment.ProcessorCount 1
Macintosh:TestBeds vargol$ 
Macintosh:TestBeds vargol$ cat mono_bug.c 
#include <stdio.h>
#include <unistd.h>

int main ()
{
  printf ("%d\n", sysconf (_SC_NPROCESSORS_CONF));
  printf ("%d\n", sysconf (_SC_NPROCESSORS_ONLN));
}

Macintosh:TestBeds vargol$ gcc mono_bug.c -o c_count
Macintosh:TestBeds vargol$ ./c_count 
2
2
Macintosh:TestBeds vargol$ 


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list