<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-CA link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Hi Matt,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Attached is the source code and example. I have deleted most of the unused source code but it is still a bit length. Sorry about that. The errors come <span style='color:black'>after </span><span style='font-size:10.5pt;font-family:Consolas;color:black'>DMGetLocalBoundingBox and DMGetBoundingBox.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>-> To compile the code<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>Please type 'make exe' and the executable file petsc_bounding will be created under the same folder.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>-> To test the code<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>Please go to fold 'test' and type 'mpiexec -n 1 ../petsc_bounding'.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>-> The output from PETSc 3.18, error information<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>input file: stedvs.dat<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>------------------------------------------------------------------------<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>global control parameters<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>------------------------------------------------------------------------<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>[0]PETSC ERROR: Corrupt argument: https://petsc.org/release/faq/#valgrind<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>[0]PETSC ERROR: Object already free: Parameter # 1<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>[0]PETSC ERROR: Petsc Release Version 3.18.3, Dec 28, 2022 <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>[0]PETSC ERROR: ../petsc_bounding on a linux-gnu-dbg named starblazer by dsu Sat Mar 4 16:20:51 2023<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-scalapack --download-parmetis --download-metis --download-mumps --download-ptscotch --download-chaco --download-fblaslapack --download-hypre --download-superlu_dist --download-hdf5=yes --download-ctetgen --download-zlib --download-pnetcdf --download-cmake --with-hdf5-fortran-bindings --with-debugging=1<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>[0]PETSC ERROR: #1 VecGetArrayRead() at /home/dsu/Soft/petsc/petsc-3.18.3/src/vec/vec/interface/rvector.c:1928<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>[0]PETSC ERROR: #2 DMGetLocalBoundingBox() at /home/dsu/Soft/petsc/petsc-3.18.3/src/dm/interface/dmcoordinates.c:897<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>[0]PETSC ERROR: #3 /home/dsu/Work/bug-check/petsc_bounding/src/solver_ddmethod.F90:1920<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>Total volume of simulation domain 0.20000000E+01<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>Total volume of simulation domain 0.20000000E+01<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>-> The output from PETSc 3.17 and earlier, no error<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>input file: stedvs.dat<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>------------------------------------------------------------------------<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>global control parameters<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>------------------------------------------------------------------------<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>Total volume of simulation domain 0.20000000E+01<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'>Total volume of simulation domain 0.20000000E+01<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Danyang<o:p></o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:12.0pt;color:black'>From: </span></b><span style='font-size:12.0pt;color:black'>Matthew Knepley <knepley@gmail.com><br><b>Date: </b>Friday, March 3, 2023 at 8:58 PM<br><b>To: </b><danyang.su@gmail.com><br><b>Cc: </b><petsc-users@mcs.anl.gov><br><b>Subject: </b>Re: [petsc-users] PETSC ERROR in DMGetLocalBoundingBox?<o:p></o:p></span></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><div><p class=MsoNormal>On Sat, Mar 4, 2023 at 1:35 AM <<a href="mailto:danyang.su@gmail.com">danyang.su@gmail.com</a>> wrote:<o:p></o:p></p></div><div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hi All,<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>I get a very strange error after upgrading PETSc version to 3.18.3, indicating some object is already free. The error is begin and does not crash the code. There is no error before PETSc 3.17.5 versions.<o:p></o:p></p></div></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>We have changed the way coordinates are handled in order to support higher order coordinate fields. Is it possible<o:p></o:p></p></div><div><p class=MsoNormal>to send something that we can run that has this error? It could be on our end, but it could also be that you are<o:p></o:p></p></div><div><p class=MsoNormal>destroying a coordinate vector accidentally.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> Thanks,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal> Matt<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#6A9955'>!Check coordinates</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#C586C0'>call</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> DMGetCoordinateDM(dmda_flow%da,cda,ierr)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> CHKERRQ(ierr)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#C586C0'>call</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> DMGetCoordinates(dmda_flow%da,gc,ierr)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> CHKERRQ(ierr)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#C586C0'>call</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> DMGetLocalBoundingBox(dmda_flow%da,lmin,lmax,ierr)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> CHKERRQ(ierr)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> </span><span style='font-size:10.5pt;font-family:Consolas;color:#C586C0'>call</span><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> DMGetBoundingBox(dmda_flow%da,gmin,gmax,ierr)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.25pt;background:#1E1E1E'><span style='font-size:10.5pt;font-family:Consolas;color:#D4D4D4'> CHKERRQ(ierr)</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>[0]PETSC ERROR: Corrupt argument: <a href="https://petsc.org/release/faq/#valgrind" target="_blank">https://petsc.org/release/faq/#valgrind</a><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>[0]PETSC ERROR: Object already free: Parameter # 1<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>[0]PETSC ERROR: See <a href="https://petsc.org/release/faq/" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>[0]PETSC ERROR: Petsc Release Version 3.18.3, Dec 28, 2022<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>[0]PETSC ERROR: ../min3p-hpc-mpi-petsc-3.18.3 on a linux-gnu-dbg named starblazer by dsu Fri Mar 3 16:26:03 2023<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-scalapack --download-parmetis --download-metis --download-mumps --download-ptscotch --download-chaco --download-fblaslapack --download-hypre --download-superlu_dist --download-hdf5=yes --download-ctetgen --download-zlib --download-pnetcdf --download-cmake --with-hdf5-fortran-bindings --with-debugging=1<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>[0]PETSC ERROR: #1 VecGetArrayRead() at /home/dsu/Soft/petsc/petsc-3.18.3/src/vec/vec/interface/rvector.c:1928<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>[0]PETSC ERROR: #2 DMGetLocalBoundingBox() at /home/dsu/Soft/petsc/petsc-3.18.3/src/dm/interface/dmcoordinates.c:897<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>[0]PETSC ERROR: #3 /home/dsu/Work/min3p-dbs-backup/src/project/makefile_p/../../solver/solver_ddmethod.F90:2140<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Any suggestion on this?<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Thanks,<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Danyang<o:p></o:p></p></div></div></div></blockquote></div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><div><div><div><div><div><div><p class=MsoNormal>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><o:p></o:p></p></div></div></div></div></div></div></div></div></div></body></html>