Skip to content

Instantly share code, notes, and snippets.

@jmbr
Created June 15, 2019 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmbr/2147ef49d74ceda57cb8713c4654abe7 to your computer and use it in GitHub Desktop.
Save jmbr/2147ef49d74ceda57cb8713c4654abe7 to your computer and use it in GitHub Desktop.
Create an MPI-enabled SBCL executable
#!/bin/sh
sbcl --eval "(ql:quickload '(:swank :cl-mpi))" \
--eval "(defun toplevel () \
(push #'mpi:mpi-finalize *exit-hooks*) \
(mpi:mpi-init) \
(let ((port (+ swank::default-server-port (mpi:mpi-comm-rank)))) \
(swank:create-server :port port :dont-close t)) \
(sb-impl::toplevel-init))" \
--eval "(save-lisp-and-die \"mpisbcl\" :executable t :toplevel #'toplevel)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment