- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just upgraded to IVF 11.1 from 10.1 and I am getting a flood of compilation errors related to passing functions in argument lists. For instance
SUBROUTINE runge_kutta (body, state, state_dot, deriv, time, dt, state_out)
USE Body_m, ONLY: Body_t
IMPLICIT NONE
TYPE(Body_t), INTENT(INOUT) :: body ! body being propagated
REAL(KIND=8), DIMENSION(n), INTENT(IN) :: &
state , & ! state of body at start of step
state_dot ! the derivative at start of step
INTERFACE
! The function to calculate the derivitive of a state for a body
SUBROUTINE deriv(bd, st, t, dt, retval)
USE Body_m, ONLY: Body_t
IMPLICIT NONE
TYPE(Body_t), INTENT(IN) :: bd ! body
REAL(KIND=8), INTENT(IN), DIMENSION(n) :: st ! state at time t
REAL(KIND=8), INTENT(IN) :: t ! the time
REAL(KIND=8), INTENT(IN) :: dt ! the time step
REAL(KIND=8), DIMENSION(n), INTENT(OUT) :: retval ! the derivative
END SUBROUTINE deriv
END INTERFACE
REAL(KIND=8), DIMENSION(n), INTENT(IN) :: time, dt
REAL(KIND=8), DIMENSION(n), INTENT(OUT) :: &
state_out ! propagated value of state
This worked just fine in v10.1 but it is now not working. What do I need to do to fix it?
P.S. I tried to make the subroutine being passed EXTERNAL but that just created its own error.
SUBROUTINE runge_kutta (body, state, state_dot, deriv, time, dt, state_out)
USE Body_m, ONLY: Body_t
IMPLICIT NONE
TYPE(Body_t), INTENT(INOUT) :: body ! body being propagated
REAL(KIND=8), DIMENSION(n), INTENT(IN) :: &
state , & ! state of body at start of step
state_dot ! the derivative at start of step
INTERFACE
! The function to calculate the derivitive of a state for a body
SUBROUTINE deriv(bd, st, t, dt, retval)
USE Body_m, ONLY: Body_t
IMPLICIT NONE
TYPE(Body_t), INTENT(IN) :: bd ! body
REAL(KIND=8), INTENT(IN), DIMENSION(n) :: st ! state at time t
REAL(KIND=8), INTENT(IN) :: t ! the time
REAL(KIND=8), INTENT(IN) :: dt ! the time step
REAL(KIND=8), DIMENSION(n), INTENT(OUT) :: retval ! the derivative
END SUBROUTINE deriv
END INTERFACE
REAL(KIND=8), DIMENSION(n), INTENT(IN) :: time, dt
REAL(KIND=8), DIMENSION(n), INTENT(OUT) :: &
state_out ! propagated value of state
This worked just fine in v10.1 but it is now not working. What do I need to do to fix it?
P.S. I tried to make the subroutine being passed EXTERNAL but that just created its own error.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I cobble together a sample I can compile, I see lots of errors from this:
REAL(KIND=8), INTENT(IN), DIMENSION(n) :: st ! state at time t
because N is not a dummy argument, module variable or a PARAMETER constant.
What do you see?
REAL(KIND=8), INTENT(IN), DIMENSION(n) :: st ! state at time t
because N is not a dummy argument, module variable or a PARAMETER constant.
What do you see?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
When I cobble together a sample I can compile, I see lots of errors from this:
REAL(KIND=8), INTENT(IN), DIMENSION(n) :: st ! state at time t
because N is not a dummy argument, module variable or a PARAMETER constant.
What do you see?
REAL(KIND=8), INTENT(IN), DIMENSION(n) :: st ! state at time t
because N is not a dummy argument, module variable or a PARAMETER constant.
What do you see?
Sorry, I tried to trim the call back to a simple example and left that out. You can make the 'n' a ':' for this example.
The calling routine has the following error:
error #7061: The characteristics of dummy argument 1 of the associated actual procedure differ from the characteristics of dummy argument 1 of the dummy procedure. (12.2) [STATE_DERIVATIVE]
on this line:
CALL runge_kutta (body, body%prior_state, &
body%prior_stdot, state_derivative, &
body%next_time, body%time_step, body%state)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess I'd need to see the definition of routine "body" then. If you can construct a small, compilable example that demonstrates the problem, that would be best.
I'll comment that the compiler improves its error detection with each release, and it looks as if you've run into that. Whether or not the error is valid, I won't be able to tell without seeing more.
I'll comment that the compiler improves its error detection with each release, and it looks as if you've run into that. Whether or not the error is valid, I won't be able to tell without seeing more.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page