PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Multiprocessor use when not asked for

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
andyh



Joined: 23 May 2005
Posts: 7

PostPosted: Wed May 25, 2005 12:36 pm    Post subject: Multiprocessor use when not asked for Reply with quote

I have just started experimenting with -Mconcur on a 4 processor system. as part of an evaluation. For most programs, as per manual, I can choose the number of processors used with the line

program -pghpf -np 4 > junk.out

and watch the system moniter as 4 processors kick in 100%. When running without the extensions, just one processor runs 100%.

For a more complex code, built out of components compiled with -Mconcur, I am running:

biggerProgramMadeOfMconcurComponents > junk.out

and the system moniter is showing all 4 processors running 100%?!?

Does anyone know why this occurs and is it a good thing?

Andy
Back to top
View user's profile
mkcolg



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

PostPosted: Wed May 25, 2005 1:16 pm    Post subject: Reply with quote

Hi Andy,

By default, the program should only be using one thread. To run using 4 threads, either the environment variable 'NCPUS' or 'OMP_NUM_THREADS' must have been set, or the program must have explicitly set the number of threads using the 'omp_set_num_threads' subroutine. Check what value you have for these variables and if the program calls this subroutine.

- Mat
Back to top
View user's profile
andyh



Joined: 23 May 2005
Posts: 7

PostPosted: Fri May 27, 2005 5:49 am    Post subject: Reply with quote

NCPUS was set to 4 for all program instances - I thought it was a convenience for compilation; not a default for runtime action.

Andy
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
Page 1 of 1

 
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