From: Mario S. Mommer
Subject: Re: Calling SBCL from C with array arguments
Date: 
Message-ID: <fzwudhski9.fsf@cupid.igpm.rwth-aachen.de>
Clemens Heitzinger <········@rainbow.studorg.tuwien.ac.at> writes:
> Having written some functions in SBCL, I want to call them from a C++
> (or Fortran90, for that matter) program.  The arguments are arrays of
> doubles with some 50,000 elements.  I want to pass two or three arrays
> to the CL code and get back three arrays.  How can I do this in SBCL
> (or CMUCL)?  The documentation is a bit sparse on this matter.  Any
> help is appreciated.

Take a look at this

http://www.cons.org/cmucl/doc/tcl-callback.html

which is similar in the sense that a call from C to cmucl has to be
made, and once you can do that you can do pretty much everything
else. One of the many proyects I have in queue is writing (and
documenting) a smaller example, and I have some code which I can post
later today (I'm currently at my office, said snippet is at home).

But you shoud be aware that you may have to run the C++/F90/F70
program from cmucl/sbcl, which may or may not be a problem.

An alternative would be to use shmget(2) & co. to share some memory
among the programs and a socket to comunicate.

I am assuming here that speed is a mayor concern for you. If not, then
there are a few solutions which are simpler and probably quite fast
too. For example, data can be passed around by writing it to text
files, or can be passed in binary format through a socket, etc.

I hope it helps...