title: Avoid Accept Incoming Network Connections dialog in mpirun on Mac-OSX
body: <p>I am a MPI beginner. I am trying to run the simplest MPI "hello world" code on my macbook running Mac_OSX Mountain Lion. It has only 1 processor but it has 4 cores. The C++ code goes like this </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "mpi.h"
  using namespace std;
  
  int main(int argc, char* argv[])
  {
      int rank, size;
      MPI::Init();
      rank = MPI::COMM_WORLD.Get_rank();
      size = MPI::COMM_WORLD.Get_size();
      std::cout &lt;&lt; "Hello, world!  I am " &lt;&lt; rank &lt;&lt; " of " &lt;&lt; size &lt;&lt; std::endl;
      cout &lt;&lt; "size is " &lt;&lt; size &lt;&lt; endl;
      cout &lt;&lt; "rank is " &lt;&lt; rank &lt;&lt; endl;
      MPI::Finalize();
      return 0;
  }
  </code></pre>
  
  <p>Then I compile and run the code </p>
  
  <pre><code>$ mpic++ -o bb code2.cpp
  $ mpirun -np 2 bb
  </code></pre>
  
  <p>I instantly get 2 dialog boxes showing the warnings "Do you want the application "bb" accept incoming network connections ?". The dialog boxes appear and disappear and the code runs fine-</p>
  
  <pre><code>Hello, world!  I am 0 of 2
  size is 2
  rank is 0
  Hello, world!  I am 1 of 2
  size is 2
  rank is 1
  </code></pre>
  
  <p>I think MPI uses network connections when running on clusters or groups of CPU. But seeing the firewall dialog boxes appear and disappear again and again is annoying. I could disable the firewall or I could allow incoming connections for specific executables, but i don't want to do that. Is there a way to tell MPI to not use network connections since I am running it on a single computer ?
  Thanks. </p>