title: How would I integrate MPI with C++ classes?
body: <p>Lets say I have a class </p>
  
  <pre><code>Vector
  </code></pre>
  
  <p>In this class I have a method to calculate the norm of a vector.</p>
  
  <pre><code>Vector a
  double Norm = a.norm()
  </code></pre>
  
  <p>I would like to use MPI to distribute this calculation. This is a really trivial case, I know.</p>
  
  <p>But where exctly do i place the commands</p>
  
  <pre><code>MPI_Comm_size,MPI_Comm_rank,MPI_Init?
  </code></pre>
  
  <p>MPI_init would go in the main file, i think. But would I have to tell each vector the number of processes available each instantiation? </p>