title: mpirun doesnt work and ask to change TMPDIR variable to /tmp
body: <p>I compiled the next code:</p>
  
  <pre><code>#include &lt;mpi.h&gt; 
  #include &lt;stdio.h&gt;
  
  
  int main(int argc, char* argv[]) {
      int rank, size, len;
      char host[MPI_MAX_PROCESSOR_NAME];
      MPI_Init(&amp;argc, &amp;argv);
      MPI_Finalize();
      return 0;
  }
  </code></pre>
  
  <p>I did it this way:</p>
  
  <pre><code>mpic++ -o test test.cpp
  </code></pre>
  
  <p>and then i tried to run the file:</p>
  
  <pre><code>mpirun -np 2 test
  </code></pre>
  
  <p>but the error occured:</p>
  
  <p>PMIx has detected a temporary directory name that results
  in a path that is too long for the Unix domain socket:</p>
  
  <p>Temp dir: /var/folders/12/k2b2579s1yz2cfl8ppb1c6m80000gn/T/openmpi-sessions-501@MacBook-Air-Alexander-2_0/22793</p>
  
  <p>Try setting your TMPDIR environmental variable to point to
  something shorter in length</p>
  
  <p>So I did this:</p>
  
  <pre><code>export TMPDIR=/tmp
  </code></pre>
  
  <p>Tried to run again: <code>mpirun -np 2 test</code></p>
  
  <p>But another error occured:</p>
  
  <p>Primary job  terminated normally, but 1 process returned</p>
  
  <p>a non-zero exit code Per user-direction, the job has been aborted</p>
  
  <h2>-------------------------------------------------------</h2>
  
  <p>mpirun detected that one or more processes exited with non-zero status, thus causing
  the job to be terminated. The first process to do so was:</p>
  
  <p>Process name: [[22798,1],0]</p>
  
  <p>Exit code:    1</p>
  
  <p>Tell me please, what should I do to run this code?</p>