I am not able to preprocess .f90 files using pgf90 (v12.3 of the compiler)…I have tried using -Mcpp, but the compilation is silent with no informational messages.
I guess if the files are named as .F90 then by default the compiler would preprocess it before compiling, but we cannot change file names. -Mpreprocess gave an error. Any help appreciated.
I have tried using -Mcpp, but the compilation is silent with no informational messages.
-Mcpp will stop after pre-precessing so is most likely not what you want.
-Mpreprocess gave an error
“-Mpreprocess” is the correct flag to use. What error are you getting?
- Mat
Thanks for correcting. I have an interface in my f90 file, the structure is like this.
module xyz_m
implicit none
interface init_ctx
module procedure x
module procedure y
module procedure z
end interface init_ctx
contains
subroutine xyz_f (i, j, k)
!declarations
args = iargc()
var = 1
! some other code
end subroutine xyz_f
Now the error that I get upon compiling with the following flags is given below.
-Mpreprocess -fastsse -Mvect=noaltcode -Mipa=fast -mp=numa -ta=nvidia,host -Minfo=ccff,accel,mp,loop,opt -Mneginfo
Error:
PGF90-S-0038-Symbol, iargc, has not been explicitly declared (xyz.f90)
0 inform, 0 warnings, 1 severes, 0 fatal for xyz_f
I think I am missing an Intel equivalent of “-gen-interfaces”.
Thank you very much.
Hi sayan,
“iargc” is an external function not an intrinsic, hence you need to declare it. For example:
subroutine xyz_f (i, j, k)
!declarations
integer iargc
args = iargc()
var = 1
! some other code
end subroutine xyz_f
Note that Fortran 2003 standardized command line arguments. The “command_argument_count()” intrinsic can be used in place of the non-standard “iagrc” function.
Hope this helps,
Mat
Great, this really helps…thank you.