title: How to use mpi on Mac OS X
body: <p>I have been searching for a way to use mpi on my mac but everything is very advanced.</p>
  
  <p>I have successfully installed open-mpi using</p>
  
  <pre><code>brew install open-mpi
  </code></pre>
  
  <p>I have .c files ready for compiling and running. When I type:</p>
  
  <pre><code>mpicc -o &lt;file&gt; &lt;file.c&gt;
  </code></pre>
  
  <p>followed by</p>
  
  <pre><code>mpirun &lt;file&gt;
  </code></pre>
  
  <p>I get</p>
  
  <blockquote>
    <p>[xxxxx-MacBook-Pro.local:13623] [[44919,0],0] ORTE_ERROR_LOG: Bad
    parameter in file orted/pmix/pmix_server.c at line 262<br>
    [xxxxx-MacBook-Pro.local:13623] [[44919,0],0] ORTE_ERROR_LOG: Bad
    parameter in file ess_hnp_module.c at line 666  </p>
    
    <p>It looks like orte_init failed for some reason; your parallel process
    is likely to abort.  There are many reasons that a parallel process
    can fail during orte_init; some of which are due to configuration or
    environment problems.  This failure appears to be an internal failure;
    here's some additional information (which may only be relevant to an
    Open MPI developer):</p>
    
    <p>pmix server init failed<br>
    --> Returned value Bad parameter (-5) instead of ORTE_SUCCESS</p>
  </blockquote>
  
  <p>I also get the same message when I enter:</p>
  
  <pre><code>mpirun -np 2 &lt;file&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>