[petsc-dev] Potential BUG for petsc4py

Lisandro Dalcin dalcinl at gmail.com
Tue Nov 8 07:55:52 CST 2016


On 8 November 2016 at 11:19, Ji Zhang <gotofd at gmail.com> wrote:

> More, let mat2=mat1, after do mat1.destroy(), mat2 is unacceptable whether
> memory is released or not.


Not sure what do you mean by "unacceptable", but mat2=mat1 makes mat2 be an
alias to mat1, this is how Python works. As Matt said, maybe you want
mat2=mat1.duplicate().


-- 
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 0109
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20161108/a66cfd2e/attachment.html>


More information about the petsc-dev mailing list