comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Find number of processors on a machine?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Find number of processors on a machine? [message #52004] Sat, 23 December 2006 17:34
Chris[2] is currently offline  Chris[2]
Messages: 39
Registered: August 2003
Member
IDL> help,!cpu,/structure

** Structure !CPU, 6 tags, length=24, data length=24:

HW_VECTOR LONG 0

VECTOR_ENABLE LONG 0

HW_NCPU LONG 1

TPOOL_NTHREADS LONG 1

TPOOL_MIN_ELTS LONG 100000

TPOOL_MAX_ELTS LONG 0



"Richard G. French" <rfrench@wellesley.edu> wrote in message
news:C1B3173E.9B94%rfrench@wellesley.edu...
> Can anyone tell me how to find out the number of processors on a machine
> from within IDL (OSX/Unix)? I am happy to spawn a system call, but I don't
> know how to find out characteristics of the machine from the shell,
> either.
> I'm trying to implement and IDL_IDLBridge program that sets up bridges to
> nproc-1 child IDL processes when there are nproc processors.
>
> Thanks,
> Dick French
>
Re: Find number of processors on a machine? [message #52006 is a reply to message #52004] Sat, 23 December 2006 17:30 Go to previous message
Pierre V. is currently offline  Pierre V.
Messages: 13
Registered: December 2006
Junior Member
Look at the system structure !CPU. The field HW_NCPU is the number of
CPUs in your PC. Note if you have an Intel machine with
hyperthreading, then each physical CPU will be counted as two.

-Pierre
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Find number of processors on a machine?
Next Topic: Re: Shared memory between several IDL processes

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:33:39 PDT 2025

Total time taken to generate the page: 0.00496 seconds