diff --git a/dumux/linear/amgparallelhelpers.hh b/dumux/linear/amgparallelhelpers.hh
index 80a65acdc8728b99dc45a4b42b566d044e2f275a..23a95661faf4584e61597042f576acd06aead2d5 100644
--- a/dumux/linear/amgparallelhelpers.hh
+++ b/dumux/linear/amgparallelhelpers.hh
@@ -1016,6 +1016,7 @@ struct LinearAlgebraPreparator
     }
 };
 
+#if HAVE_MPI
 /*!
  * \brief Specialization for the parallel case.
  */
@@ -1069,7 +1070,7 @@ struct LinearAlgebraPreparator<TypeTag, true>
         }
     }
 };
-
+#endif
 
 } // end namespace Dumux