I have a large Fortran database that was originally intended for the Intel compiler. Now I'm getting ready to compile with gfortran. Unfortunately, the code is littered with Intel preprocessing directives, such as:
!DEC$ IF DEFINED (MYDIRECTIVE) REAL, DIMENSION(:,:,:), ALLOCATABLE :: my_real_var !DEC$ ENDIF
From what I can tell through googling and gfortran docs, there is no internal gfortran support for anything other than C-style preprocessing, for example:
#if defined MYDIRECTIVE REAL, DIMENSION(:,:,:), ALLOCATABLE :: my_real_var #endif
Has anyone else encountered this problem and came up with an elegant solution? Obviously, I could write a shell script that calls an external preprocessor before passing the code to gfortran for compilation, but that just doesn't seem like a terrific solution to me.
Any thoughts? Thanks SO guru!
source share