# mpirun: How to select dedicated machines ?

**URL:** <https://forums.developer.nvidia.com/t/mpirun-how-to-select-dedicated-machines/130303>\
**Category:** Legacy PGI Compilers (archived)\
**Created:** [April 3, 2006, 11:14am UTC](https://forums.developer.nvidia.com/t/mpirun-how-to-select-dedicated-machines/130303 "2006-04-03T11:14:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkoch](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@pkoch](https://forums.developer.nvidia.com/u/pkoch)\
**Post date:** [April 3, 2006, 11:14am UTC](https://forums.developer.nvidia.com/t/mpirun-how-to-select-dedicated-machines/130303/1 "2006-04-03T11:14:15Z")

</div>

Hi,

I just have successfully installed the PGI pi stuff. Everything is running fine,  
but when I just tried the simple myname example, I saw that even if only 4 cores  
are used everything is spreaded all over all machines.  
But we have 4 node with 8 core’s and I want a job to use all local cpu’s until  
more then 8 cores are used.

How can I do it ?

Bye, Peer

---

<div class="post-metadata">

**Author:** ![MatColgrove](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/matcolgrove/32/14047_2.png) [@MatColgrove](https://forums.developer.nvidia.com/u/MatColgrove)\
**Post date:** [April 5, 2006, 5:54am UTC](https://forums.developer.nvidia.com/t/mpirun-how-to-select-dedicated-machines/130303/2 "2006-04-05T05:54:19Z")

</div>

Hi Peer,

To clarify, your cluster consists of multiple 4 CPU dual-core systems. However, when you run using “mpirun -np n”, the processes are being allocated on each system instead of first being allocated to system 1 and then to system 2 once you’ve reached the 9th process.

If this is the case, then update your machines file to include the number of CPUs per system or list each system 8 times. For example:

```nohighlight
system1:8
system2:8

```

or

```nohighlight
system1
system1
system1
system1
...etc

```

Hope this helps,  
Mat
