Re: calling Fortran code from Lisp

Pascal Bourguignon <[email protected]>
Newsgroups gmane.lisp.cmucl.general
Organization InformatiMago.
Message-ID <[email protected]>
Tamas K Papp writes:
> Is it possible to call a Fortran subroutine from Lisp?  I have seen
> the C language FFI in the docs, but I wonder if it would be possible
> to call Fortran somehow.  There is a subroutine for banded sparse
> matrices in LAPACK I would like to use.

If it's possible to call Fortran from C, yes.
Just declare the function with the FFI like you'd do it in C.

If the call protocol of your Fortran compiler is different than that
of your C compiler, then something might still be possible, using a
library like ffcall/avcall (used by clisp, I don't know if cmucl uses
it too, but you could write a FFI to that library to then write the
FFI to the Fortran call protocol).

-- 
__Pascal Bourguignon__
http://www.informatimago.com
http://pjb.ogamita.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.