<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div> VecGetOwnershipRange() works with any vector, including DM created vectors. You could not have the global ownership you provide below.<div><br></div><div> Perhaps you are thinking about the Natural ownership values? For those if you using DMDA take a look at DMDAGetAO() and DMDACreateNaturalVector()</div><div><br></div><div> Barry</div><div><br><div><br><blockquote type="cite"><div>On Jan 30, 2023, at 10:36 AM, Venugopal, Vysakh (venugovh) via petsc-users <petsc-users@mcs.anl.gov> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;">Hello,<o:p></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;">I am using a DMCreateGlobalVector to create a vector V. If V is divided into m processes, is there a way to get the global indices of V assigned to each process?<o:p></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;">For example: V = [10, 20, 30, 40, 50, 60, 70, 80].<o:p></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;">If MPI process 0 has [10, 40, 50, 60] and process 1 has [20, 30, 70, 80], is it possible to get the indices for process 0 as [0,3,4,5] and process 1 as [1,2,6,7]?<o:p></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;">Thanks,<o:p></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;">Vysakh<o:p></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;"><span style="font-family: Arial, sans-serif; border: 1pt none windowtext; padding: 0in;">---<o:p></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;"><span style="font-family: Arial, sans-serif; border: 1pt none windowtext; padding: 0in;">Vysakh Venugopal</span><span style="font-family: Arial, sans-serif;"><o:p></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;"><span style="font-family: Arial, sans-serif; border: 1pt none windowtext; padding: 0in;">Ph.D. Candidate</span><span style="font-family: Arial, sans-serif;"><o:p></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;"><span style="font-family: Arial, sans-serif; border: 1pt none windowtext; padding: 0in;">Department of Mechanical Engineering</span><span style="font-family: Arial, sans-serif;"><o:p></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif; background-color: white;"><span style="font-family: Arial, sans-serif; border: 1pt none windowtext; padding: 0in;">University of Cincinnati, Cincinnati, OH 45221-0072</span></div></div></div></blockquote></div><br></div></body></html>