Discussion:
Doubts on mpi usage
(too old to reply)
Vivek788
2008-12-04 02:14:13 UTC
Permalink
Hi,I am newbie to mpi..I am planning to use it for a graphics
rendering program.
The coding is to be in C.

So,I read through basic documentation and have an idea of what is
mpi.But I have some doubts,like whether I need to have copies of the
program in all distributed nodes(hosts).I installed both mpich and
openmpi on my ubuntu machine at home to test.Where do I specify the
hosts and how do i distribute the code among nodes?

Thanks in advance..
Michael Hofmann
2008-12-05 14:56:14 UTC
Permalink
Post by Vivek788
Hi,I am newbie to mpi..I am planning to use it for a graphics
rendering program.
The coding is to be in C.
So,I read through basic documentation and have an idea of what is
mpi.But I have some doubts,like whether I need to have copies of the
program in all distributed nodes(hosts).
Yes, all nodes need access to the code.
Post by Vivek788
I installed both mpich and
openmpi on my ubuntu machine at home to test.
One MPI (MPICH or OpenMPI) is sufficient (mixing different MPIs is a
popular source of errors).
Post by Vivek788
Where do I specify the
hosts
That depends on the MPI you want to use. The "mpirun" command of OpenMPI
accepts a list of hostnames (--host <host1,host2,...,hostN>) or a file
with the hostnames (--hostfile <hostfile>). MPICH2 uses the "mpdboot"
command to start daemon processes on all hosts. "mpdboot" accepts a file
with hostnames (-f <hostfile>). Have a look at the corresponding manuals,
docs, howtos or FAQs!

(OpenMPI on a single node (e.g. your machine at home) requires no
hostnames. All processes run on the local host.)
Post by Vivek788
and how do i distribute the code among nodes?
Distributing the code is completely up to you, as long as MPI is able to
find the code on all nodes. Usually, one uses a parallel file system to
distribute the home directories.


Michael
Vivek788
2008-12-17 02:13:48 UTC
Permalink
Post by Michael Hofmann
Post by Vivek788
Hi,I am newbie to mpi..I am planning to use it for a graphics
rendering program.
The coding is to be in C.
So,I read through basic documentation and have an idea of what is
mpi.But I have some doubts,like whether I need to have copies of the
program in all distributed nodes(hosts).
Yes, all nodes need access to the code.
Post by Vivek788
I installed both mpich and
openmpi on my ubuntu machine at home to test.
One MPI (MPICH or OpenMPI) is sufficient (mixing different MPIs is a  
popular source of errors).
Post by Vivek788
Where do I specify the
hosts
That depends on the MPI you want to use. The "mpirun" command of OpenMPI  
accepts a list of hostnames (--host <host1,host2,...,hostN>) or a file  
with the hostnames (--hostfile <hostfile>). MPICH2 uses the "mpdboot"  
command to start daemon processes on all hosts. "mpdboot" accepts a file  
with hostnames (-f <hostfile>). Have a look at the corresponding manuals,  
docs, howtos or FAQs!
(OpenMPI on a single node (e.g. your machine at home) requires no  
hostnames. All processes run on the local host.)
Post by Vivek788
and how do i distribute the code among nodes?
Distributing the code is completely up to you, as long as MPI is able to  
find the code on all nodes. Usually, one uses a parallel file system to  
distribute the home directories.
Michael
that was refreshing...thanks..
btw i was wondering if any of the mpi implementations performs work
stealing and the likes that boinc client does..i.e running processes
based on the host's load...
if it is not done,its not very tough to implement one by
ourselves ..is it?we just have to monitor work load with "top" like
tool and re-distribute work..
Michael Hofmann
2008-12-18 08:54:34 UTC
Permalink
Post by Vivek788
that was refreshing...thanks..
btw i was wondering if any of the mpi implementations performs work
stealing and the likes that boinc client does..i.e running processes
based on the host's load...
No, load balancing is not part of the MPI standard (and AFAICS it is not
in the scope of future versions).

However, there is "Adaptive MPI"
(http://charm.cs.uiuc.edu/manuals/html/ampi/), a non-standard MPI with
some automatic load balancing issues.


Michael
Vivek788
2008-12-19 16:19:16 UTC
Permalink
thanks..i have got a simple program working by setting up an nfs among
the master and nodes and doing all work in that folder...

once i get more of the original app running over mpi..i might even
consider doing the load balancing by myself..that is the next task in
line...and hope to provide for some fault tolerance mechanisms as
well..

Loading...