Using F2PY as a wrapper, is it possible to use subroutines with subroutine calls? And if so, how?
In case I am unclear, I mean like this:
SUBROUTINE average(a, b, out)
real a, b, out
cf2py intent(in) a, b
cf2py intent(out) out
call add(a, b, out)
out=out/2
END
The add subroutine is as follows:
subroutine add(a, b, out)
real a, b, out
out = a + b
return
end
Trying f2py -c -m average average.f and importing to python I get:
ImportError: ./average.so: undefined symbol: add_
Also, adding intents to the second subroutine does not fix the issue.