I'm glad that a smaller dt value worked. With rigid bodies, a smaller dt is often necessary due to the rotational motion of the bodies.
Regarding your question on the box dimensions, I can confirm that your setup.py script ignores the "packing" argument:
❯ python setup.py 20 150 21 0.5 0.8
❯ python -c "import gsd.hoomd; print(gsd.hoomd.open('test.gsd')[0].configuration.box)"
[ 46.03075 20. 155.79239 0. 0. 0. ]
❯ rm *.gsd
❯ python setup.py 20 150 21 0.1 0.8
❯ python -c "import gsd.hoomd; print(gsd.hoomd.open('test.gsd')[0].configuration.box)"
[ 46.03075 20. 155.79239 0. 0. 0. ]
Line 179 in your script sets the box dimensions. You need to ensure that you provide the desired values for Lx, Ly, and Lz.
frame.configuration.box = [Lx, Ly, Lz, 0, 0, 0]. Your script computes a `rescale` value based on `packing`, but does not use `rescale`.
Also, looking at your submit script - I would highly recommend using signac, another open source software tool that we develop, to organize your data.