  Modular lattices, introduced by R. Dedekind, are an important subvariety of
lattices that includes all distributive lattices. Heitzig and Reinhold
developed an algorithm to enumerate, up to isomorphism, all finite lattices up
to size 18. Here we adapt and improve this algorithm to construct and count
modular lattices up to size 24, semimodular lattices up to size 22, and
lattices of size 19. We also show that $2^{n-3}$ is a lower bound for the
number of nonisomorphic modular lattices of size $n$.
