LoginSignup
0
1

More than 5 years have passed since last update.

ifort > デバッグオプションの利用 > .F90ファイル

Last updated at Posted at 2015-03-21

動作確認

CentOS6.5
ifort 14.0.1 20131008

Intel Fortranでデバッグオプションを使いたい

sample.F90
      implicit none

#ifdef DEBUG      
      print *, "debug"
#else
      print *, "release"   
#endif
      end

ファイル名は*.F90とすること。
*.f*.f90としてコンパイルしようとするとBad # preprocessor lineとなってしまう。

$ifort -DDEBUG sample.F90

とすると#ifdef DEBUGが有効となり、外すとelseの部分が有効となる。
また、ソース内に"#define DEBUG"を付けても良い。

参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1