You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to get a callback mechanism to capture Fortran messages and display them in a jupyter cell output (stdout is captured by a python console but SFAIK no easy way with jupyter).
I note f90wrap has a 'callback' CLI option but I am not sure how to use it. Say I have in cbfunc.f90 :
module cbfunc
implicit none
public
containssubroutinef1()
print*, "in f1, calling f2 twice.."call f2()
call f2()
returnendsubroutinef2()
!f2py intent(callback, hide) fpy
external fpy
print*, "in f2, calling f2py.."call fpy()
returnend
end module
For the interested reader note this method to capture the standard output if this is what you need/want to do and may be easier to set up than a callback.
First, thank you for f90wrap.
I'd like to get a callback mechanism to capture Fortran messages and display them in a jupyter cell output (stdout is captured by a python console but SFAIK no easy way with jupyter).
I note
f90wrap
has a 'callback' CLI option but I am not sure how to use it. Say I have in cbfunc.f90 :and using
Then in python
import CBF
fails withImportError: /xxx/yyy/ff/_CBF.cpython-37m-x86_64-linux-gnu.so: undefined symbol: fpy_
The callback mechanism works if using only
f2py
i.e.f2py -c -m ${MODULE_NAME} cbfunc.f90
and in python:I'll see if I can find a fix or workaround.
The text was updated successfully, but these errors were encountered: