#!/bin/sh

LD_LIBRARY_PATH=/opt/openblas
SBCL=/opt/sbcl/bin/sbcl
DSS=1024 # megabytes

export LD_LIBRARY_PATH

if [ $# -eq 0 ]; then
    echo usage: $0 program.lisp [arguments]
    exit 1
fi

PROGRAM="$1"
shift

exec "$SBCL" --dynamic-space-size "$DSS" --noinform --disable-ldb \
 --lose-on-corruption --end-runtime-options --no-sysinit \
 --no-userinit --load "$PROGRAM" --noprint --non-interactive \
 --end-toplevel-options "$@"
