Re: [petsc-users] KSP_Solve crashes in debug mode

2023-02-09 Thread Matthew Knepley
On Thu, Feb 9, 2023 at 6:05 PM Sajid Ali Syed via petsc-users < petsc-users@mcs.anl.gov> wrote: > I added “-malloc_debug” in a .petscrc file and ran it again. The backtrace > from lldb is in the attached file. The crash now seems to be at: > > Process 32660 stopped* thread #1, queue =

Re: [petsc-users] KSP_Solve crashes in debug mode

2023-02-09 Thread Barry Smith
  Hmm, it is crashing in PetscFunctionListDLAllPop_Private() which is very recent code with Jacob's name on it.  It is only run in debug mode, hence only crashes there. I don't know why it fails here, somehow memory was corrupted earlier? Try running with -malloc_debug or under valgrind?static

Re: [petsc-users] KSP_Solve crashes in debug mode

2023-02-09 Thread Sajid Ali Syed via petsc-users
I’ve also printed out the head struct in the debugger, and it looks like this: (lldb) print (TRSPACE)*head(TRSPACE) $7 = { size = 16 rsize = 16 id = 12063 lineno = 217 filename = 0x0001167fd865 "/Users/sasyed/Documents/packages/petsc/src/sys/dll/reg.c" functionname =

Re: [petsc-users] KSP_Solve crashes in debug mode

2023-02-09 Thread Sajid Ali Syed via petsc-users
Hi Barry, The lack of line numbers is due to the fact that this build of PETSc was done via spack which installs it in a temporary directory before moving it to the final location. I have removed that build and installed PETSc locally (albeit with a simpler configuration) and see the same

Re: [petsc-users] KSP_Solve crashes in debug mode

2023-02-09 Thread Barry Smith
Hmm, looks like your build may be funny? It is not in debug mode frame #2: 0x00010eda20c8 libpetsc.3.018.dylib`PetscHeaderDestroy_Private + 1436 frame #3: 0x00010f10176c libpetsc.3.018.dylib`VecDestroy + 808 frame #4: 0x000110199f34 libpetsc.3.018.dylib`KSPSolve_Private +

Re: [petsc-users] KSP_Solve crashes in debug mode

2023-02-09 Thread Sajid Ali Syed via petsc-users
The configuration log is attached with this email. configure_log_tail Description: configure_log_tail

[petsc-users] KSP_Solve crashes in debug mode

2023-02-09 Thread Sajid Ali Syed via petsc-users
Hi PETSc-developers, In our application we call KSP_Solve as part of a step to propagate a beam through a lattice. I am observing a crash within KSP_Solve for an application only after the 43rd call to KSP_Solve when building the application and PETSc in debug mode, full logs for which are

Re: [petsc-users] Save images of ksp_monitor and ksp_view_eigenvaluses with user defined names

2023-02-09 Thread Barry Smith
> On Feb 9, 2023, at 3:38 AM, Zongze Yang wrote: > > Hi, Barry > > Thanks for the tip. > > One more question: how can I save the log (draw_lg) figure by using > `draw:image:joe.ppm`? I am not sure what you mean. >> -ksp_monitor_solution draw:image:joe.ppm Will create a directory

Re: [petsc-users] interpreting data from SNESSolve profiling

2023-02-09 Thread Matteo Semplice
I see: only the first function evaluation of each Newton solve appears by itself in the flamegraph and all the subsequent ones appear inside the linesearch routine. It's all clear now. Thanks     Matteo On 08/02/2023 23:00, Barry Smith wrote:      Yes, the "basic" line search updates the

Re: [petsc-users] Save images of ksp_monitor and ksp_view_eigenvaluses with user defined names

2023-02-09 Thread Zongze Yang
Hi, Barry Thanks for the tip. One more question: how can I save the log (draw_lg) figure by using `draw:image:joe.ppm`? Thanks. Zongze Barry Smith 于2023年2月9日周四 05:35写道: > >It cannot be done using the default X windows monitor and -draw_save > because there is no way to distinguish the