Today, I have been working on getting his bindings up and running under Ubuntu Linux and Mac OS X.

So far, it has been a nightmare trying to get mpich2 compiled on either platform. It compiles famously if you just run

% ./configure --prefix=/usr/local

However, that doesn’t build shared libraries. Without shared libraries, the CFFI stub library happily links against the static library and happily imports zero of the symbols. After sifting through configure –help, I decided that I should add –enable-dynamiclibs. Doing so yells at me that I must also specify –enable-sharedlibs=type. So, I sifted through the help again and decided to try:

After sorting out some svn merge problems in mpi-test.lisp, it appears as though it all works wonderfully on MacOSX. Most of it seems to work under Ubuntu for me, but I have to look into some error messages more closely.

I found a workaround for the problem of undefined »LOAD-MPI-FOREIGN-LIBRARIES«. In »mpi.lisp« replace »(load-mpi-foreign-libraries)« by »(cffi:use-foreign-library “/WHEREVER/mpich2-stub/libmpiskeleton.so.1.0.1”)«.

This way, and with a fews other obvious changes to filenames (e.g. where to look for MPI headers), I succeeded building CL-MPI and running examples. However, the test suite fails with memory corruption errors.

How about working together on this? There seems to be no mailing list for CL-MPI, so I created one at lisp@list.plastictree.net (it is intended for more general discussion as well).

I’m interested in implementation of efficient and parallel algorithms in general, and Common Lisp and Scheme in particular.

Related posts:

Common Lisp vs. C/ASM: Battle FFT Dr. David McClain of Refined Audiometrics sent me his code for interfacing with the Apple vDSP library. Here it is along with a Makefile that I put together for it: vdsp-wrapper.tar.gz. I have not actually run the code myself. I started to convert his Lispworks FLI code to CFFI code,...