Hello,
After compiling and running a MPI program, it seems to hang at MPI_Init(), but it eventually will work after a minute or two.
While the problem occured on my Notebook it did not on my desktop PC. Both run on Win 7, cygwin 64 Bit, OpenMPI version 1.8.3 r32794 (ompi_info), g++ v 4.8.3. I actually synced the cygwin installations later on, and it still didn't work, but it did for a short time after a restart...
When I started a program on my desktop PC my Firewall Comodo 5.10 notified me about orterun.exe (mpirun is only a symlink to orterun) and myprogram.exe. After I (permanently) allowed these two programs the started program still didn't resume execution. After canceling the program and restarting it, the program ran without problems, meaning it ran fast. Because of this, it seems to me that OpenMPI maybe has only insufficient error-handling if it can't connect instantly. Maybe this is somehow related to the problem?
The problem existed quite some months on my notebook, so I DID restart the notebook before without the problem being solved. I also have Ubuntu on that notebook and there I can compile and run MPI programs just fine.
I'm using Comodo Firewall 5.10. on my Desktop and absolutely no Firewall, not even the Windows Firewall (deactivated) on my Notebook. Installing Comodo 5.10 on my notebook didn't help either. But everything worked after restarting, so maybe the Firewall wasn't completely in place yet? But the Installation program didn't prompt me to restart and the Firewall was already working, so ...
A compiled version from my desktop PC did run on my notebook with mpirun... Alas I couldn't replicate this and I tried for hours now. Because of this I thought the error lay in the compiler or OpenMPI-libraries, but it seems it only works at complete random times.
After syncing my cygwin installation on my notebook with the one on my desktop, installing a firewall where I allowed all affected programs and restarting my notebook it also shortly worked, but again after that it didn't, so this "fix" may have coincided with a "good" time.
Other people have stories of their VPN software interfering with OpenMPI and causing exactly these problems, but I don't have such a software running.
Things I also fruitlessly tried: * closing programs which could jam TCP-IP connections * ping 127.0.0.1 works <1ms * running bash as administrator * running orterun/mpirun from windows cmd instead of cygwin-bash * stopping Windows Firewall Service and Windows Defender completely * using MPI_Init(NULL,NULL); instead of MPI_Init(&argc,&argv); * compiling with gcc instead of g++ * the program works fine, if I don't start it with mpirun, but it also doesn't work, if I start it with mpirun -n 1 * update Windows * using safe mode (with network drivers) * trying to debug it (I can't get a useful backtrace to the MPI_init call)