[Omp] A basic question about OpenMP
Richard Friedman
rchrd at sun.com
Tue Jun 26 09:39:15 PDT 2007
On Solaris with the Sun Studio 12 compilers you can bind threads to
processors.
See section 2.4 in the OpenMP User's Guide
http://docs.sun.com/app/docs/doc/819-5270/6n7c71vd4?a=view
aduran at ac.upc.edu wrote:
> Abhijit,
>
> Quoting Abhijit Joshi <joshi1974 at gmail.com>:
>
>
>> During OpenMP implementation, is *thread* = *processor* ?
>>
>
> Not necessarily. That's an implementation detail that is not specified in the
> standard. It may be a 1 to 1 equivalence or it may not. You should check the
> documentation of the OpenMP implementation you use.
>
>
>> For example, when
>> I run the OpenMP version of my code using 5 threads, I find that only one
>> processor is being used, but usage of that processor is 500% (using the top
>> command).
>>
>
> The newest versions of top collapse by default the percentages of all cpus into
> a single one, so that 500% in fact most probably means 5 cpus working at a 100%
> (although it could also a higher number of cpus at a lower % :). You can press
> number '1' from top to show all cpu percentages.
>
>
>> within my code to set the number of "threads" to 5. Apparently, this the not
>> the same as the number of processors. Is there another command to set the
>> number of processors ?
>>
>
> No. You can only specify the number of OpenMP threads.
>
> Regards,
> Alex
> _______________________________________________
> Omp mailing list
> Omp at openmp.org
> http://openmp.org/mailman/listinfo/omp
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rchrd.vcf
Type: text/x-vcard
Size: 374 bytes
Desc: not available
Url : http://openmp.org/pipermail/omp/attachments/20070626/fbc85f64/attachment.vcf
More information about the Omp
mailing list