Re: [petsc-users] Inquiry about the definitely lost memory

2023-06-09 Thread Barry Smith
If the program is not completely successful, that is it terminates early due to an error condition, we do not attempt to recover all the memory and resources. > On Jun 9, 2023, at 4:33 PM, neil liu wrote: > > Thanks a lot, Matt and Barry. > > Indeed, I found the original leak that

Re: [petsc-users] Inquiry about the definitely lost memory

2023-06-09 Thread neil liu
Thanks a lot, Matt and Barry. Indeed, I found the original leak that will lead to something related to DMGetWorkArray. ==15547== 50,000 bytes in 1 blocks are definitely lost in loss record 2,786 of 2,791 ==15547==at 0x4C37135: malloc (vg_replace_malloc.c:381) ==15547==by 0x9BE4E43:

Re: [petsc-users] Unconditional jump or move depends on uninitialised value(s)

2023-06-09 Thread Tu, Jiannan
Jacob, Thank you very much. I did use -Wall compiler option. Nevertheless, declaring the variables in the smallest scope is a very good way to avoid uninitialized usage of the variables. Jiannan From: Jacob Faibussowitsch Sent: Friday, June 9, 2023 3:55 PM To:

Re: [petsc-users] Unconditional jump or move depends on uninitialised value(s)

2023-06-09 Thread Tu, Jiannan
Barry, Thank you for the very good advice. I think all the elements have been filled but there may be some on the boundaries missed. Jiannan From: Barry Smith Sent: Friday, June 9, 2023 3:35 PM To: Tu, Jiannan Cc: petsc-users@mcs.anl.gov ; Zhang, Hong

Re: [petsc-users] Unconditional jump or move depends on uninitialised value(s)

2023-06-09 Thread Jacob Faibussowitsch
> I'll see what gcc complier options I should use to detect the use of declared > variables that are not initialized The flag you are looking for is -Wall. Please fix all the warnings that it may raise. Generally speaking, it is also much easier to ensure your variables are initialized if

Re: [petsc-users] Unconditional jump or move depends on uninitialised value(s)

2023-06-09 Thread Barry Smith
Yes they matter; they cannot be ignored. The most likely cause is that you did not fill in certain entries in the vector during the function evaluation routine you set with SNESSetFunction(). Another possibility is if you provided a right hand side vector to the SNES (uncommon) that not

[petsc-users] Unconditional jump or move depends on uninitialised value(s)

2023-06-09 Thread Tu, Jiannan
To avoid warninigs about “unconditional jump or move depends on uninitialized value(s)”, I simplified my programs so that the warnings remain only through SNESSolve(). Some of them are appended below. My question is if such warnings really matter and affect the simulation results? Thank you

Re: [petsc-users] IS natural numbering to global numbering

2023-06-09 Thread Matthew Knepley
On Fri, Jun 9, 2023 at 1:46 PM YuSh Lo wrote: > Hi Barry, > > Is there any way to use the mapping generated by DMPlexDistribute along > with AO? > For Plex, if you turn on https://petsc.org/main/manualpages/DM/DMSetUseNatural/ before DMPlexDistribute(), it will compute and store a

Re: [petsc-users] IS natural numbering to global numbering

2023-06-09 Thread YuSh Lo
Hi Barry, Is there any way to use the mapping generated by DMPlexDistribute along with AO? Thanks, Josh Barry Smith 於 2023年6月9日 週五 上午10:42寫道: > > You might be looking for https://petsc.org/release/manualpages/AO/AO/#ao > > > On Jun 9, 2023, at 11:02 AM, Mark Adams wrote: > > An IS is just

Re: [petsc-users] Inquiry about the definitely lost memory

2023-06-09 Thread Barry Smith
This are MPI objects PETSc creates in PetscInitialize(), for successful runs they should all be removed in PETSc finalize, hence they should not appear as valgrind links. Are you sure PetscFinalize() is called and completes? We'll need the exact PETSc version you are using to know

Re: [petsc-users] Inquiry about the definitely lost memory

2023-06-09 Thread Matthew Knepley
On Fri, Jun 9, 2023 at 12:04 PM neil liu wrote: > Dear Petsc developers, > > I am using valgrind to check the memory leak. It shows, > [image: image.png] > Finally, I found that DMPlexrestoretrasitiveclosure can resolve this > memory leak. > > My question is from the above screen shot, it seems

[petsc-users] Inquiry about the definitely lost memory

2023-06-09 Thread neil liu
Dear Petsc developers, I am using valgrind to check the memory leak. It shows, [image: image.png] Finally, I found that DMPlexrestoretrasitiveclosure can resolve this memory leak. My question is from the above screen shot, it seems the leak is related to MPI. How can I relate that reminder to

Re: [petsc-users] IS natural numbering to global numbering

2023-06-09 Thread Barry Smith
You might be looking for https://petsc.org/release/manualpages/AO/AO/#ao > On Jun 9, 2023, at 11:02 AM, Mark Adams wrote: > > An IS is just an array of integers. We need your context. > Is this question for sparse matrices? If so look at the documentation on the > AIJ matrix construction

Re: [petsc-users] IS natural numbering to global numbering

2023-06-09 Thread Mark Adams
An IS is just an array of integers. We need your context. Is this question for sparse matrices? If so look at the documentation on the AIJ matrix construction and the global vertex numbering system. Mark On Thu, Jun 8, 2023 at 1:15 PM YuSh Lo wrote: > Hi, > > I have an IS that contains some

Re: [petsc-users] PETSc downloading older version of OpenBLAS

2023-06-09 Thread Satish Balay via petsc-users
Yeah --download-openblas-commit option is a modifier to --download-openblas - so both options should be specified.. There is a proposal to automatically enable --download-openblas when --download-openblas-commit (or other similar modifier) option is specified - but its not in petsc yet..

Re: [petsc-users] Behavior of KSP iterations when using Restart

2023-06-09 Thread Matthew Knepley
On Fri, Jun 9, 2023 at 3:09 AM Nicolas Garcia Guzman wrote: > Hi, sorry I will attach the logs of a run using 17 restart iterations and > one using 19. Testing using other values like 100, the true residual norm > does diverge. Is there any recommendation for this case? The linear system > comes

Re: [petsc-users] PETSc downloading older version of OpenBLAS

2023-06-09 Thread TAU
I managed to download a compatible openBLAS with conf ./configure --download-openblas --download-openblas-commit='0b678b19dc03f2a999d6e038814c4c50b9640a4e' --with-openmp --with-mpi=0 --with-shared-libraries=1 --with-mumps-serial=1 --download-mumps --download-metis --download-slepc