I implemented a peer-to-peer connection in MPI using MPI_Open_port
and MPI_Comm_accept
. I run a server and a client program using
rafael@server1:~$ mpirun server
rafael@server2:~$ mpirun client
on different computers. I noticed that
rafael@server1:~$ ./server
rafael@server2:~$ ./client
also works just fine. Do you know if there is any difference between starting an MPI executable with and without mpirun
?
Of course, I can't give additional parameters (e.g. mpirun --mca btl self,openib
), and the rank of all processes is 0, which is all totally fine. But is there anything less obvious?
Running without
mpirun
/mpiexec
is called "singletonMPI_INIT
" and is part of the MPI recommendations for high quality implementations, found under §10.5.2 in the latest MPI standard document:Using
mpirun
in your case is the "parallel application" mechanism, mentioned in the standard text. It providesMPI_INIT
with the information necessary to establishMPI_COMM_WORLD
over all started processes. Without the information frommpirun
processes can only run as singleton MPI instances and hence all of them have rank0
(which is OK, since eachMPI_COMM_WORLD
is a separate one).