I am solving a problem involving the solution of a large system of ODEs. I use DLSODE to solve my differential equations using the standard CALL DLSODE(FEX,[NEQ],Y,T,TOUT,ITOL,[RTOL],[ATOL],ITASK,ISTATE,IOPT,RWORK,LRW,IWORK,LIW,JEX,MF)
JEX is the name of subroutine for Jacobian matrix, but I am using a numerical Jacobian. Therefore, I just declare a dummy variable REAL*8 :: JEX, without writing a subroutine for the Jacobian following the following instructions from the documentation of DLSODE:
JAC :EXT Name of subroutine for Jacobian matrix (MF =
21 or 24). If used, this name must be declared
EXTERNAL in calling program. If not used, pass a
dummy name. The form of JAC must be:
SUBROUTINE JAC (NEQ, T, Y, ML, MU, PD, NROWPD)
INTEGER NEQ, ML, MU, NROWPD
DOUBLE PRECISION T, Y(*), PD(NROWPD,*)
However this leads to the error:
error #6635: This actual argument must be the name of a procedure and not a data object. [JEX] .
I am using option MF=25 for numerical jacbian, where LSODE internally calculates the Jacobian for the function file internally. So writing an external subroutine for it does not make sense.
This did not give any issues when I used an integration with Visual studio 2008.
I would appreciate any help.