Hello,<br><br>Following suggestions on a previous query on handling distributed arrays, I set forth to use the DMDA path.<br><br>I installed the latest petsc version (3.2 patch 3), and went looking into example 11f90 (in src/dm/examples/tutorials) for inspiration. <br>
<br>Compilation of the example went ok, but when I run the example I get an error:<br><br>12:25] examples/tutorials 81 &gt; mpiexec -n 1 ex11f90<br>Vector Object:Vec_0x80b3bb8_0 1 MPI processes<br>  type: mpi<br>Process [0]<br>
*** glibc detected *** ex11f90: free(): invalid pointer: 0x080b6630 ***<br>======= Backtrace: =========<br>/lib/libc.so.6[0xb6f438c4]<br>/lib/libc.so.6(cfree+0x90)[0xb6f47370]<br>/home/wdrenth/software/petsc-3.2-p3/linux-gnu/lib/libpetsc.so(PetscFreeAlign+0x1b)[0xb777f5b1]<br>
/home/wdrenth/software/petsc-3.2-p3/linux-gnu/lib/libpetsc.so(VecDestroy_Seq+0x6a)[0xb7616e60]<br>1<br>2<br>3<br>4<br>0<br>/home/wdrenth/software/petsc-3.2-p3/linux-gnu/lib/libpetsc.so(VecDestroy+0x51)[0xb7976a11]<br>/home/wdrenth/software/petsc-3.2-p3/linux-gnu/lib/libpetsc.so(DMClearGlobalVectors+0x6c)[0xb7666064]<br>
/home/wdrenth/software/petsc-3.2-p3/linux-gnu/lib/libpetsc.so(DMDestroy+0x233)[0xb76917d8]<br>/home/wdrenth/software/petsc-3.2-p3/linux-gnu/lib/libpetsc.so(dmdestroy_+0x1b)[0xb7692b5a]<br>ex11f90(MAIN__+0x172)[0x8049086]<br>
ex11f90(main+0x27)[0x8049967]<br>/lib/libc.so.6(__libc_start_main+0xe0)[0xb6eee390]<br>ex11f90[0x8048eb1]<br><br><br>Petsc was installed with the following config options:<br><br>
--PETSC_ARCH=${PETSC_ARCH} --with-mpi-dir=${MPI_DIR} 
--download-f-blas-lapack=1 --with-shared-libraries=1 --with-debugging=no
 --download-mumps=1 --with-mumps=1 --with-fortran-interfaces 
--download-scalapack=1 --with-scalapack=1 --download-blacs=1 
--with-blacs=1 --download-parmetis=1 --download-hypre=1<br>
<br>PETSC_ARCH is linux-gnu, and I have a locally installed MPI version,
 with MPI_DIR being the location. I use the openmpi 1.4.3 version of 
MPI.<br><br>Thank for any support and help,<br><br>kind regards,<br>Wienand<br clear="all"><br>-- <br>Wienand Drenth PhD<br>Eindhoven, the Netherlands<br>