Hi

I was about tell that i have written an MPI code in which i have specified
only for the communication between nodes and i dont whether can i run
program as per my requirement i.e to use the cores present in my node (all
4 cores). So my doubt is should i need to include pthreads or the program
which i have written is sufficient.

My program gives the output has MPI-size=4
 time at node1:
time at node 2:
time at node3:
time at node 4:


This is what i was explaining.


On Tue, Aug 14, 2012 at 2:17 PM, Jeff Squyres <jsquy...@cisco.com> wrote:

> On Aug 14, 2012, at 7:55 AM, seshendra seshu wrote:
>
> > I haven't still changed my code to run when threading is  needed
> (presently working).
>
> I'm afraid I can't parse that sentence; I don't know what you mean.
>
> > I have doubt that when i calculate the MPI ranks using the MPI command
>  it gives only the nodes which have given in a host file.
>
> I'm not sure what this is saying, either.  Sorry!  :-(
>
> If you are running in a scheduled environment (e.g., under the SLURM or
> Torque/PBS schedulers), then Open MPI will find out from the schedule how
> many processors are on that machine and react accordingly.
>
> Otherwise, if you are running in an unscheduled environment (e.g., if you
> just specify a hostfile to tell Open MPI where to run), then you need to
> tell Open MPI how many processes you want it to launch on each node.  Per
> Tom's advice, we usually recommend running -- at most -- one MPI process
> per core.
>
> > But how can i calculate the MPI ranks as you have told i.e N=H(
>  number of CPUs showing on a node ) x M ( number of nodes in a cluster).
>
> Use the Hwloc utility "lstopo" to give you a graphical depiction of the
> internal topology of your machine(s).
> http://www.open-mpi.org/projects/hwloc/
>
> Then you can count how many cores are on your machine and set your
> hostfile accordingly.
>
> > And I would like test like this if have 2 nodes and where I can use up
> to 50 cores. I would like to scale like 2,4,8,16,32,45 cores and at the
> same time if use 8 cores then I would like to take the readings as node1-
> 3cores and node2-5 cores. So in order to do that should I need mention
> anything in the host file as I have mentioned the No.of nodes.
>
> In general, just list how many slots you have on each machine in the
> hostfile and then use mpirun's -np and -npernode options to specify how
> many total processes to run and how many to run per machine.  For example:
>
> -----
> shell$ cat hostfile
> # This hostfile represents 2 Intel Romley-based servers; 16 cores each
> server1 slots=16
> server2 slots=16
> shell$ mpirun --hostfile hostfile -np 4 --npernode 2 my_mpi_executable
> # ^^ this runs a total of 4 MPI processes, 2 on each node
> shell$ mpirun --hostfile hostfile -np 16 --npernode 8 my_mpi_executable
> # ^^ this runs a total of 16 MPI processes, 8 on each node
> -----
>
> ...and so on.
>
> --
> Jeff Squyres
> jsquy...@cisco.com
> For corporate legal information go to:
> http://www.cisco.com/web/about/doing_business/legal/cri/
>
>
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>



-- 
 WITH REGARDS
M.L.N.Seshendra

Reply via email to