Hi, All:MPI may use socket communications to do communications between two processes. Aside from that they are used for different purposes.
What is the relationship between MPI communication and socket communication ?
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.Is the network socket programming better than MPI ?
I am a newbie of network socket programming.
I do not know which one is better for parallel/distributed computing ?
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 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 ?
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).
I know MPI is for homogeneous cluster system and network socket is based on internet TCP/IP.