[petsc-dev] Issue compiling newest version

Satish Balay balay at mcs.anl.gov
Wed Oct 3 16:24:55 CDT 2012


I think the attached patch should fix this issue. But I'll let Matt
confirm - before comitting to repo

Satish

On Wed, 3 Oct 2012, Chris Eldred wrote:

> I am having issues compiling petsc-dev (the most recent version according
> to hg pull -u). Here are the last few lines of output:
> 
> [ 65%] Building CXX object
> CMakeFiles/petsc.dir/src/dm/impls/complex/complexcreate.c.o
> /home/user/Desktop/LIBRARIES/petsc-dev/src/dm/impls/complex/complexcreate.c:
> In function ‘PetscErrorCode DMComplexCreateSquareBoundary(DM, const
> PetscReal*, const PetscReal*, const PetscInt*)’:
> /home/user/Desktop/LIBRARIES/petsc-dev/src/dm/impls/complex/complexcreate.c:40:18:
> warning: unused variable ‘mesh’ [-Wunused-variable]
> /home/user/Desktop/LIBRARIES/petsc-dev/src/dm/impls/complex/complexcreate.c:
> In function ‘PetscErrorCode DMComplexCreateCubeBoundary(DM, const
> PetscReal*, const PetscReal*, const PetscInt*)’:
> /home/user/Desktop/LIBRARIES/petsc-dev/src/dm/impls/complex/complexcreate.c:158:18:
> warning: unused variable ‘mesh’ [-Wunused-variable]
> /home/user/Desktop/LIBRARIES/petsc-dev/src/dm/impls/complex/complexcreate.c:
> In function ‘PetscErrorCode DMComplexCreateSquareMesh(DM, const PetscReal*,
> const PetscReal*, const PetscInt*)’:
> /home/user/Desktop/LIBRARIES/petsc-dev/src/dm/impls/complex/complexcreate.c:255:18:
> warning: unused variable ‘mesh’ [-Wunused-variable]
> [ 65%] Building CXX object
> CMakeFiles/petsc.dir/src/dm/impls/complex/complex.c.o
> [ 65%] Building CXX object
> CMakeFiles/petsc.dir/src/dm/impls/complex/complexexodusii.c.o
> /home/user/Desktop/LIBRARIES/petsc-dev/src/dm/impls/complex/complex.c: In
> function ‘PetscErrorCode DMComplexGenerate_CTetgen(DM, PetscBool, _p_DM**)’:
> /home/user/Desktop/LIBRARIES/petsc-dev/src/dm/impls/complex/complex.c:4610:50:
> error: cannot convert ‘DM_Complex*’ to ‘DM {aka _p_DM*}’ for argument ‘1’
> to ‘PetscErrorCode DMGetCoordinatesLocal(DM, _p_Vec**)’
> /home/user/Desktop/LIBRARIES/petsc-dev/src/dm/impls/complex/complex.c:4611:59:
> error: cannot convert ‘DM_Complex*’ to ‘DM {aka _p_DM*}’ for argument ‘1’
> to ‘PetscErrorCode DMComplexGetCoordinateSection(DM, _n_PetscSection**)’
> /home/user/Desktop/LIBRARIES/petsc-dev/src/dm/impls/complex/complex.c: In
> function ‘PetscErrorCode DMComplexRefine_CTetgen(DM, PetscReal*, _p_DM**)’:
> /home/user/Desktop/LIBRARIES/petsc-dev/src/dm/impls/complex/complex.c:4729:18:
> warning: unused variable ‘mesh’ [-Wunused-variable]
> [ 65%] Building CXX object
> CMakeFiles/petsc.dir/src/dm/impls/complex/complexvtk.c.o
> make[4]: *** [CMakeFiles/petsc.dir/src/dm/impls/complex/complex.c.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
> make[3]: *** [CMakeFiles/petsc.dir/all] Error 2
> make[2]: *** [all] Error 2
> make[1]: *** [cmake] Error 2
> ********************************************************************
>   Error during compile, check arch-linux2-cxx-debug/conf/make.log
>   Send it and arch-linux2-cxx-debug/conf/configure.log to
> petsc-maint at mcs.anl.gov
> ********************************************************************
> make: *** [all] Error 1
> 
> I've sent my make.log and configure.log files to petsc-maint at mcs.anl.gov as
> requested.
> 
> 
-------------- next part --------------
diff --git a/src/dm/impls/complex/complex.c b/src/dm/impls/complex/complex.c
--- a/src/dm/impls/complex/complex.c
+++ b/src/dm/impls/complex/complex.c
@@ -4586,7 +4586,6 @@
 PetscErrorCode DMComplexGenerate_CTetgen(DM boundary, PetscBool interpolate, DM *dm)
 {
   MPI_Comm       comm = ((PetscObject) boundary)->comm;
-  DM_Complex    *bd   = (DM_Complex *) boundary->data;
   const PetscInt dim  = 3;
   PLC           *in, *out;
   PetscInt       verbose = 0, vStart, vEnd, v, fStart, fEnd, f;
@@ -4607,8 +4606,8 @@
 
     ierr = PetscMalloc(in->numberofpoints*dim * sizeof(PetscReal), &in->pointlist);CHKERRQ(ierr);
     ierr = PetscMalloc(in->numberofpoints     * sizeof(int),       &in->pointmarkerlist);CHKERRQ(ierr);
-    ierr = DMGetCoordinatesLocal(bd, &coordinates);CHKERRQ(ierr);
-    ierr = DMComplexGetCoordinateSection(bd, &coordSection);CHKERRQ(ierr);
+    ierr = DMGetCoordinatesLocal(boundary, &coordinates);CHKERRQ(ierr);
+    ierr = DMComplexGetCoordinateSection(boundary, &coordSection);CHKERRQ(ierr);
     ierr = VecGetArray(coordinates, &array);CHKERRQ(ierr);
     for (v = vStart; v < vEnd; ++v) {
       const PetscInt idx = v - vStart;
@@ -4726,7 +4725,6 @@
 PetscErrorCode DMComplexRefine_CTetgen(DM dm, PetscReal *maxVolumes, DM *dmRefined)
 {
   MPI_Comm       comm = ((PetscObject) dm)->comm;
-  DM_Complex    *mesh = (DM_Complex *) dm->data;
   const PetscInt dim  = 3;
   PLC           *in, *out;
   PetscInt       verbose = 0, vStart, vEnd, v, cStart, cEnd, c, depth, depthGlobal;


More information about the petsc-dev mailing list