title: How to BREAK the program with a message when some condition occurs
body: <p>I am trying to find a way to put a breaking order when some condition occurs in one subroutine of my f90 program. 
  Is it possible to have any ideas from it? the code scheme looks like this:</p>
  
  <pre><code>    /
      modules
      PROGRAM
      allocate variables
      CALL subroutines for initializing variables
      ...
      do 1,max iterations
      CALL subroutine1
      CALL subroutine2
      CALL subroutine3 !--&gt; here I have the condition
      ...
      ...
      end do
  
      END PROGRAM
  
      Subroutine subroutine3 
      ...
      if (condition = true) then ! what I want to do here is to break the program printing a message saying that it is stopped because condition is true)
  
      end if
      end subroutine 3
  
      /
  </code></pre>
  
  <p>I would appreciate your help, </p>
  
  <p>I am quite new with fortran and I am new in this forum! </p>
  
  <p>Thank you in advance,</p>
  
  <p>Albert P</p>