Hi,
What preprocessing option need to be used for gfortran [on Linux] to do the below operation:
Perform source preprocessing and compilation on Fortran source files. When specified, source code is included by both #include directives and Fortran INCLUDE lines. Generates file file.i, which contains the source code after the preprocessing has been performed and the effects applied to the source program.
Thanks
-cpp
or capital filename extension ,such as .F90,.FOR
The compilation of Fortran code works fine with cray fortran compiler. The compilation flags used are: “-eZ”. If gnu fortran (i.e. gfortran-12.2) is used, then it throws many errors.
Here is the reference link of cray fortran compiler options.
https://support.hpe.com/hpesc/public/docDisplay?docId=a00115296en_us&page=Fortran_Command-line_Options.html
Can someone let know, what are the equivalent options for gfortran.
You probably need to post a few representative error messages to get any meaningful response. Particularly if you are working with legacy codes, there will be several possible options to enable or disable some legacy compiler behavior.
The FFLAGS for cce-16.0 Fortran compiler are “-eZ”. I’m looking for equivalent options for gfortran.
Thanks
That question has already been answered, and you apparently still have compiler warnings and errors. I’ll repeat what I said before, you need to post more information to get a meaningful response.
-eZ just enables pre-processing, equivalent to gfortran -cpp switch; performing pre-processing regardless of the source file suffix.