On 04/30/2011 08:52 PM, Jack Bryan wrote:
Hi, All:

What is the relationship between MPI communication and socket communication ? 

MPI may use socket communications to do communications between two processes.  Aside from that they are used for different purposes.
Is the network socket programming better than MPI ?
Depends on what you are trying to do.  If you are writing a parallel program that may run in multiple environments with different types of performing protocols available for its use then MPI is probably better.  If you are looking to do simple client/server type programming then socket program might have an advantage.

I am a newbie of   network socket programming. 

I do not know which one is better for parallel/distributed computing ?
IMO MPI.

I know that network socket is unix-based file communication between server and client. 

If they can also be used for parallel computing, how MPI can work better than them ?
There is a lot of stuff that MPI does behind the curtain to make a parallel applications life a lot easier.  As far as performance MPI will not perform better than sockets if it is using sockets as the underlying model.  However, the performance difference should be negligible which makes all the other stuff MPI does for you a big win.

I know MPI is for homogeneous cluster system and network socket is based on internet TCP/IP.
What do you mean by homogeneous cluster?  There are some MPIs that can work among different platforms and even different OSes (though some initial setup may be necessary).

Hope this helps,


--
Oracle
Terry D. Dontje | Principal Software Engineer
Developer Tools Engineering | +1.781.442.2631
Oracle - Performance Technologies
95 Network Drive, Burlington, MA 01803
Email terry.dontje@oracle.com