  We consider the problem of provably finding a stationary point of a smooth
function to be minimized on the variety of bounded-rank matrices. This turns
out to be unexpectedly delicate. We trace the difficulty back to a geometric
obstacle: On a nonsmooth set, there may be sequences of points along which
standard measures of stationarity tend to zero, but whose limit points are not
stationary. We name such events apocalypses, as they can cause optimization
algorithms to converge to non-stationary points. We illustrate this explicitly
for an existing optimization algorithm on bounded-rank matrices. To provably
find stationary points, we modify a trust-region method on a standard smooth
parameterization of the variety. The method relies on the known fact that
second-order stationary points on the parameter space map to stationary points
on the variety. Our geometric observations and proposed algorithm generalize
beyond bounded-rank matrices. We give a geometric characterization of
apocalypses on general constraint sets, which implies that Clarke-regular sets
do not admit apocalypses. Such sets include smooth manifolds, manifolds with
boundaries, and convex sets. Our trust-region method supports parameterization
by any complete Riemannian manifold.
