title: Can't run simple mpi program
body: <p>I recently installed Intel's Cluster Studio, and was testing IMPI. When I try running a simple hello world program using <code>mpirun</code>, the process takes forever, and I have to end it myself. I used the following code: </p>
  
  <pre><code>#include &lt;mpi.h&gt;
  #include &lt;iostream&gt;
  
  #include &lt;stdlib.h&gt;
  
  int main(int argc, char *argv[]) {
    MPI::Init(argc, argv);
  
    int rank = MPI::COMM_WORLD.Get_rank();
    int size = MPI::COMM_WORLD.Get_size();
  
    std::cout &lt;&lt; "Returned: " &lt;&lt; system("sleep 2") &lt;&lt; " ";
    std::cout &lt;&lt; "Hello World! I am " &lt;&lt; rank &lt;&lt; " of " &lt;&lt; size &lt;&lt;
            std::endl;
  
    MPI::Finalize();
    return (0);
  }
  </code></pre>
  
  <p>I compiled it with <code>mpiicpc main.cpp -o main</code>. 
  This is the output when I added <code>-show</code> option:</p>
  
  <pre><code>icpc main.cpp -o main -I/opt/intel/impi/4.1.1.036/intel64/include -L/opt/intel/impi/4.1.1.036/intel64/lib -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker /opt/intel/impi/4.1.1.036/intel64/lib -Xlinker -rpath -Xlinker /opt/intel/mpi-rt/4.1 -lmpigc4 -lmpigf -lmpi -lmpigi -ldl -lrt -lpthread
  </code></pre>
  
  <p>I ran the executable with <code>mpirun -np 4 main</code>. </p>
  
  <p>Additional info: </p>
  
  <pre><code>$which mpirun 
  /opt/intel/impi/4.1.1.036/intel64/bin/mpirun
  
  $mpiicpc --version
  icpc (ICC) 14.0.0 20130728
  </code></pre>
  
  <p><strong>UPDATE</strong>:
  I also tried compiling it using <code>g++</code> instead of <code>icpc</code>. No luck. My guess is there is a problem with the MPI runtime, but I can't find it. Debugging didn't work. I think the program is not initializing in the first place.</p>