PETSc multigrid (as a preconditioner) is quite mature and may be used with any of the KSP (iterative Krylov method) solvers in PETSc by typing:
However, this requires that you have some way of generating your coarse levels, such as having structured grids defined by PETSc DA objects, which will be coarsened automatically.
Or, if you want to use algebraic multigrid from the HYPRE package, you can use
Or from the ML package with
These are downloaded during the configuration process by appending
to your ./configure command line.
The part that is depreciated (for now) is the DMMG framework, which is being replaced by the SNES (nonlinear) FAS solver and better support for handling multilevel discretizations while using either MG or FAS as we speak. The other replacement (for linear problems) is
-pc_type gamg -pc_gamg_type sa
This is a newer code, native in PETSc, highly scalable smoothed-aggregation algebraic multigrid.