Recent content by pilipili2021

  1. P

    Comp Sci Can‘t call a subroutine name in a subroutine in Fortran90

    finally I find the problem. If I code like Call CaoB() contains subroutine B() the error comes. If I move subroutine B out of 'contains' like subroutine B() subroutine something call CaoB() end subroutine something Then the problem is solved.
  2. P

    Comp Sci Can‘t call a subroutine name in a subroutine in Fortran90

    My ifort is on ubuntu 20.04 , also on Linux. Everything worked well before my hard disk suddenly broken. May problems created with newer versions:cry:
  3. P

    Comp Sci Can‘t call a subroutine name in a subroutine in Fortran90

    Thank you for your reply! It's a great help. May be my environment have some problems. my ifort version is 2021.4.0 So confused.
  4. P

    Comp Sci Can‘t call a subroutine name in a subroutine in Fortran90

    Thank you for your reply. Do you mean add some code like 'external B' or 'external fcn'? That not works. In the subroutine 'CaoB' it have a subroutine name 'fcn' determined by the interface. When I call 'CaoB(B)', 'B' as a subroutine name should be instead of 'fcn' in the subroutine 'CaoB'...
  5. P

    Comp Sci Can‘t call a subroutine name in a subroutine in Fortran90

    Here is the code for example: PROGRAM main CALL B() CALL CaoB(B) contains subroutine B() IMPLICIT NONE write (*,*) 'fk' end subroutine B subroutine CaoB(fcn) implicit none INTERFACE SUBROUTINE fcn() IMPLICIT NONE END SUBROUTINE fcn END INTERFACE write...
Back
Top