Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-03-03 Thread Jed Brown via petsc-users
r seq VecScatter_0x8400_5 >> [0] VecScatterCreate() in >> /home/yyy910805/petsc/src/vec/vscat/interface/vscreate.c >> Attempting to use an MPI routine after finalizing MPICH >> >> ---------- >>

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-03-03 Thread Yuyun Yang via petsc-users
-users@mcs.anl.gov Subject: Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed If you run this with MPICH, it prints Attempting to use an MPI routine after finalizing MPICH You need to ensure that the C++ class destructor is called before PetscFinalize

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-03-03 Thread Jed Brown via petsc-users
, March 3, 2019 12:46 PM > To: Yuyun Yang > Cc: Zhang, Junchao ; petsc-users@mcs.anl.gov > Subject: Re: [petsc-users] AddressSanitizer: attempting free on address which > was not malloc()-ed > > On Sun, Mar 3, 2019 at 3:05 PM Yuyun Yang > mailto:yyan...@stanford.edu>> w

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-03-03 Thread Yuyun Yang via petsc-users
l.gov<mailto:petsc-users@mcs.anl.gov> Subject: Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed On Sun, Mar 3, 2019 at 1:03 PM Yuyun Yang via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: I tried compiling without the sanitizer and running

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-03-03 Thread Yuyun Yang via petsc-users
1, 2019 7:36 AM To: Yuyun Yang mailto:yyan...@stanford.edu>> Subject: Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed On Fri, Mar 1, 2019 at 1:02 AM Yuyun Yang mailto:yyan...@stanford.edu>> wrote: Actually, I also saw a line at the beginnin

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-03-03 Thread Yuyun Yang via petsc-users
uyun From: Zhang, Junchao Sent: Friday, March 1, 2019 7:36 AM To: Yuyun Yang Subject: Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed On Fri, Mar 1, 2019 at 1:02 AM Yuyun Yang mailto:yyan...@stanford.edu>> wrote: Actually, I also saw a line at the

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-02-27 Thread Yuyun Yang via petsc-users
//aka.ms/o0ukef> From: Zhang, Junchao mailto:jczh...@mcs.anl.gov>> Sent: Wednesday, February 27, 2019 6:24:13 PM To: Yuyun Yang Cc: Matthew Knepley; petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov> Subject: Re: [petsc-users] AddressSanitizer: attempting free on address which

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-02-27 Thread Zhang, Junchao via petsc-users
mailto:jczh...@mcs.anl.gov>> Sent: Wednesday, February 27, 2019 6:24:13 PM To: Yuyun Yang Cc: Matthew Knepley; petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov> Subject: Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed Could you provide a

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-02-27 Thread Yuyun Yang via petsc-users
atthew Knepley; petsc-users@mcs.anl.gov Subject: Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed Could you provide a compilable and runnable test so I can try it? --Junchao Zhang On Wed, Feb 27, 2019 at 7:34 PM Yuyun Yang mailto:yyan...@stanford.edu&g

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-02-27 Thread Zhang, Junchao via petsc-users
mail.com>>; petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov> Subject: Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed On Wed, Feb 27, 2019 at 10:41 AM Yuyun Yang via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: I c

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-02-27 Thread Yuyun Yang via petsc-users
:50 AM To: Yuyun Yang Cc: Matthew Knepley ; petsc-users@mcs.anl.gov Subject: Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed On Wed, Feb 27, 2019 at 10:41 AM Yuyun Yang via petsc-users mailto:petsc-users@mcs.anl.gov>> wrote: I called VecD

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-02-27 Thread Zhang, Junchao via petsc-users
lt;mailto:petsc-users@mcs.anl.gov> Subject: Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed You call VecDuplicate() a bunch, but VecDestroy() only once in the bottom function. This is wrong. Also, CHECK ALL RETURN CODES. This is the fastest way to find

Re: [petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-02-27 Thread Yuyun Yang via petsc-users
: attempting free on address which was not malloc()-ed You call VecDuplicate() a bunch, but VecDestroy() only once in the bottom function. This is wrong. Also, CHECK ALL RETURN CODES. This is the fastest way to find errors. Matt On Wed, Feb 27, 2019 at 2:06 AM Yuyun Yang via petsc-users

[petsc-users] AddressSanitizer: attempting free on address which was not malloc()-ed

2019-02-26 Thread Yuyun Yang via petsc-users
Hello team, I ran into the address sanitizer error that I hope you could help me with. I don't really know what's wrong with the way the code frees memory. The relevant code file is attached. The line number following domain.cpp specifically referenced to the vector _q, which seems a little