  We propose and analyze an a posteriori error estimator for a PDE-constrained
optimization problem involving a nondifferentiable cost functional, fractional
diffusion, and control-constraints. We realize fractional diffusion as the
Dirichlet-to-Neumann map for a nonuniformly PDE and propose an equivalent
optimal control problem with a local state equation. For such an equivalent
problem, we design an a posteriori error estimator which can be defined as the
sum of four contributions: two contributions related to the approximation of
the state and adjoint equations and two contributions that account for the
discretization of the control variable and its associated subgradient. The
contributions related to the discretization of the state and adjoint equations
rely on anisotropic error estimators in weighted Sobolev spaces. We prove that
the proposed a posteriori error estimator is locally efficient and, under
suitable assumptions, reliable. We design an adaptive scheme that yields, for
the examples that we perform, optimal experimental rates of convergence.
