You might want to have a look at my Dopri.jl 
<https://github.com/helgee/Dopri.jl> package. In my experience the best way 
to wrap modern Fortran (90+) in Julia is to implement a C interface to the 
Fortran code via the ISO_C_BINDING intrinsic module. You can then call the 
interface easily from Julia.

subroutine c_dop853(n, cfcn, x, y, xend, rtol, atol,&
    itol, csolout, iout, work, lwork, iwork,&
    liwork, tnk, idid) bind(c)
integer(c_int), intent(in) :: n
type(c_funptr), intent(in), value :: cfcn
real(c_double), intent(inout) :: x
real(c_double), dimension(n), intent(inout) :: y
real(c_double), intent(in) :: xend
real(c_double), dimension(n), intent(in) :: rtol
real(c_double), dimension(n), intent(in) :: atol
integer(c_int), intent(in) :: itol
type(c_funptr), intent(in), value :: csolout
integer(c_int), intent(in) :: iout
real(c_double), dimension(lwork), intent(inout) :: work
integer(c_int), intent(in) :: lwork
integer(c_int), dimension(liwork), intent(inout) :: iwork
integer(c_int), intent(in) :: liwork type(c_ptr), intent(in) :: tnk
integer(c_int), intent(out) :: idid procedure(c_fcn), pointer :: fcn
procedure(c_solout), pointer :: solout

call c_f_procpointer(cfcn, fcn)
call c_f_procpointer(csolout, solout)
call dop853(n, fcn, x, y, xend, rtol, atol,&
itol, solout, iout, work, lwork, iwork,& liwork, tnk, idid)end subroutine 
c_dop853

Am Mittwoch, 8. Juni 2016 04:46:40 UTC-4 schrieb Dupont:
>
> Dear users,
>
> I would like to wrap the code 
> <http://www.radford.edu/~thompson/ffddes/index.html>to solve delay 
> differential equations. I have been wrapping C code in the past, but I 
> don't know much about fortran. 
>
> In the file *dde_solver_m.f90*, it is said that one must call the fortran 
> function *DDE_SOLVER *through an interface*. *Hence, I compiled the code 
> as a library 
>
> gfortran -Wall -shared -o libdde_solver.dylib -lm -fPIC dde_solver_m.f90
>
> but when I looked at
>
> nm -a libdde_solver.dylib
>
> I could not find the function DDE_SOLVER. I know that this may seem more 
> like a fortran question than a Julia one, but I would be gratefull if one 
> could give me a hint on how to call this library from Julia,
>
> Thank you for your help,
>
> Best regards
>
>
>
>
>

Reply via email to