Installing

1 Installing from Git

GCC 4.5 or later is required to compile FFI bindings for the MPI library.

MPI for Lua is available from a Git repository:

git clone https://git.colberg.org/peter/lua-mpi

In the repository, checkout the latest release version:

git checkout 0.2

If you have GnuPG, verify that the tag is signed by the following key:

git tag -v 0.2
Primary key fingerprint: 2997 6EC2 2BD1 EBBC CC77  F3A6 183B D5ED 3527 8611
     Subkey fingerprint: 983B F9D0 F02A 6014 0CEC  529F 767E 12A8 C92A 31CB

If LuaJIT is not installed system-wide, set PKG_CONFIG_PATH:

export PKG_CONFIG_PATH=/opt/luajit-2.0.3/lib/pkgconfig

Compile the FFI bindings for the MPI library and run the test suite:

make

To override the default GCC C compiler gcc, set CC:

make CC=gcc-4.7

To override the default MPI C compiler mpicc, set CPP:

make CPP=mpicc.openmpi

To override the MPI executable for the test suite, set MPIEXEC:

make MPIEXEC="mpirun -np 8"

2 Installing from LuaRocks

MPI for Lua is available from LuaRocks:

luarocks install --local mpi

You may wish to remove older versions before installing:

luarocks remove --local mpi

To use the module, set the Lua module path in your shell’s startup file:

eval $(luarocks path)

If the LuaRocks mirror is not available, install from the Git repository above:

luarocks install --local rockspec/mpi-0.2-1.rockspec

To install the module directly from the working tree, use:

luarocks make --local rockspec/mpi-0.2-1.rockspec

In this case you must manually checkout the corresponding version beforehand.