I'm trying to compile multiple FORTRAN source files, where I applied some OpenMP directives to one of the source files. For instance :
The compilation flags :
COMPILE00='ifort -O3 -openmp -openmp_report -fpconstant -fp-model precise -fpe0 -traceback -ftrapuv' COMPILE0='ifort -O3 -fpconstant -fp-model precise -fpe0 -traceback -ftrapuv'
The compiled files :
$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
$COMPILE00 -o TKE.x *.o -lm
So the source code helek04.F90 has some OpenMP directives. This code is being called from submelt_condevap.F90 which hasn't any OpenMP instructions. Is this correct compilation practice ? How should I compile it using the use omp_lib module ? Is it code-safe to compile only one file with OpenMP and link all the others with OpenMP ?
Compiling this way caused the compilation to aborted (some missed references). 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.
Appreciate your comments,