Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dvode.f90

Status
Not open for further replies.

hasnaoui

Programmer
Oct 25, 2020
11
TN
Hello
When I try compiling the example1.f90 I get:

$f955 dvode_f90_m.f90 example1.f90 -o test

CALL DVODE_F90(FEX,NEQ,Y,T,TOUT,ITASK,ISTATE,OPTIONS,J_FCN=JEX)
| 1
Error: There is no specific subroutine for the generic ‘dvode_f90’ at (1)
Can you help me how to reslove thie error
best regards
 
to get the help you should provide the source codes of your programs
 
I found the sources here:

downloaded two files

compiled them
Code:
$ gfortran dvode_f90_m.f90 example1.f90 -o example1

after running the executable
Code:
$ ./example1
I got this result

example1.dat
Code:
 At t =  0.4000D+00   y =  0.985164D+00  0.338624D-04  0.148020D-01
 At t =  0.4000D+01   y =  0.905510D+00  0.224034D-04  0.944679D-01
 At t =  0.4000D+02   y =  0.715801D+00  0.918506D-05  0.284189D+00
 At t =  0.4000D+03   y =  0.450542D+00  0.322311D-05  0.549455D+00
 At t =  0.4000D+04   y =  0.183206D+00  0.894285D-06  0.816793D+00
 At t =  0.4000D+05   y =  0.389815D-01  0.162174D-06  0.961018D+00
 At t =  0.4000D+06   y =  0.493610D-02  0.198411D-07  0.995064D+00
 At t =  0.4000D+07   y =  0.516592D-03  0.206742D-08  0.999483D+00
 At t =  0.4000D+08   y =  0.520168D-04  0.208078D-09  0.999948D+00
 At t =  0.4000D+09   y =  0.520131D-05  0.208054D-10  0.999995D+00
 At t =  0.4000D+10   y =  0.521405D-06  0.208562D-11  0.999999D+00
 At t =  0.4000D+11   y =  0.553927D-07  0.221571D-12  0.100000D+01

  No. steps = 531   No. f-s = 772  No. J-s =  11   No. LU-s = 109
  No. nonlinear iterations = 767
  No. nonlinear convergence failures =   0
  No. error test failures =  26


 No errors occurred.

I'm using this fortran compiler
Code:
$ gfortran --version
GNU Fortran (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
Btw, the same problem was discussed here in 2010:

Since there corrected version of example1.f90 is available - for example in the link I posted above.

Most likely, OP still has the old version without those two lines starting at line number 30:
Code:
...
      SUBROUTINE FEX(NEQ,T,Y,YDOT)
        IMPLICIT NONE
        INTEGER NEQ
        DOUBLE PRECISION T, Y, YDOT
        DIMENSION Y(NEQ), YDOT(NEQ)
[highlight #FCE94F]        intent(in) :: NEQ, T, Y
        intent(out) :: YDOT[/highlight]

        YDOT(1) = -.04D0*Y(1) + 1.D4*Y(2)*Y(3)
        YDOT(3) = 3.E7*Y(2)*Y(2)
        YDOT(2) = -YDOT(1) - YDOT(3)
        RETURN
      END SUBROUTINE FEX
...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top