title: How OpenMP can be run through mpi?
body: <p>I am having a code where part of the code uses MPI another part uses OpenMP. I followed (<a href="https://stackoverflow.com/questions/28181069/mpi-openmp-hybrid">MPI OpenMp hybrid</a>) link and several others, but could not do what I need. When the MPI part performs computation OpenMP does not do anything and vice versa.</p>
  <p>I could compile the code successfully.</p>
  <p>Now suppose I run the code with</p>
  <pre><code>mpirun -np 4 ./program
  </code></pre>
  <p>How can I run the code such that when the code encounters the OpenMP part it runs in the same number of threads like that of np?</p>