PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

How to control which processors are being used

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling
View previous topic :: View next topic  
Author Message
Jim Kirby



Joined: 15 Feb 2005
Posts: 5

PostPosted: Wed Jun 01, 2005 7:06 am    Post subject: How to control which processors are being used Reply with quote

Just getting the hang of this - I am using an Opteron cluster with 13 dual nodes.
I understand how to tell the codes how many processors to run on (NCPUS=n),
but I don't know how to control which processors are being used for those n threads.

Jim KIrby
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Jun 01, 2005 12:56 pm    Post subject: Reply with quote

Hi Jim,

I'm not 100% clear about what your asking but I think you might be confusing OpenMP with MPI programming. NCPUS is used with OpenMP to set the number of threads that are spawned on a stand-alone symetric multi-processor (SMP) system. OpenMP does not enable you to spawn threads on other nodes of your cluster. To run parallel executables across multiple cluster nodes, you'll need to use MPI instead.

Note that on some Linux distributions there are utilities, taskset and numactl, which do allow you to bind threads to a particular processor on a SMP system. MPI does not have this capabilbity.

- Mat
Back to top
View user's profile
Jim Kirby



Joined: 15 Feb 2005
Posts: 5

PostPosted: Thu Jun 02, 2005 7:54 am    Post subject: Reply with quote

Mat - Thanks for the reply. I am talking about MPI or HPF - I know I can't
get beyond one node for the OpenMP or auto-parallelized versions.

I gather from your reply that any feature which would let me tie n threads to
n particular processors in the system is going to be in the form of a linux
system utility rather than a compiler option. I'll start looking in that direction now.

I posted a separate question in the installation section about not being able to
get the examples like matmul to run now - I just upgraded from 5.2 for workstation to CDK 6.0.

Jim Kirby
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Jun 02, 2005 8:27 am    Post subject: Reply with quote

Hi Jim,

Just to be clear, taskset and numactl are for use on a stand-alone SMP system, not for use with MPI or HPF. With MPI you specify which n nodes to use with a 'machine' file. To use more than one processor on a given node, add the host to the machine file using 'hostname:n' where 'n' is the number of processors on the node. HPF uses the '-host' runtime flag to specify which nodes to use (Information about HPF runtime options can be found in Section 3 of the PGI HPF users guide).

Hope this helps,
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Debugging and Profiling 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