Hong you may want to take a look at this big commit here https://gitlab.com/petsc/petsc/-/merge_requests/2712/diffs?commit_id=94a81e695f30a0ff4a14c0eb596e09393f9b329f
Now that you coded MatProduct, I think it is the case of not playing with the destroy/view routines anymore in the various MatMat operations (you know, I have raised this issue already in the past). I think I got it fixed properly. What I did in short, I have added extra slots to the MatProduct struct to keep track of how to destroy/view the extra information you need for the products. Also, I have deprecated MatFreeIntermediateStructures, since we now have MatProductClear I have spent quite a bit of time on it, and I personally think it is the proper way to go. I think I took care of all the cases already covered. Tests are clean for me I would like to hear your opinion. Thanks Stefano Il giorno sab 9 mag 2020 alle ore 13:45 Stefano Zampini < stefano.zamp...@gmail.com> ha scritto: > Jose > > I have just pushed a test > https://gitlab.com/petsc/petsc/-/blob/d64c2bc63c8d5d1a8c689f1abc762ae2722bba26/src/mat/tests/ex69.c > See if it fits your framework, and feel free to modify the test to add > more checks > > > Il giorno ven 8 mag 2020 alle ore 18:48 Jose E. Roman <jro...@dsic.upv.es> > ha scritto: > >> Attached. Run with -test 1 or -test 2 >> >> > El 8 may 2020, a las 17:14, Stefano Zampini <stefano.zamp...@gmail.com> >> escribió: >> > >> > Jose >> > >> > Just send me a MWE and I’ll fix the case for you >> > >> > Thanks >> > Stefano >> > > > -- > Stefano > -- Stefano