ifort > Using the Debugging Options > . F90 file
0
Operation check
CentOS6.5
ifort 14.0.1 20131008
I want to use debug options in Intel Fortran
sample.F90
implicit none
#ifdef DEBUG
print *, "debug"
#else
print *, "release"
#endif
end
The file name should be *.F90
.
If you try to compile it as a *.f
or *.f90
, you will end up with a Bad # preprocessor line
.
$ifort -DDEBUG sample.F90
If it is, the #ifdef DEBUG
becomes effective, and when it is removed, the else
part becomes valid.
You may also add "#define DEBUG" in the source.