On 21/03/12 21:45, Lucas Nussbaum wrote:
>> The following packages have unmet dependencies:
>>  sbuild-build-depends-getdp-dummy : Depends: libpetsc3.1-dev but it is not 
>> installable
>>                                     Depends: libslepc3.1-dev but it is not 
>> installable
>> E: Broken packages

Bumping the dependencies to libpetsc3.2-dev and libslepc3.2-dev, updating the
paths in debian/rules and applying the attached patch makes it build again.

I didn't test if the resulting package works. There are also a lot of new
warnings related to Fortran code in contrib. So someone who is more familiar
with getdp should look into this.

Regards
-- 
Sebastian Ramacher
diff --git a/Legacy/EigenSolve.cpp b/Legacy/EigenSolve.cpp
index f2928f9..0fc0889 100644
--- a/Legacy/EigenSolve.cpp
+++ b/Legacy/EigenSolve.cpp
@@ -13,8 +13,8 @@ void EigenSolve(struct DofData * DofData_P, int NumEigenvalues,
 #if defined(HAVE_ARPACK) && defined(HAVE_SLEPC) 
   // if both Arpack and SLEPC are available, use Arpack by default
   // (set "-slepc" on the command line to force SLEPC)
-  PetscTruth slepc = PETSC_FALSE, set;
-  PetscOptionsGetTruth(PETSC_NULL, "-slepc", &slepc, &set);
+  PetscBool slepc = PETSC_FALSE, set;
+  PetscOptionsGetBool(PETSC_NULL, "-slepc", &slepc, &set);
   if(slepc)
     EigenSolve_SLEPC(DofData_P, NumEigenvalues, shift_r, shift_i);
   else
diff --git a/Legacy/EigenSolve_SLEPC.cpp b/Legacy/EigenSolve_SLEPC.cpp
index bec19d5..3e6cec3 100644
--- a/Legacy/EigenSolve_SLEPC.cpp
+++ b/Legacy/EigenSolve_SLEPC.cpp
@@ -130,8 +130,8 @@ static void _storeEigenVectors(struct DofData *DofData_P, int nconv,
     Current.Time = re;
     Current.TimeImag = im;
   }
-  _try(VecDestroy(xr));
-  _try(VecDestroy(xi));
+  _try(VecDestroy(&xr));
+  _try(VecDestroy(&xi));
 }
 
 static void _linearEVP(struct DofData * DofData_P, int numEigenValues, 
@@ -203,8 +203,6 @@ static void _linearEVP(struct DofData * DofData_P, int numEigenValues,
     Msg::Error("SLEPc diverged after %d iterations", its);
   else if(reason == EPS_DIVERGED_BREAKDOWN)
     Msg::Error("SLEPc generic breakdown in method");
-  else if(reason == EPS_DIVERGED_NONSYMMETRIC)
-    Msg::Error("The operator is nonsymmetric");
   
   // get number of converged approximate eigenpairs
   PetscInt nconv;
@@ -217,7 +215,7 @@ static void _linearEVP(struct DofData * DofData_P, int numEigenValues,
   // print eigenvalues and store eigenvectors in DofData
   _storeEigenVectors(DofData_P, nconv, eps, PETSC_NULL);
   
-  _try(EPSDestroy(eps));
+  _try(EPSDestroy(&eps));
 }
 
 static void _quadraticEVP(struct DofData * DofData_P, int numEigenValues, 
@@ -307,7 +305,7 @@ static void _quadraticEVP(struct DofData * DofData_P, int numEigenValues,
   // print eigenvalues and store eigenvectors in DofData
   _storeEigenVectors(DofData_P, nconv, PETSC_NULL, qep);
   
-  _try(QEPDestroy(qep));
+  _try(QEPDestroy(&qep));
 
   // restore operators
   LinAlg_ProdMatrixDouble(&DofData_P->M3, -1.0, &DofData_P->M3);
diff --git a/Legacy/LinAlg_PETSC.cpp b/Legacy/LinAlg_PETSC.cpp
index fe76f19..4b3dd72 100644
--- a/Legacy/LinAlg_PETSC.cpp
+++ b/Legacy/LinAlg_PETSC.cpp
@@ -127,13 +127,13 @@ static void _fillseq(gVector *V)
   VecScatterBegin(ctx, V->V, V->Vseq, INSERT_VALUES, SCATTER_FORWARD);
   VecScatterEnd(ctx, V->V, V->Vseq, INSERT_VALUES, SCATTER_FORWARD);
 #endif
-  VecScatterDestroy(ctx);
+  VecScatterDestroy(&ctx);
 }
 
 void LinAlg_CreateMatrix(gMatrix *M, gSolver *Solver, int n, int m)
 {
   PetscInt prealloc = 100;
-  PetscTruth set;
+  PetscBool set;
   PetscOptionsGetInt(PETSC_NULL, "-petsc_prealloc", &prealloc, &set);
 
   // prealloc cannot be bigger than the number of rows!
@@ -161,19 +161,19 @@ void LinAlg_CreateMatrix(gMatrix *M, gSolver *Solver, int n, int m)
 void LinAlg_DestroySolver(gSolver *Solver)
 {
   for(int i = 0; i < 10; i++)
-    if(Solver->ksp[i]) _try(KSPDestroy(Solver->ksp[i]));
+    if(Solver->ksp[i]) _try(KSPDestroy(&Solver->ksp[i]));
 }
 
 void LinAlg_DestroyVector(gVector *V)
 {
-  _try(VecDestroy(V->V));
+  _try(VecDestroy(&V->V));
   if(Msg::GetCommSize() > 1)
-    _try(VecDestroy(V->Vseq));
+    _try(VecDestroy(&V->Vseq));
 }
 
 void LinAlg_DestroyMatrix(gMatrix *M)
 {
-  _try(MatDestroy(M->M));
+  _try(MatDestroy(&M->M));
 }
 
 void LinAlg_CopyScalar(gScalar *S1, gScalar *S2)
@@ -303,7 +303,7 @@ void LinAlg_PrintVector(FILE *file, gVector *V, bool matlab)
     _try(PetscViewerASCIIOpen(PETSC_COMM_WORLD, "vector.m", &fd));
     _try(PetscViewerSetFormat(fd, PETSC_VIEWER_ASCII_MATLAB));
     _try(VecView(V->V, fd));
-    _try(PetscViewerDestroy(fd));
+    _try(PetscViewerDestroy(&fd));
   }
 } 
 
@@ -314,7 +314,7 @@ void LinAlg_PrintMatrix(FILE *file, gMatrix *M, bool matlab)
   _try(PetscViewerASCIIOpen(PETSC_COMM_WORLD, "matrix.m", &fd));
   _try(PetscViewerSetFormat(fd, PETSC_VIEWER_ASCII_MATLAB));
   _try(MatView(M->M, fd));
-  _try(PetscViewerDestroy(fd));
+  _try(PetscViewerDestroy(&fd));
 }
 
 void LinAlg_WriteScalar(FILE *file, gScalar *S)
@@ -881,7 +881,7 @@ static void _zitsol(gMatrix *A, gVector *B, gVector *X)
 {
   int precond = 1, lfil = 30, im = 100, maxits = 200;
   double tol0 = 0.01, tol = 1e-10;
-  PetscTruth set;
+  PetscBool set;
   PetscOptionsGetInt(PETSC_NULL, "-zitsol_precond", &precond, &set);
   PetscOptionsGetInt(PETSC_NULL, "-zitsol_lfil", &lfil, &set);
   PetscOptionsGetInt(PETSC_NULL, "-zitsol_im", &im, &set);
@@ -990,8 +990,8 @@ static void _solve(gMatrix *A, gVector *B, gSolver *Solver, gVector *X,
 {
 #if defined(HAVE_ZITSOL)
   // testing Yousef's new preconditioners and solvers
-  PetscTruth set, zitsol = PETSC_FALSE;
-  PetscOptionsGetTruth(PETSC_NULL, "-zitsol", &zitsol, &set);
+  PetscBool set, zitsol = PETSC_FALSE;
+  PetscOptionsGetBool(PETSC_NULL, "-zitsol", &zitsol, &set);
   if(zitsol){ _zitsol(A, B, X); return; }
 #endif
 
diff --git a/configure.in b/configure.in
index a1581cc..1270c52 100644
--- a/configure.in
+++ b/configure.in
@@ -160,7 +160,7 @@ if test "x$enable_petsc" != "xno" -a "x$enable_sparskit" != "xyes"; then
   fi
   LAPACK="yes"
   LINKER="\${CLINKER}"
-  FLAGS="${FLAGS} \${PETSCFLAGS} \${PETSC_INCLUDE}"
+  FLAGS="${FLAGS} \${PETSCFLAGS} \${PETSC_INCLUDE} \${PETSC_CC_INCLUDES}"
   AC_DEFINE(HAVE_PETSC)
   BO="${BO} Petsc"
 fi
@@ -173,7 +173,7 @@ if test "x${PETSC}" = "xyes" -a "x$enable_slepc" != "xno"; then
     AC_CHECK_FILE(${SLEPC_DIR}/include/slepcqep.h,SLEPC="yes",SLEPC="no")
     if test "x${SLEPC}" = "xyes"; then
       GETDP_LIBS="${GETDP_LIBS} -L${SLEPC_DIR}/${PETSC_ARCH}/lib -lslepc"
-      FLAGS="${FLAGS} -I${SLEPC_DIR}/include"
+      FLAGS="${FLAGS} -I${SLEPC_DIR}/include -I${SLEPC_DIR}/${PETSC_ARCH}/include"
       AC_DEFINE(HAVE_SLEPC)
       BO="${BO} Slepc"
     else

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to