I have a MacBook Pro that I got last year. I installed gfortran and MPICH using brew install gfortran mpich , and I compile parallel codes using mpif90
Recently I noticed a strange problem. When my wifi is on (even if I’m not connected to a network) it works fine. But when wifi is turned off I cannot run a job. Instead I get the following error message:
I may be mistaken on this point, but I believe most MPI implementations make use of the networking layer for communication between processes, even if they aren’t actually running in distributed memory. This allows the library to be compiled once and work in both shared and distributed use cases. Perhaps turning off the WiFi is also stopping all of the networking software stack on your machine, meaning there is no networking layer for MPI to use, and thus it fails. Mostly just a hunch, but might be somewhere to start investigating.
It seems sort of strange. Even with WiFi off, there is still lo0 interface working, set to 127.0.0.1/localhost. One can ping it etc. so apparently some network stack must be present.
macOS also sends hashes of your binaries to Apple to check, which makes it very slow to start the first time (and of course it has privacy issues). You have to turn it off for your terminal. It might be related.