title: How to run Open MPI program on a databricks cluster with multiple nodes?
body: <p>I am trying to run OpenMPI from a python notebook on databricks clusters (ubuntu).</p>
  
  <p>The cluster has 3 nodes:</p>
  
  <pre><code> Driver node: 8 cores
   two worker nodes: each has 8 cores
  </code></pre>
  
  <p>I found that the Open MPI has been installed on databricks.</p>
  
  <p>My command:</p>
  
  <pre><code>sudo mpirun --allow-run-as-root -np 25 --hostfile MY_HOSTFILE ./MY_C_APP
  </code></pre>
  
  <p>I got:</p>
  
  <pre><code>ssh: connect to host DRIVER_NODE_IP port 22: No route to host
  ssh: connect to host  ONE_WORKER_NODE_IP  port 22: No route to host
  </code></pre>
  
  <p>In MY_HOSTFILE, all nodes' IP addresses are listed. </p>
  
  <p>I run the command from python notebook on databricks.</p>
  
  <pre><code>%sh
  sudo ssh -T DRIVER_NODE_IP 
  </code></pre>
  
  <p>I got:</p>
  
  <pre><code>  ssh: connect to host DRIVER_NODE_IP port 22: No route to host
  </code></pre>
  
  <p>the notebook is run on the driver node through webservice.</p>
  
  <p>I have tried to set ssh key so that each node can be accessed. But, the shell command of "ssh-keygen" cannot be run from databricks python notebook. </p>
  
  <p>Could anybody let me know how I can work out this infrastructure problem?</p>
  
  <p>thanks</p>