Hi mpich team,
I am using MPICH 3.0.4 sock with dynamic connection (accept/connect).
I am facing issues with the following scenario, when there is a race condition in MPI_Comm_connect.
Here is the case
1>
Server opens a port, writes the port info in a file, calls MPI_Comm_accept
2>
Client1 & Client2 reads the port information from file and each client calls MPI_Comm_connect
3>
Server accepts one client, disconnects, closes the port, exit
4>
One of the client successfully connects, disconnects, exit
5>
The other client hangs in MPI_Comm_connect
If you do the following steps, you can reproduce the issue
1>
Please set compiler and installation path of MPICH in makefile
2>
make : compiles
3>
make run_bad
I have noticed that in case client calls MPI_Comm_connect after the port is closed, the connect calls successfully terminates with error (make run_good).
Please let me know whether it is a bug or not.
Please also let me know if the connect call can be configured with a timeout or not.
Thanks,
Hirak