diff --git a/Solver/linearSystemPETSc.cpp b/Solver/linearSystemPETSc.cpp
index 5cc15f0b68df6a563e4d8c19c69703d9dfa4517d..e99012e541f53580536e8f3591f091d4eb4509e7 100644
--- a/Solver/linearSystemPETSc.cpp
+++ b/Solver/linearSystemPETSc.cpp
@@ -5,7 +5,7 @@
 #include "fullMatrix.h"
 #include <stdlib.h>
 #include "GmshMessage.h"
-
+#if not defined(PETSC_USE_COMPLEX)
 void linearSystemPETScBlockDouble::_kspCreate() {
   KSPCreate(PETSC_COMM_WORLD, &_ksp);
   if (this->_parameters.count("petscPrefix"))
@@ -205,6 +205,7 @@ double linearSystemPETScBlockDouble::normInfRightHandSide() const
   VecNorm(_b, NORM_INFINITY, &nor);
   return nor;
 }
+#endif
 
 #include "Bindings.h"
 void linearSystemPETScRegisterBindings(binding *b) 
diff --git a/Solver/linearSystemPETSc.h b/Solver/linearSystemPETSc.h
index 3afe836e92a9ada09ed5ba0fa6b87a4f5b009b8c..c1c462572442e5210e983b4417ebaedbafcc7f1d 100644
--- a/Solver/linearSystemPETSc.h
+++ b/Solver/linearSystemPETSc.h
@@ -266,6 +266,7 @@ class linearSystemPETSc : public linearSystem<scalar> {
 class binding;
 void linearSystemPETScRegisterBindings(binding *b);
 
+#if not defined(PETSC_USE_COMPLEX)
 class linearSystemPETScBlockDouble : public linearSystem<fullMatrix<double> > {
   bool _entriesPreAllocated, _isAllocated, _kspAllocated;
   sparsityPattern _sparsity;
@@ -290,10 +291,11 @@ class linearSystemPETScBlockDouble : public linearSystem<fullMatrix<double> > {
   double normInfRightHandSide() const;
   linearSystemPETScBlockDouble();
 };
+#endif
 
 #else
 
-/*template <class scalar>
+template <class scalar>
 class linearSystemPETSc : public linearSystem<scalar> {
  public :
   linearSystemPETSc()
@@ -312,7 +314,7 @@ class linearSystemPETSc : public linearSystem<scalar> {
   virtual void zeroRightHandSide() {}
   virtual int systemSolve() { return 0; }
   virtual double normInfRightHandSide() const{return 0;}
-};*/
+};
 
 
 #endif