<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Alexander<div class=""><br class=""></div><div class="">Do you have a small code to reproduce the issue?<div class=""><br class=""></div><div class="">Below is the output using a PETSc example (src/mat/tests/ex11). The pattern is kept. </div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">kl-18448:tests szampini$ ./ex11 </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Mat Object: 1 MPI processes</span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> type: seqaij</span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 0: (0, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 1: (0, -1.) (1, 4.) (2, -1.) (6, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 2: (2, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 3: (2, -1.) (3, 4.) (4, -1.) (8, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 4: (4, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 5: (0, -1.) (5, 4.) (6, -1.) (10, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 6: (6, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 7: (2, -1.) (6, -1.) (7, 4.) (8, -1.) (12, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 8: (8, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 9: (4, -1.) (8, -1.) (9, 4.) (14, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 10: (10, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 11: (6, -1.) (10, -1.) (11, 4.) (12, -1.) (16, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 12: (12, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 13: (8, -1.) (12, -1.) (13, 4.) (14, -1.) (18, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 14: (14, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 15: (10, -1.) (15, 4.) (16, -1.) (20, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 16: (16, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 17: (12, -1.) (16, -1.) (17, 4.) (18, -1.) (22, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 18: (18, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 19: (14, -1.) (18, -1.) (19, 4.) (24, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 20: (20, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 21: (16, -1.) (20, -1.) (21, 4.) (22, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 22: (22, 5.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 23: (18, -1.) (22, -1.) (23, 4.) (24, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 24: (19, -1.) (23, -1.) (24, 4.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">kl-18448:tests szampini$ ./ex11 -keep_nonzero_pattern</span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Mat Object: 1 MPI processes</span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> type: seqaij</span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 0: (0, 5.) (1, 0.) (5, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 1: (0, -1.) (1, 4.) (2, -1.) (6, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 2: (1, 0.) (2, 5.) (3, 0.) (7, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 3: (2, -1.) (3, 4.) (4, -1.) (8, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 4: (3, 0.) (4, 5.) (9, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 5: (0, -1.) (5, 4.) (6, -1.) (10, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 6: (1, 0.) (5, 0.) (6, 5.) (7, 0.) (11, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 7: (2, -1.) (6, -1.) (7, 4.) (8, -1.) (12, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 8: (3, 0.) (7, 0.) (8, 5.) (9, 0.) (13, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 9: (4, -1.) (8, -1.) (9, 4.) (14, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 10: (5, 0.) (10, 5.) (11, 0.) (15, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 11: (6, -1.) (10, -1.) (11, 4.) (12, -1.) (16, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 12: (7, 0.) (11, 0.) (12, 5.) (13, 0.) (17, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 13: (8, -1.) (12, -1.) (13, 4.) (14, -1.) (18, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 14: (9, 0.) (13, 0.) (14, 5.) (19, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 15: (10, -1.) (15, 4.) (16, -1.) (20, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 16: (11, 0.) (15, 0.) (16, 5.) (17, 0.) (21, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 17: (12, -1.) (16, -1.) (17, 4.) (18, -1.) (22, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 18: (13, 0.) (17, 0.) (18, 5.) (19, 0.) (23, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 19: (14, -1.) (18, -1.) (19, 4.) (24, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 20: (15, 0.) (20, 5.) (21, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 21: (16, -1.) (20, -1.) (21, 4.) (22, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 22: (17, 0.) (21, 0.) (22, 5.) (23, 0.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 23: (18, -1.) (22, -1.) (23, 4.) (24, -1.) </span></div><div style="margin: 0px; font-stretch: normal; font-size: 21px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">row 24: (19, -1.) (23, -1.) (24, 4.)</span></div><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 15, 2021, at 4:41 PM, Alexander Lindsay <<a href="mailto:alexlindsay239@gmail.com" class="">alexlindsay239@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">My interpretation of the documentation page of MatZeroRows is that if I've set MAT_KEEP_NONZERO_PATTERN to true, then my sparsity pattern shouldn't be changed by a call to it, e.g. a->imax should not change. However, at least for sequential matrices, MatAssemblyEnd is called with MAT_FINAL_ASSEMBLY at the end of MatZeroRows_SeqAIJ and that does indeed change my sparsity pattern. Is my interpretation of the documentation page wrong?</div><div class=""><br class=""></div><div class="">Alex<br class=""></div></div>
</div></blockquote></div><br class=""></div></div></body></html>