I have encountered a rather strange error as I'm trying to create a wrapper 
for Fortran's TWPBVP (ODE BVP) solver.

Full code is available at https://github.com/mobius-eng/TWPBVP.jl

After downloading (to julia's package directory), run

Pkg.build("TWPBVP")

and

Pkg.test("TWPBVP")

The issue (right now) is the parameter "aright" or "right": in Julia code 
it is set to "float(pi)", but when it is passed to Fortran's code, it 
becomes "0.0"

To cut long story short, I have a problem of passing floating-point numbers 
from Julia to Fortran subroutine. Documentation suggests, that each 
parameter to Fortran's program needs "Ref{T}" wrapper as they are passed by 
reference (I've seen that older code also uses Ptr{T} with "&" at variable 
names). It works fine for integers (I even can see the difference if "FInt" 
alias is changed between "Int32" and "Int64" and if "-fdefault-integer-8" 
in compiling option is present or omitted). But I don't see a single 
floating point value passed correctly (including floating-point arrays). 
I've also tried, as an extreme measure, to pass a floating point parameter 
as a vector (of size 1) and have a corresponding type in ccall to be 
"Ptr{Float64}"

SysInfo: Ubuntu 64-bit, Julia 0.5

Reply via email to