title: MPI - changing number of processes launched
body: <p>I'm beginning with MPI. I wanted to try a classical "Hello, world" program, which will print number of every process too and a few other informations too. My program works, but I'm little confused about how <strong>mpiexec</strong> really works. The problem is, when I specify the number of processes, sometimes they just don't get launched. For example, I use this command:</p>
  
  <pre><code>mpiexec -np 4 ./hello
  </code></pre>
  
  <p>but only 2 or 3 processes get launched, not 4. This number of launched processes changes, so I'm really confused. Is the problem in my pc (I have only dualcore) or is this normal?</p>
  
  <hr>
  
  <p><strong>hello.c:</strong></p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;mpi.h&gt;
  
  int main(){
      MPI_Init(NULL, NULL);
  
      // Number of processes
      int world_size;
      MPI_Comm_size( MPI_COMM_WORLD, &amp;world_size );
  
      // Number of current process
      int process_id;
      MPI_Comm_rank( MPI_COMM_WORLD, &amp;process_id );
  
      // Processor name
      char processor_name[ MPI_MAX_PROCESSOR_NAME ];
      int name_len;
      MPI_Get_processor_name( processor_name, &amp;name_len );
  
      printf("Hello! - sent from process %d running on processor %s.\n\
          Number of processes is %d.\n\
          Length of proc name is %d.\n\
          ***********************\n",
          process_id, processor_name, world_size, name_len);
  
      return 0;
  }
  </code></pre>