title: compiling and running a single OpenMP source file with several other non-OpenMP source files
body: <p>I'm trying to compile multiple FORTRAN source files, where I applied some OpenMP directives to one of the source files. For instance :</p>
  
  <h2>The compilation flags :</h2>
  
  <pre><code>COMPILE00='ifort -O3 -openmp -openmp_report -fpconstant -fp-model precise -fpe0 -traceback -ftrapuv'
  COMPILE0='ifort -O3 -fpconstant -fp-model precise -fpe0 -traceback -ftrapuv'
  </code></pre>
  
  <h2>The compiled files :</h2>
  
  <pre><code>$COMPILE0 -c microprm.F90 modules.F90 
  $COMPILE0 -c jernewf3p_A.F90 SMAX.F90 DE_MOTT.F90 twoinitm.F90 helek03.F90 
  $COMPILE00 -c helek04.F90 
  $COMPILE0 -c jernewf3p_melt.F90 dmin_G.F90 
  $COMPILE0 -c submelt_condevap.F90
  </code></pre>
  
  <h2>Linking :</h2>
  
  <pre><code>$COMPILE00 -o TKE.x *.o -lm
  </code></pre>
  
  <p>So the source code <code>helek04.F90</code> has some OpenMP directives. It is being called from <code>submelt_condevap.F90</code> which hasn't. 
  Is this correct compilation practice ? How should I compile it using the <code>use omp_lib</code> module ? Is it code-safe to compile only one file with OpenMP and link all the others with OpenMP ?</p>
  
  <p>The compilation was aborted. When compiling with $COMPILE00 for ALL the files, the simulation runs, but gets a floating point exception, which doesn't occur in the serial code.  </p>