<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Please always keep the list in copy.<div>The way you create A is not correct, I’ve attached a fixed code.</div><div>If you want to keep your own distribution for A (and not the one associated to R_part), you’ll need to first call <a href="https://urldefense.us/v3/__https://petsc.org/main/manualpages/Mat/MatCreateSubMatrix/__;!!G_uCfscf7eWS!YjRNPHiOB2cmuRYkj3oAk-pZq_o8h3NlpeO9PlDH0X9SBfFvdi3ClO4y8ytxjLkg8u16l6dmVO7PZsCIAdueNw$">https://petsc.org/main/manualpages/Mat/MatCreateSubMatrix/</a> to redistribute A and then do a MatCopy() of the resulting Mat into R_part</div><div><br></div><div>Thanks,</div><div>Pierre</div><div><br></div><div>$ /Volumes/Data/repositories/petsc/arch-darwin-c-debug-real/bin/mpirun -n 4 ./ex1234</div><div><div>Mat Object: 4 MPI processes</div><div> type: mpidense</div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div><div>Mat Object: 4 MPI processes</div><div> type: mpidense</div><div> 2.6219599187040323e+00 1.9661197867318445e+00 1.5218640363910978e+00 </div><div> 3.5202261875977947e+00 3.6311893358251384e+00 2.2279492868785069e+00 </div><div> 2.7505403755038014e+00 3.1546072728892756e+00 1.8416294994524489e+00 </div><div> 2.4676055638467314e+00 2.3185625557889602e+00 2.0401666986599833e+00 </div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div><div> 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 </div></div><div><br></div><div><br></div><div></div></body></html>