PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Only one CPU is busy
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
easydavid



Joined: 28 Nov 2011
Posts: 8

PostPosted: Mon Apr 02, 2012 5:44 am    Post subject: Only one CPU is busy Reply with quote

I use PVF to calculate a program,but find only one CPU is busy.
I want to know:how to use all CPUs,or PVF does not support that?
Eager for answers.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6208
Location: The Portland Group Inc.

PostPosted: Mon Apr 02, 2012 8:29 am    Post subject: Reply with quote

Hi easydavid,

PVF supports various parallel models for the CPU, OpenMP, MPI, and auto-parallelization (-Mconcur) though each requires user intervention. Which parallel model are you using?

- Mat
Back to top
View user's profile
easydavid



Joined: 28 Nov 2011
Posts: 8

PostPosted: Mon Apr 02, 2012 8:18 pm    Post subject: auto-parallelization Reply with quote

mkcolg wrote:
Hi easydavid,

PVF supports various parallel models for the CPU, OpenMP, MPI, and auto-parallelization (-Mconcur) though each requires user intervention. Which parallel model are you using?

- Mat


Thank you for your answer.
I use auto-parallelization.
My computer CPU is xeon with 12 cores.
I use Visual Studio 2010 and PGI Visual Fortran 2010.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6208
Location: The Portland Group Inc.

PostPosted: Tue Apr 03, 2012 8:56 am    Post subject: Reply with quote

Hi easydavid,

By default, -Mconcur compiled code will only use a single thread. For multiple threads, you need to set in the shell's environment variable "OMP_NUM_THREADS" to the number of threads to use.

Alternatively, you could use the flag '-Mconcur=allcores" to change the default to use all available cores.

Note, that I'm assuming the compiler was able to find opportunities for parallelization. Please review the compiler feedback messages from the "-Minfo" flag for information about where parallel sections were found.

Hope this helps,
Mat
Back to top
View user's profile
easydavid



Joined: 28 Nov 2011
Posts: 8

PostPosted: Wed Apr 04, 2012 9:36 pm    Post subject: How to set Reply with quote

mkcolg wrote:
Hi easydavid,

By default, -Mconcur compiled code will only use a single thread. For multiple threads, you need to set in the shell's environment variable "OMP_NUM_THREADS" to the number of threads to use.

Alternatively, you could use the flag '-Mconcur=allcores" to change the default to use all available cores.

Note, that I'm assuming the compiler was able to find opportunities for parallelization. Please review the compiler feedback messages from the "-Minfo" flag for information about where parallel sections were found.

Hope this helps,
Mat


Thank you.
But may I konw how to
mkcolg wrote:
set in the shell's environment variable "OMP_NUM_THREADS"

or
mkcolg wrote:
use the flag '-Mconcur=allcores" to change the default to use all available cores.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group