Lynn McGuire
2024-11-11 22:35:34 UTC
I am getting a strange error when compiling abcpar.f in gfortran:
Compiling .\CHM\VALIEQ\abcpar.f
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
dii.inc:30:10:
Error: 'abcpar' of module 'aaa_modules', imported at (1), is also the
name of the current program unit
Error: Last command making (build\abcpar.o) returned a bad status
Error: Make execution terminated
* Failed *
C aaa_modules.f
C list of interfaces in a module for CHM / DII code compiling
MODULE aaa_modules
implicit none
INTERFACE
SUBROUTINE ABCPAR(ISW,IRETST,IR,IC,PAR,IPHASE)
INTEGER(KIND=8) :: ISW
INTEGER(KIND=8) :: IRETST
INTEGER(KIND=8) :: IR
INTEGER(KIND=8) :: IC
REAL(KIND=8) :: PAR
INTEGER(KIND=8) :: IPHASE
END SUBROUTINE ABCPAR
END INTERFACE
...
END MODULE aaa_modules
SUBROUTINE ABCPAR (ISW, IRETST, IR, IC, PAR, IPHASE)
INCLUDE 'dii.inc'
...
return
end
C dii.inc
use aaa_modules
C force all variables to be declared
implicit none
Thanks,
Lynn McGuire
Compiling .\CHM\VALIEQ\abcpar.f
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
dii.inc:30:10:
Error: 'abcpar' of module 'aaa_modules', imported at (1), is also the
name of the current program unit
Error: Last command making (build\abcpar.o) returned a bad status
Error: Make execution terminated
* Failed *
C aaa_modules.f
C list of interfaces in a module for CHM / DII code compiling
MODULE aaa_modules
implicit none
INTERFACE
SUBROUTINE ABCPAR(ISW,IRETST,IR,IC,PAR,IPHASE)
INTEGER(KIND=8) :: ISW
INTEGER(KIND=8) :: IRETST
INTEGER(KIND=8) :: IR
INTEGER(KIND=8) :: IC
REAL(KIND=8) :: PAR
INTEGER(KIND=8) :: IPHASE
END SUBROUTINE ABCPAR
END INTERFACE
...
END MODULE aaa_modules
SUBROUTINE ABCPAR (ISW, IRETST, IR, IC, PAR, IPHASE)
INCLUDE 'dii.inc'
...
return
end
C dii.inc
use aaa_modules
C force all variables to be declared
implicit none
Thanks,
Lynn McGuire